Bug 28120

Summary: Koha Account pay is logging fine amountoutstanding as 0 when paying selected lines
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: Fines and feesAssignee: Bugs List <koha-bugs>
Status: In Discussion --- QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: jonathan.druart, kyle, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Nick Clemens (kidclamp) 2021-04-09 12:57:25 UTC
We have hardcoded a 0 into the logs in Koha/Account.pm
170  new_amountoutstanding => 0,

To recreate:
1 - Find a patron with debits, or charge a debit manually
2 - On the patron's accoutning tab Select 'Make a payment'
3 - Select the line and click 'Pay selected'
4 - Pay less than the full amount owed
5 - Go to Tools->log viewer
6 - Enter the patrons borrowernumber into 'Object' and hit enter
7 - Notice the fines log says 'new_amountoutstanding' => 0
Comment 1 Martin Renvoize (ashimema) 2021-04-13 07:47:58 UTC
I would question whether we actually need the FinesLog at all now... we record all the details as offsets so the finesLog is redundant at this point.
Comment 2 Jonathan Druart 2021-04-13 09:24:16 UTC
Nick, Kyle, would you agree to remove FinesLog?
Comment 3 Katrin Fischer 2023-07-01 07:39:53 UTC
The log appears to have changed quite a bit since:

$VAR1 = { 'note' => '', 'itemnumber' => undef, 'credit_type_code' => 'PAYMENT', 'description' => '', 'borrowernumber' => 51, 'amount' => -4, 'amountoutstanding' => -4, 'action' => 'create_PAYMENT', 'branchcode' => 'CPL', 'manager_id' => 51 }; 

Argueably as my fine was 5.00, the amountoutstanding should probably be 1?

I am not sure about removing the fines log. It cannot be accessed as easily from the GUI - maybe we need to think how to make the information more visible/resusable first.