I likely made a mistake when improvising the use of the PoS. Nonetheless, it seems wrong that it can end up crashing. ==Test plan== 1. enable EnablePointOfSale and UseCashRegisters 2. Add new cash register, like name "copier", Initial float: 0.30 no idea if it semantically makes sense 3. New debit type, code: "Debittypecode", def amount: 0.30 Description: black and white can be sold no idea if it semantically makes sense 4. add like 5 black and white items 5. Amount tendered: same as price 6. cash register: copier 7. confirm 8. print receipt 9. error/ISE: Can't call method "lang"
Created attachment 121114 [details] [review] Bug 28368: Add fallback language for anonymous payment receipts This adds a fallback for when a payment is made anonymously to allow printing a receipt in the staff members current session language. Test plan 1. Set `EnablePointOfSale` and `UseCashRegisters` 2. Add new cash register` 3. New debit type that 'can be sold' 4. Make a sale (via Point of Sale) using the above debit type. 5. Attempt to 'print receipt' from the subsequent prompt 6. Not the ISE: Can't call method "lang" 7. Apply patch 8. Attempt to 'print receipt' again, this time it should work.
Created attachment 121136 [details] [review] Bug 28368: Add fallback language for anonymous payment receipts This adds a fallback for when a payment is made anonymously to allow printing a receipt in the staff members current session language. Test plan 1. Set `EnablePointOfSale` and `UseCashRegisters` 2. Add new cash register` 3. New debit type that 'can be sold' 4. Make a sale (via Point of Sale) using the above debit type. 5. Attempt to 'print receipt' from the subsequent prompt 6. Not the ISE: Can't call method "lang" 7. Apply patch 8. Attempt to 'print receipt' again, this time it should work. Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
It works, thanks :)
Unrelated, while I'm at it likely for a follow-up ticket: Is that expected that for free stuff where it's useful to track the "sales" like stock management; that an order with only free stuff just refreshes the page and does nothing? (including the Register details)
comment 4: new ticket bug 28406
Pushed to master for 21.05, thanks to everybody involved!
Depends on Bug 26734 not in 20.11.x