When making payments, the amount paid is meant to be stored as a negative number. C4::Accounts::makepayment does this correctly. However C4::Accounts::makepartialpayment saves the amount as a positive number. This means the payment shows up as a fine with no balance outstanding on the borrowers record.
Created attachment 12057 [details] [review] Bug 8739 - Partial Fine Payments Saving Amount Paid Incorrectly
Can you please add a test plan for this?
* Create two fines * Make a partial payment one fine 1, make a full payment on the other * Look at the fines in koha, one payment will be green, the other red. This reflects the positive or negative signed-ness of the payment. * Apply the patch and repeat.
Created attachment 12256 [details] [review] [SIGNED-OFF] Bug 8739 - Partial Fine Payments Saving Amount Paid Incorrectly Signed-off-by: Owen Leonard <oleonard@myacpl.org> Confirmed using test plan that the display is corrected.
QA comment: * the makepayement sub also reverse the amount paid: # create new line my $payment = 0 - $amount; my $ins = $dbh->prepare( "INSERT INTO accountlines (borrowernumber, accountno, date, amount, itemnumber, description, accounttype, amountoutstanding, manager_id) VALUES ( ?, ?, now(), ?, ?, 'Payment,thanks', 'Pay', 0, ?)" ); so it's consistent * tiny patch (and it's a bugfix !) * koha-qa.pl OK (there were 2 perlcritic violations, that were not related to this patch, and that i've fixed) passed QA
Pushed to 3.8.x, will be in 3.8.6