https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43912

--- Comment #5 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 211468
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211468&action=edit
Bug 43912: (QA follow-up) Pre-fill zero-expected rows with a plain 0.00

The rows collapsed behind "Show payment types with nothing expected" were
pre-filled with format_price(), which follows CurrencyFormat. With
CurrencyFormat set to FR that gives "0,00", which fails the amount input's
pattern (^-?\d+(\.\d{1,2})?$) and the server-side amount check, so the
Complete cashup form could not be submitted even with every amount
entered correctly.

These rows are zero by definition, so pre-fill them with a plain "0.00",
the dot-decimal form the input and the server expect whatever
CurrencyFormat is.

To test:
1. Set UseCashRegisters, set CashupPaymentTypes to CASH,CHEQUE,CARD and
   set CurrencyFormat to FR
2. Take a cash payment of 10.00 on a register
3. Click Record cashup, Start cashup, then Complete cashup
4. Enter 10.00 in the Cash row and click the "Show payment types with
   nothing expected" link
   => The Cheque and Card rows are pre-filled with 0.00, show no
      validation error, and the cashup can be completed
      (before: they held "0,00" and the form could not be submitted)
5. Type 2.00 in the Cheque row
   => The discrepancy column shows +2,00 (formatted for FR)

Co-Authored-By: Claude Sonnet 5.5 <[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/

Reply via email to