Bugzilla – Attachment 47702 Details for
Bug 15746
A random library is used to record an individual payment
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF]Bug 15746: Do not record individual payments with randomly picked libraries
SIGNED-OFFBug-15746-Do-not-record-individual-payme.patch (text/plain), 1.88 KB, created by
Héctor Eduardo Castro Avalos
on 2016-02-05 15:34:44 UTC
(
hide
)
Description:
[SIGNED-OFF]Bug 15746: Do not record individual payments with randomly picked libraries
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2016-02-05 15:34:44 UTC
Size:
1.88 KB
patch
obsolete
>From 25ddb304c1cd2f017c7f29b7148aa7e253f7e79f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 5 Feb 2016 10:46:28 +0000 >Subject: [PATCH] [SIGNED-OFF]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. > >Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> >Works as advertised >--- > members/paycollect.pl | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/members/paycollect.pl b/members/paycollect.pl >index 9525464..8a32040 100755 >--- a/members/paycollect.pl >+++ b/members/paycollect.pl >@@ -48,8 +48,7 @@ my $borrowernumber = $input->param('borrowernumber'); > my $borrower = GetMember( borrowernumber => $borrowernumber ); > my $user = $input->remote_user; > >-# get account details >-my $branch = GetBranch( $input, GetBranches() ); >+my $branch = C4::Context->userenv->{'branch'}; > > my ( $total_due, $accts, $numaccts ) = GetMemberAccountRecords($borrowernumber); > my $total_paid = $input->param('paid'); >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15746
:
47684
|
47685
|
47702
|
47703
|
47974
|
47975