Bugzilla – Attachment 98492 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.70 KB, created by
Martin Renvoize (ashimema)
on 2020-02-05 14:15:39 UTC
(
hide
)
Description:
Bug 24489: Don't allow payment of 0
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-02-05 14:15:39 UTC
Size:
1.70 KB
patch
obsolete
>From 63200a2c2d26e7ff5846d1b9a09fd7fc0ce7f535 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 > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../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 ae2f53d486..cdc8dc30f4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >@@ -347,6 +347,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.20.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 24489
:
97815
| 98492