Bug 34169: Add decimal class to all relevant input fields in the acquisitions module
authorKatrin Fischer <katrin.fischer@bsz-bw.de>
Mon, 17 Jul 2023 16:01:25 +0000 (16:01 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 24 Jul 2023 17:55:34 +0000 (14:55 -0300)
commitc943fddac6ba8b7ab5228b57c59d22adce4becc1
tree01722a44244f925e4503919d6d9b09ce8bb16595
parent6b2308c17bd8add62e5cc7deb095ed28a2e2fcf4
Bug 34169: Add decimal class to all relevant input fields in the acquisitions module

This is a first step towards more consistency and possibly supporting
multiple input formats as well in the future. It marks all input fields
for monetary values, such as prices, replacement prices etc. with a class
that is linked to a check for number format with the jQuery Validator plugin.

To test:

For any input field to test, try adding various false entries, like "abc" or "1,00".
It should only accept inputs with decimal dot, like: "1.00"

0) Apply patch, restart_all
1) Suggestion
  * Add a new suggestion in the staff interface
  * Test: price input field at the bottom of the form.
  * Accept the suggestion
2) Order form
  * Create a new basket
  * Create an order line from an existing record
  * Test: list price, replacement price, and actual price.
  * Check the checkbox for uncertain price before you save
3) Uncertain prices
  * Go to the uncertain prices page for this vendor
  * Test: price field
    Note: this form does its own validation, but the change should not change behaviour for now
  * Resolve the uncertain price
  * Close order
4) Receive shipment
  * Test: Shipping cost
5) Receive the order
  * Test: replacement price, actual price
  * Check checkbox for price in foreign currency
  * Test: price in foreign currency
  * Receive order line
6) Invoice summary
  * Finish receiving
  * Test: shipping cost
  * Test: invoice adjustments: amount in the form for the first entry, amount in the table after adding it
7) Merging invoices
  * Receive another shipment and create and invoice
  * Go to invoices and search all
  * Check the 2 entries for merging
  * Test: shipping cost
8) Adding orders from a staged/new file
  * Export some records using the cart or list
  * Create a new basket
  * Order from new file
  * Import your file, ignore item records
  * Test: price and replacement price
  + Bonus: also test with items, test plan and file from bug 22802 are really helpful here

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt
koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt