Bug 27792: Improve jEditable configuration for point of sale fields
authorOwen Leonard <oleonard@myacpl.org>
Thu, 25 Feb 2021 12:15:02 +0000 (12:15 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 4 Mar 2021 10:43:51 +0000 (11:43 +0100)
commitcf99922b33976e06dc7e05b27d943bee872e61db
tree7212d20f2b484f51489440015be1998ebace0cd0
parent61a93b67d9df1359c228c46dfa7275866cd6ea34
Bug 27792: Improve jEditable configuration for point of sale fields

This patch alters the configuration of the "cost" and "quantity"
editable fields in the "This sale" table on the Point of Sale page:

 - Reduce field with to reduce jumpy table re-draws.
 - Replace "numeric" input type with "text"
 - Add pattern attribute for enforcing currency/number entry

To test you must have EnablePointOfSale and UseCashRegisters enabled and
configured.

 - Apply the patch and go to the Point of Sale page.
 - Add some items for purchase.
 - In the "This sale" table, click the values in the "cost" and
   "quantity" columns and try editing their values.
 - The form field which appears should not fill the width of the table
   column.
 - The fields should enforce the correct input: Currency for the "cost"
   column, digits for the "quantity" column.
 - The fields should update when you click out of them and the correct
   values should appear in the "Collect payment" area.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 50c4efb18dc4e666d60e57f8412d6553eccbfe72)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt