From fb5bfba392f65278d2486e35af3458917b4c25bf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20K=C3=B6hler?= Date: Wed, 9 Aug 2006 13:44:41 +0000 Subject: [PATCH] Bug 232 - Zahlungsausgang Fehler, falsches Aufsummieren von Teilzahlungen bei Rechnungen --- SL/CP.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/SL/CP.pm b/SL/CP.pm index 341510c55..b411b0608 100644 --- a/SL/CP.pm +++ b/SL/CP.pm @@ -370,10 +370,17 @@ sub process_payment { $pth->finish; $amount += $form->{"paid_$i"}; + + # BUG 324 + if ($form->{arap} eq 'ap') { + $paid = "paid = paid + $amount"; + } else { + $paid = "paid = $amount"; + } # update AR/AP transaction $query = qq|UPDATE $form->{arap} set - paid = $amount, + $paid, datepaid = '$form->{datepaid}' WHERE id = $form->{"id_$i"}|; $dbh->do($query) || $form->dberror($query); -- 2.20.1