Revision 56e0744e
Von Jan Büren vor fast 8 Jahren hinzugefügt
SL/BackgroundJob/SelfTest/Transactions.pm | ||
---|---|---|
206 | 206 |
|
207 | 207 |
my $query = qq| |
208 | 208 |
select sum(amount) from ar a JOIN customer c ON (a.customer_id = c.id) |
209 |
WHERE storno is true |
|
210 |
AND a.transdate >= ? and a.transdate <= ?|; |
|
209 |
WHERE a.id in (SELECT id from ap where storno is true AND a.transdate >= ? and a.transdate <= ?)|; |
|
211 | 210 |
my ($summe_stornobuchungen_ar) = selectfirst_array_query($::form, $self->dbh, $query, $self->fromdate, $self->todate); |
212 | 211 |
|
213 | 212 |
$query = qq| |
214 | 213 |
select sum(amount) from ap a JOIN vendor c ON (a.vendor_id = c.id) |
215 |
WHERE storno is true |
|
216 |
AND a.transdate >= ? and a.transdate <= ?|; |
|
214 |
WHERE a.id in (SELECT id from ap where storno is true AND a.transdate >= ? and a.transdate <= ?)|; |
|
217 | 215 |
my ($summe_stornobuchungen_ap) = selectfirst_array_query($::form, $self->dbh, $query, $self->fromdate, $self->todate); |
218 | 216 |
|
219 | 217 |
$self->tester->ok($summe_stornobuchungen_ap == 0, 'Summe aller Einkaufsrechnungen (stornos + stornierte) soll 0 sein'); |
Auch abrufbar als: Unified diff
SelfTests check_summe_stornobuchungen optimiert
Die Summenprüfung der Stornobuchungen muss
auch über den Jahreswechsel hinaus Buchungen berücksichtigen.