Bugzilla – Attachment 97815 Details for
Bug 24489
Prevent user from paying/writing off 0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24489: Don't allow payment of 0
Bug-24489-Dont-allow-payment-of-0.patch (text/plain), 1.64 KB, created by
Nick Clemens (kidclamp)
on 2020-01-23 13:01:45 UTC
(
hide
)
Description:
Bug 24489: Don't allow payment of 0
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-01-23 13:01:45 UTC
Size:
1.64 KB
patch
obsolete
>From 92fa2abd6ec37019b925d39ca418fc48049d1d83 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 23 Jan 2020 12:57:04 +0000 >Subject: [PATCH] Bug 24489: Don't allow payment of 0 > >To test: >1 - Put a fine on a patron >2 - Go to Accounting->Make a payment on the patrons record >3 - Select the fine and click 'Write off selected' >4 - Enter '.0001' into Writeoff amount and hit confirm >5 - You are redirected to make a payment with no error and are no longer writing off selected >6 - Apply patch >7 - Attempt to pay less than a cent >8 - You are warned that you must pay more than 0 >--- > koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt | 10 ++++++++++ > 1 file changed, 10 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >index fa358135e6..6708265011 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >@@ -339,6 +339,16 @@ > var forms = $('#payindivfine, #payfine'); > var change = $('#change')[0]; > >+ forms.on('submit',function(){ >+ if( $("#paid").val() == 0 ){ >+ alert(_("You must pay an amount greater than 0")); >+ forms.beensubmitted = false; >+ return false; >+ } else { >+ return true; >+ } >+ }); >+ > $('#payindivfine, #payfine').preventDoubleFormSubmit(); > $("#paid, #collected").on("change",function() { > moneyFormat( this ); >-- >2.11.0
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 24489
:
97815
|
98492