Bug 34880: (follow-up) Make condition more specific
To test (applies to both patches): * Add a new basket as 'standing order' and with 'items created in cataloguing' * Create an order line * Receive shipment and create an invoice * Receive your order * Verify: * Quantity ordered: 1 * Quantity received: 1 (pre-filled) * No item form on the right * Confirm * Receive error: Order X: No quantity to receive set. No items will be created. * Verify no receive was processed (received orders remains empty) * Apply patch * Verify receive works as expected Other possible combinations to test: * Standing order, items on receive * Standing order, items on order (no items are created) * Standing order + order from subscription + any item setting (no items are created) * No standing order + items in cataloguing * No standing order + items on receive * No standing order + items on order * No standing oder + order from subscription + all item settings (no items are created) Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
9dd6fa2d8d
commit
e28ea9c4af
1 changed files with 2 additions and 3 deletions
|
@ -1102,12 +1102,13 @@
|
|||
var set_editor = function() {
|
||||
var modal = $("#order_edit");
|
||||
var row = modal.data('row');
|
||||
var effective_create_items = row.basket.create_items || AcqCreateItem;
|
||||
var origrec = $("#order_edit").data('origrec')||{};
|
||||
if(!origrec.hasOwnProperty(row.order_id)) {
|
||||
origrec[row.order_id] = row.quantity_received;
|
||||
$("#order_edit").data('origrec', origrec);
|
||||
}
|
||||
if(row.subscription_id || row.basket.standing === true) {
|
||||
if(row.subscription_id || ( row.basket.standing === true && effective_create_items == 'cataloguing') ) {
|
||||
row.quantity_received = row.quantity;
|
||||
}
|
||||
var keep = $("#order_edit").data('kept');
|
||||
|
@ -1159,8 +1160,6 @@
|
|||
$("#suggestion_fieldset").hide();
|
||||
}
|
||||
|
||||
var effective_create_items = row.basket.create_items || AcqCreateItem;
|
||||
|
||||
// set today if no date_received in row
|
||||
document.querySelector("#datereceived")._flatpickr.setDate(row.date_received||new Date());
|
||||
|
||||
|
|
Loading…
Reference in a new issue