[Koha-bugs] [Bug 15746] A random library is used to record an individual payment

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 5 11:53:03 CET 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15746

--- Comment #1 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 47684
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47684&action=edit
Bug 15746: Do not record individual payments with randomly picked libraries

When a payment is made individualy, the library used to record this
payment is randomly picked from the library list.
This is because C4::Branch::GetBranch looks at 1. the $branch variable
sent by the template, wich does not exist, then 2. the branchname
cookie, which does not exist neither, then 3. get the first branchcode
from a list of keys (non ordered).

To reproduce:
- Create a manual invoice for a patron
(members/maninvoice.pl?borrowernumber=XXXX)
- Pay this fine using the "Pay" button of the corresponding line from
  the members/pay.pl?borrowernumber=XXXX page
Look at the statistics table:
select * from statistics order by datetime desc limit 10;

The branch value of the first line might not correspond to the library
you were using to pay the payment.

Test plan:
Apply this patch, repeat the steps above and confirm that the library
picked is now the one used to pay.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list