]> git.koha-community.org Git - koha.git/commit
Bug 30003: Prevent double up of point-of-sale items
authorJake Deery <jake.deery@ptfs-europe.com>
Tue, 8 Feb 2022 11:40:06 +0000 (11:40 +0000)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 8 Apr 2022 12:45:35 +0000 (08:45 -0400)
commitb8a2785d6737eab2ce5311871806f8a2e4ac818c
tree38443299953506d1778a882eada5bde46d0a00fc
parenteb04615b5312e3dd7c5e95ee296f9e3e68436edb
Bug 30003: Prevent double up of point-of-sale items

This patch prevents the double submission of point-of-sale items when form validation fails at the first submission

Test plan
 1.  Navigate to /cgi-bin/koha/pos/pay.pl
 2.  Add an item from 'items to purchase'
 3.  Under 'collect payment', click submit without altering the form
 4.  See 'This field is required.'
 5.  Now, fill a value in 'Amount tendered' that satisfies or exceeds 'Amount being paid'
 6.  The payment should succeed
 7.  Navigate to /cgi-bin/koha/pos/register.pl
 8.  See duplicate lines in Transactions
 9.  Apply patch
10.  Repeat 2-6
11.  Navigate to /cgi-bin/koha/pos/register.pl
12.  Confirm only a single line was added

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt