https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33501
--- Comment #39 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 208984 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208984&action=edit Bug 33501: (follow-up) Make Quick cashup work from pos/register.pl The Quick cashup button switches op to cud-cashup and submits the form without any actual_amount_<TYPE> fields, expecting the controller to reconcile against the expected per-type totals. pos/registers.pl did this, but pos/register.pl only accepted per-type amounts, so a Quick cashup from a single register's page failed with "Invalid amount entered for cashup. Please enter a monetary amount." Add Koha::Cash::Register->balanced_reconciliations, which returns one entry per configured payment type whose actual_amount is the expected total, and use it as the fallback in pos/register.pl when no amounts are posted. pos/registers.pl now calls the same method instead of building the list inline. To test: 1. Set UseCashRegisters, CashupPaymentTypes to CASH,CHEQUE 2. Take a cash and a cheque payment on a register 3. Go to Point of sale > the register's page (pos/register.pl) 4. Click Record cashup, then Quick cashup => The cashup completes with no error and no surplus/deficit line 5. Repeat from Point of sale > Cash registers (pos/registers.pl) and confirm Quick cashup still works there 6. prove t/db_dependent/Koha/Cash/Register.t Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Sally <[email protected]> Signed-off-by: Martin Renvoize <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
