Bug 8739 - Partial Fine Payments Saving Amount Paid Incorrectly
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 7 Sep 2012 15:44:22 +0000 (11:44 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Wed, 3 Oct 2012 15:58:56 +0000 (17:58 +0200)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Confirmed using test plan that the display is corrected.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
C4/Accounts.pm

index f7adca1..f76ae01 100644 (file)
@@ -760,7 +760,7 @@ sub makepartialpayment {
     .  'description, accounttype, amountoutstanding, itemnumber, manager_id) '
     . ' VALUES (?, ?, now(), ?, ?, ?, 0, ?, ?)';
 
-    $dbh->do(  $insert, undef, $borrowernumber, $nextaccntno, $amount,
+    $dbh->do(  $insert, undef, $borrowernumber, $nextaccntno, 0 - $amount,
         "Payment, thanks - $user", 'Pay', $data->{'itemnumber'}, $manager_id);
 
     UpdateStats( $user, 'payment', $amount, '', '', '', $borrowernumber, $accountno );