]> git.koha-community.org Git - koha.git/commit
Bug 27290: Clean up validation
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 21 Dec 2020 16:25:47 +0000 (16:25 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 12 Feb 2021 13:09:55 +0000 (14:09 +0100)
commit0045e89050ff258bc3dd1518112708fea33c270c
tree3a27158aacd0c54061dc22d0bd97ddcef1b363af
parent5453f0f4fe364a581b5bafc16ee124d2c9260604
Bug 27290: Clean up validation

It seems we had the validator instantiated twice and we used a mix of
validation of required at form element level and in JS instantiator.

This patch moves the rules to consistently apply at the instantiation
and removes the duplicate lines.

To test:
1 - Enable 'useCashRegisters' and 'EnablePointofSale'
2 - Add a cash register
3 - Add a debit type that can be sold
4 - Go to point of sale and sell the item multiple times
5 - Enter 'Amount tendered' less than amount being paid
6 - Click confirm
7 - Transaction is processed as if full funds received
8 - Try with a negative number - goes through again

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 01fc41ca593ee030a77c2462acda0dc59dfe7ec0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt