Bug 28612

Summary: Log manager_id with multipayment
Product: Koha Reporter: Michal Denar <black23>
Component: Fines and feesAssignee: Bugs List <koha-bugs>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: black23, dcook, jonathan.druart, josef.moravec, martin.renvoize, rbit
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Crowdfunding committed: 0
Crowdfunding contact: Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Michal Denar 2021-06-22 10:59:02 UTC
Hello,
if an individual payment is made and the corresponding logging is enabled, the manager_id is also saved when the fee is paid. This is then displayed in the Koha staff interface. However, if multiple fees are paid at the same time, the manager_id is stored as NULL in the database. The interface then does not display information about when the items were handled.

https://prnt.sc/1347jik


Thank you.
Michal
Comment 1 Jonathan Druart 2021-06-22 12:33:03 UTC
Please provide more details, I don't recreate.

On master:
* Create 2 manual invoices
* Make a payment
* Select the 2 invoices
* "Pay selected"

=> accountlines.manager_id is filled with the correct borrowernumber.
Comment 2 Michal Denar 2021-06-22 20:53:18 UTC
Jonathan,
I'm sorry. It's not the way I described it. I'll try to describe the problem and then we'll decide whether to close this bug or take a different course of action.
The problem occurs when the CalculateFinesOnReturn option is set to "Do". Then the cron calculates the fines on return and the manager_id is correctly NULL. The interface is then unable to determine who collected the payment from the borrower. This info is only in the individual account lines, not in the green total. Is this correct or not?
Comment 3 Martin Renvoize (ashimema) 2021-07-06 10:07:45 UTC
(In reply to Michal Denar from comment #2)
> Jonathan,
> I'm sorry. It's not the way I described it. I'll try to describe the problem
> and then we'll decide whether to close this bug or take a different course
> of action.
> The problem occurs when the CalculateFinesOnReturn option is set to "Do".
> Then the cron calculates the fines on return and the manager_id is correctly
> NULL. The interface is then unable to determine who collected the payment
> from the borrower. This info is only in the individual account lines, not in
> the green total. Is this correct or not?

I'm a little confused.. is your screenshot a report or is there a particular screen your expecting to see this detail.

manager_id is only populated for staff initiated actions.. in this case I would say all the debts here are system built. (regardless of whether they've been triggered by the cron or a checkin).

The 'payment' would be where the staff comes in.. so I'd expect to see the manager_id populated in the corresponding payment credit line..

If you're wanting to report against this.. I would suggest looking at how offsets link debits to credits.

Does this help..?
Comment 4 Martin Renvoize (ashimema) 2021-07-06 10:08:44 UTC
As an asside, I'd take a look at the new and improved 'Details' display that is included in bug 22435
Comment 5 Katrin Fischer 2023-07-01 11:35:35 UTC
As others have said here, the manager_id being empty is to be expected for the OVERDUE fine entries that are set by cron/automatic calculation.