Bugzilla – Attachment 76116 Details for
Bug 20946
Cannot pay fines for patrons with credits
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20946: Remove credits from the 'Pay fines' tab in pay.pl
Bug-20946-Remove-credits-from-the-Pay-fines-tab-in.patch (text/plain), 1.59 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-06-16 12:49:57 UTC
(
hide
)
Description:
Bug 20946: Remove credits from the 'Pay fines' tab in pay.pl
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-06-16 12:49:57 UTC
Size:
1.59 KB
patch
obsolete
>From 660732429669434618f55c7467da56bff0da2475 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Sat, 16 Jun 2018 09:44:19 -0300 >Subject: [PATCH] Bug 20946: Remove credits from the 'Pay fines' tab in pay.pl > >This patch changes the query for outstanding account lines so it doesn't >pick credits, which don't belong to the 'Pay fines' tab, and actually break >form validation for payments. > >To test: >- Add a $5 credit to a patron >- Add a $1 fine >- Go to the 'Pay fines' tab >=> FAIL: Credit is displayed >- Try to pay all fines >=> FAIL: You are told to enter a value less than or equal to -4.00 > (Observe you cannot do that) >- Apply this patch >- Reload >=> SUCCESS: Credit is not displayed >=> SUCCESS: You are able to pay all fines >- Sign off :-D >--- > members/pay.pl | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/members/pay.pl b/members/pay.pl >index 53a8f37794..451cc05e68 100755 >--- a/members/pay.pl >+++ b/members/pay.pl >@@ -140,7 +140,10 @@ sub add_accounts_to_template { > > my $patron = Koha::Patrons->find( $borrowernumber ); > my $total = $patron->account->balance; >- my $account_lines = Koha::Account::Lines->search({ borrowernumber => $borrowernumber, amountoutstanding => { '!=' => 0 } }, { order_by => ['accounttype'] }); >+ my $account_lines >+ = Koha::Account::Lines->search( >+ { borrowernumber => $borrowernumber, amountoutstanding => { '>' => 0 } }, >+ { order_by => ['accounttype'] } ); > my @accounts; > while ( my $account_line = $account_lines->next ) { > $account_line = $account_line->unblessed; >-- >2.17.1
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 20946
:
76116
|
76317
|
76318
|
76394
|
76395
|
76432
|
76433
|
76434
|
76435
|
76437
|
76519
|
76521
|
76522
|
76632