Revision a938d583
Von Jan Büren vor 11 Tagen hinzugefügt
- ID a938d5833ae3eac783616bf643b03494457d5e07
- Vorgänger 64a0ac19
SL/BackgroundJob/SelfTest/Transactions.pm | ||
---|---|---|
249 | 249 |
from ar |
250 | 250 |
where |
251 | 251 |
(select sum(amount) from acc_trans a left join chart c on (c.id = a.chart_id) where trans_id = ar.id and c.link like '%AR_paid%') is not null |
252 |
AND storno is false |
|
252 |
AND storno is false AND type <> 'final_invoice'
|
|
253 | 253 |
AND ar.id in (SELECT id from ar where transdate >= ? and transdate <= ?) |
254 | 254 |
order by diff |; |
255 | 255 |
|
... | ... | |
398 | 398 |
WHERE chart_link ilike '%paid%' AND acc_trans.trans_id=ar.id),0) as "paid via acc_trans" |
399 | 399 |
FROM ar left join customer c on (c.id = ar.customer_id) |
400 | 400 |
WHERE |
401 |
ar.storno IS FALSE |
|
401 |
ar.storno IS FALSE and ar.type <> 'final_invoice'
|
|
402 | 402 |
AND ar.id in (SELECT trans_id from acc_trans where transdate >= ? AND transdate <= ? AND chart_link ilike '%paid%')|; |
403 | 403 |
|
404 | 404 |
my $invoices = selectall_hashref_query($::form, $self->dbh, $query, $self->fromdate, $self->todate); |
... | ... | |
572 | 572 |
from acc_trans ac left join ar on (ac.trans_id = ar.id) |
573 | 573 |
WHERE (ac.chart_link like '%AR_paid%' OR ac.fx_transaction) |
574 | 574 |
AND ac.trans_id in (SELECT trans_id from acc_trans ac where ac.transdate >= ? AND ac.transdate <= ?) |
575 |
AND ar.type <> 'final_invoice' |
|
575 | 576 |
group by invnumber, paid having sum(ac.amount) <> ar.paid*-1|; |
576 | 577 |
|
577 | 578 |
my $ar_amount_not_ac_amount = selectall_hashref_query($::form, $self->dbh, $query, $self->fromdate, $self->todate); |
Auch abrufbar als: Unified diff
selftest: Schlussrechnung darf als bezahlt markiert werden -> Ausnahme