Bug 33864: Better handling of confirmation button
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 30 May 2023 15:07:39 +0000 (12:07 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 31 May 2023 08:18:44 +0000 (10:18 +0200)
commit0fc69b1df27643dde64702c8516ca67a8358f65a
tree87ac3e5e3805acba288e9c8ebd6b8b841f589d29
parent31c86e13afb678325044e1d6d5b9935b92da83de
Bug 33864: Better handling of confirmation button

This patch corrects the behavior of the 'Confirm' button on the three
possible scenarios regarding item creation.

Ordering:
- 'Confirm' disabled, only gets enabled if quantity > 0

Receiving:
- Quantity gets locked (only changeable when creating items)
- 'Confirm' disabled, only gets enabled if quantity > 0

Cataloguing:
- It now defaults to 1
- 'Confirm' enabled by default (because of 1) if quantity is set to 0,
  it gets disabled.

To test:
1. Verify the described behavior with the sample orders for the previous
   patch.
=> SUCCESS: It does the job!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Andrew Nugged <nugged@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt