Bugzilla – Attachment 156634 Details for
Bug 35004
Cannot receive order lines with items created in cataloguing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35004: Set row.quantity_received to 1 if row.quantity_received is empty and we're in 'cataloguing' mode
Bug-35004-Set-rowquantityreceived-to-1-if-rowquant.patch (text/plain), 2.58 KB, created by
Slava Shishkin
on 2023-10-06 16:29:36 UTC
(
hide
)
Description:
Bug 35004: Set row.quantity_received to 1 if row.quantity_received is empty and we're in 'cataloguing' mode
Filename:
MIME Type:
Creator:
Slava Shishkin
Created:
2023-10-06 16:29:36 UTC
Size:
2.58 KB
patch
obsolete
>From 9da6c37fb460109220a68929f592b66013e2cf36 Mon Sep 17 00:00:00 2001 >From: Slava Shishkin <slavashishkin@gmail.com> >Date: Fri, 6 Oct 2023 19:25:30 +0300 >Subject: [PATCH] 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. >--- > .../intranet-tmpl/prog/en/modules/acqui/orderreceive.tt | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >index 5e86850ccb..4bfda9d254 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >@@ -1177,10 +1177,13 @@ > if( row.creator ) { > $("#creator").html([row.creator.surname, row.creator.firstname].filter(function(name){return name}).join(', ')+" ("+row.creator.patron_id+')') > } else { >- $("#creator").html(_("Account has been deleted")); >+ $("#creator").html(__("Account has been deleted")); > } > $("#quantity_to_receive").val(row.quantity).prop('readonly', !row.subscription_id); >- $("#quantity").val( effective_create_items == 'cataloguing' ? row.quantity_received || 1 : row.quantity_received ) >+ if (effective_create_items == 'cataloguing' && ! row.quantity_received) { >+ row.quantity_received = 1; >+ } >+ $("#quantity").val( row.quantity_received ) > .prop('readonly', !row.subscription_id && effective_create_items == 'receiving'); > [% IF only_one_order %] > $(".modal-save").prop('disabled', $("#quantity").val() == 0); >-- >2.42.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35004
:
156634
|
158334
|
158336