Bugzilla – Attachment 111235 Details for
Bug 24786
Allow setting a cash register for a login session and configuring library-default cash registers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24786: Add validation to point of sale
Bug-24786-Add-validation-to-point-of-sale.patch (text/plain), 1.99 KB, created by
Andrew Fuerste-Henry
on 2020-10-05 12:29:50 UTC
(
hide
)
Description:
Bug 24786: Add validation to point of sale
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2020-10-05 12:29:50 UTC
Size:
1.99 KB
patch
obsolete
>From f100cb5809842b08ec4c4bf1be96326f007e4c2f Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 2 Oct 2020 10:19:14 +0100 >Subject: [PATCH] Bug 24786: Add validation to point of sale > >The Point of Sale page relied upon serverside validation prior to this >patch; As such with the introduction of the ability to select '--None--' >at the session register level (to require the librarian to pick their >register for every transaction) we could result in a server error page. > >This patch introduced clientside validation to add checks for both the >'collected' and 'registerid' form fields. > >Test plan: >1/ Select a branch with cash registers available >2/ Select the '--None--' option for the session cash register >3/ Navigate to the point of sale page >4/ Attempt to make a sale without having picked your cash register >5/ Note that the submission was prevented and the fiedl is highlighted >as required in red. >6/ Signoff > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt | 11 +++++++++++ > 1 file changed, 11 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >index 08b79318e4..9a52d2a537 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >@@ -384,6 +384,17 @@ > } > }); > >+ $('#payForm').validate({ >+ rules: { >+ collected: { >+ required: true >+ }, >+ registerid: { >+ required: true >+ } >+ } >+ }); >+ > [% IF payment_id && Koha.Preference('FinePaymentAutoPopup') %] > $("#printReceipt").click(function() { > var win = window.open('/cgi-bin/koha/pos/printreceipt.pl?action=print&accountlines_id=[% payment_id | uri %]&collected=[% collected | uri %]&change=[% change | uri %]', '_blank'); >-- >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 24786
:
107145
|
107146
|
107147
|
107148
|
107149
|
107739
|
107740
|
107741
|
107742
|
107743
|
107754
|
107755
|
107756
|
107757
|
107758
|
107759
|
107957
|
107958
|
107959
|
107960
|
107961
|
107962
|
108060
|
108061
|
108062
|
108063
|
108064
|
108065
|
108066
|
108510
|
108511
|
108512
|
108513
|
108514
|
108515
|
108516
|
110162
|
110163
|
110164
|
110165
|
110166
|
110167
|
110168
|
110187
|
110188
|
110189
|
110190
|
110191
|
110192
|
110193
|
111066
|
111067
|
111068
|
111069
|
111070
|
111071
|
111072
|
111074
|
111126
|
111127
|
111128
|
111129
|
111130
|
111131
|
111132
|
111133
|
111220
|
111221
|
111222
|
111223
|
111224
|
111225
|
111226
|
111227
|
111228
|
111229
|
111230
|
111231
|
111232
|
111233
|
111234
|
111235
|
111611
|
111612
|
111613
|
111614
|
111615
|
111616
|
111617
|
111618
|
111619
|
111620
|
111623
|
111725
|
111757
|
111758
|
111759
|
111760
|
111761
|
111762
|
111763
|
111764
|
111765
|
111766
|
111767
|
111768
|
111769
|
111770
|
111776
|
111777
|
111778
|
111779
|
111780
|
111781
|
111782
|
111783
|
111784
|
111785
|
111786
|
111787
|
111788
|
112985
|
112988
|
112989
|
113226
|
113227
|
113241
|
113251
|
113253
|
113256
|
113257
|
113260