Bugzilla – Attachment 59810 Details for
Bug 18033
If/else sometimes does not make sense after koha account system refactoring
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18033: Remove duplicate code in paycollect.pl
Bug-18033-Remove-duplicate-code-in-paycollectpl.patch (text/plain), 2.28 KB, created by
Jonathan Druart
on 2017-02-02 12:28:34 UTC
(
hide
)
Description:
Bug 18033: Remove duplicate code in paycollect.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-02-02 12:28:34 UTC
Size:
2.28 KB
patch
obsolete
>From e16851a6a14976902f53e5742973e45e1fa23f74 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Wed, 1 Feb 2017 20:48:49 +0100 >Subject: [PATCH] Bug 18033: Remove duplicate code in paycollect.pl > >Test plan: >0) apply the patch >1) try to pay individual fee, with full amount and partial amount > it should work the same as before patch > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > members/paycollect.pl | 32 +++++++++----------------------- > 1 file changed, 9 insertions(+), 23 deletions(-) > >diff --git a/members/paycollect.pl b/members/paycollect.pl >index a76f007..ac1c281 100755 >--- a/members/paycollect.pl >+++ b/members/paycollect.pl >@@ -111,29 +111,15 @@ if ( $total_paid and $total_paid ne '0.00' ) { > ); > } else { > if ($individual) { >- if ( $total_paid == $total_due ) { >- my $line = Koha::Account::Lines->find($accountlines_id); >- Koha::Account->new( { patron_id => $borrowernumber } )->pay( >- { >- lines => [$line], >- amount => $total_paid, >- library_id => $branch, >- note => $payment_note >- } >- ); >- } >- else { >- my $line = Koha::Account::Lines->find($accountlines_id); >- >- Koha::Account->new( { patron_id => $borrowernumber, } )->pay( >- { >- amount => $total_paid, >- lines => [$line], >- note => $payment_note, >- library_id => $branch, >- } >- ); >- } >+ my $line = Koha::Account::Lines->find($accountlines_id); >+ Koha::Account->new( { patron_id => $borrowernumber } )->pay( >+ { >+ lines => [$line], >+ amount => $total_paid, >+ library_id => $branch, >+ note => $payment_note >+ } >+ ); > print $input->redirect( > "/cgi-bin/koha/members/pay.pl?borrowernumber=$borrowernumber"); > } else { >-- >2.9.3
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 18033
:
59752
|
59797
| 59810