Bug 28120 - Koha Account pay is logging fine amountoutstanding as 0 when paying selected lines
Summary: Koha Account pay is logging fine amountoutstanding as 0 when paying selected ...
Status: In Discussion
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-09 12:57 UTC by Nick Clemens
Modified: 2023-07-01 07:39 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 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 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.