Bug 35004: Set row.quantity_received to 1 if row.quantity_received is empty and we...
authorSlava Shishkin <slavashishkin@gmail.com>
Fri, 6 Oct 2023 16:25:30 +0000 (19:25 +0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 3 Nov 2023 15:04:43 +0000 (12:04 -0300)
commit9110547de098264e2574e27f35859674f1ed18a2
treea105bcf0e1ed77dd5cb9ba86e9f30170f8091a14
parente49abfa6b528818dbdb921d1997e964a52ea7a7a
Bug 35004: Set row.quantity_received to 1 if row.quantity_received is empty and we're in 'cataloguing' mode

Before the code changes only field value was set to 1,
but "row.quantity_received" still had an undefined value.
After correction row.quantity_received set to 1 if it is empty,
but only when effective_create_items == 'cataloguing',
and after that its value assigned to the form field.

To test:
1. Add a new basket.
2. Create an order line
3. Receive shipment and create an invoice
4. Start receiving your order:
    Verify:
    - Quantity ordered: X
    - Quantity received: 1 (pre-filled, don't touch or change it)
5. Click "Confirm"
6. Observe the Receive error popup: "Order ZZZ: No quantity to receive
   set. No items will be created."
7. Verify that "Order receive" was not happen (received orders remains
   empty)
8. Apply the patch and make sure your order is received correctly after
   step 5.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt