Bugzilla – Attachment 192146 Details for
Bug 41732
Default order quantity should be 1 unless items are created on ordering
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41732: Default order quantity to 1 outside item-at-ordering
Bug-41732-Default-order-quantity-to-1-outside-item.patch (text/plain), 2.07 KB, created by
Slava Shishkin
on 2026-01-29 13:39:07 UTC
(
hide
)
Description:
Bug 41732: Default order quantity to 1 outside item-at-ordering
Filename:
MIME Type:
Creator:
Slava Shishkin
Created:
2026-01-29 13:39:07 UTC
Size:
2.07 KB
patch
obsolete
>From 2259a647f51c5d6bf9287d8734944f3733e94609 Mon Sep 17 00:00:00 2001 >From: Slava Shishkin <slavashishkin@gmail.com> >Date: Thu, 29 Jan 2026 15:37:33 +0200 >Subject: [PATCH] Bug 41732: Default order quantity to 1 outside > item-at-ordering >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Test plan: >1. In system preferences, set AcqCreateItem to cataloging the record or receiving an order. >2. Create a new basket with Create items when set to Use default (receiving an order). >3. In the basket, click + Add to basket and select an existing bibliographic record. >4. From the selected bibliographic record, click Add order. >5. On the order page, check Accounting details â Quantity. > ⢠Notice that the quantity defaults to 0 and the field is editable. > >After applying the patch >6. Repeat steps 1â4. >7. On the order page, check Accounting details â Quantity. > ⢠Notice that the quantity defaults to 1 and the field is editable. > >Item creation at ordering >8. In system preferences, set AcqCreateItem to placing an order. >9. Create a new order. >10. On the order page, check Accounting details â Quantity. > ⢠Notice that the quantity defaults to 0 and the field is not editable. >--- > acqui/neworderempty.pl | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index efbec39ac0a..3c0400241f1 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -409,11 +409,14 @@ my ( undef, $barcode_subfield ) = GetMarcFromKohaField('items.barcode'); > # get option values for TaxRates syspref > my @gst_values = map { option => $_ + 0.0 }, split( '\|', C4::Context->preference("TaxRates") ); > >+my $rr_qty = $input->param('rr_quantity_to_order'); >+ > my $quantity = >- $input->param('rr_quantity_to_order') >- ? $input->param('rr_quantity_to_order') >- : $data->{'quantity'}; >-$quantity //= 0; >+ defined $rr_qty >+ ? $rr_qty >+ : $data->{quantity}; >+ >+$quantity //= ( $basketobj->effective_create_items eq 'ordering' ? 0 : 1 ); > > # Get additional fields > my $record; >-- >2.52.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 41732
: 192146