Bug 24786: Add validation to point of sale
commitc153adac098096ce3fa491a4d7b7a419ffc9f960
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 2 Oct 2020 09:19:14 +0000 (2 10:19 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 6 Nov 2020 14:40:00 +0000 (6 15:40 +0100)
tree79d241bf35fdd3a9d0f0a852deeb539a9bbd0163
parent8ece86e769e4876f19df8e8a22c2d0774c55aed2
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>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt