Bug 34331: Use register from userenv if parameter not passed
authorNick Clemens <nick@bywatersolutions.com>
Thu, 24 Aug 2023 12:22:23 +0000 (12:22 +0000)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Thu, 31 Aug 2023 10:23:50 +0000 (10:23 +0000)
commit6ae9e92b89cfcd254dc9a6d9637165db15e71bee
tree2f8540f2ae5453ae26c9fcfc6bb355057ab5ff92
parent285e2a73d62e43e868bc1d566327b5ca2ad94fd9
Bug 34331: Use register from userenv if parameter not passed

To recreate:
1. Enable the "EnablePointofSale" syspref.
2. Set the "UseCashRegisters" syspref to use.
3. Create 3 new registers (Register A, B and C) with a float amount of $25.
4. Under POS, configure 3 new debit types (i.e. Copies, Earbuds, Friends Donation)
-- You can leave the default amounts blank, or add an amount if desired.
-- Set "Can be manually invoiced?" and "Can be sold?"
5. Under point of sale make a $5 sale of copies under Register A.
6. Under point of sale make a $10 sale of earbuds under Register B.
7. Under point of sale make a $100 sale of Friends Donation under Register C.
8. At circ/set-library.pl set your register to Register A.
9. Go back to POS and view the "Transaction history for Register A" - it shows the correct amount of $5 sold in copies.
10. Go back to circ/set-library.pl and change your register to Register B.
11. Go back to POS and view the "Transaction history for Register B" - it shows the incorrect transaction history. It is showing the transaction history for Register A.
12. Go back to circ/set-library.pl and change your register to Register C.
13. Go back to POS and view the "Transaction history for Register C" - it shows the incorrect transaction history. It is showing the transaction history for Register A.
14. Apply patch, repeat. The correct transactions should now show.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bd28eae578c215f5dc27dae6d4ce262e523f2de4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8103059faf76cf67287b9fc0a872642a759e42ad)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
pos/register.pl