Bug 24786: Update point of sale to use session register
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 21 Jul 2020 12:08:18 +0000 (13:08 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 6 Nov 2020 14:39:59 +0000 (15:39 +0100)
commit086927c9766faedce0dd73a5cd5a180000da2056
tree9d8f82aeaa9e3d1007340c82160ef741016371fc
parent30b23c5f1df45ab2ffadc94494021b1189e75e13
Bug 24786: Update point of sale to use session register

This patch adds handling to allow for the use of the session cash
register by default if it has been set, otherwise it defaults to '--
None --' and requires the end user to select the register to proceed
with the sale.

Test plan
1/ Enable cash registers via the 'UseCashRegisters' system preference
2/ Enable point of sale via the 'EnablePointOfSale' system preference
3/ Navigate to the point of sale page
4/ Note that if you are logged in at a branch with no cash registers yet
defined, then an alert should appear
5/ Note that when you are logged in at a branch with cash regsiters
defined, but without a cash register associated with your session then
the cash 'Cash register' select box is populated with '-- None --' and
you are required to select a register prior to submission
6/ Note that upon selection, the '-- None --' option is disabled
7/ Note that when you have a register associated with your session then
the 'Cash register' select box is pre-populated with that register.
8/ 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/includes/html_helpers.inc
koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt
pos/pay.pl