Bugzilla – Attachment 155580 Details for
Bug 34708
Ability to modify an order line to increase quantity of ordered item
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34708: Add ability to modify orderline to increase quantity
Bug-34708-Add-ability-to-modify-orderline-to-incre.patch (text/plain), 6.60 KB, created by
Aleisha Amohia
on 2023-09-12 23:59:17 UTC
(
hide
)
Description:
Bug 34708: Add ability to modify orderline to increase quantity
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2023-09-12 23:59:17 UTC
Size:
6.60 KB
patch
obsolete
>From dded2a38f5a3151651880b38d7900b1d18ede63c Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Mon, 11 Sep 2023 20:38:12 +0000 >Subject: [PATCH] Bug 34708: Add ability to modify orderline to increase > quantity > >This enhancement allows libraries to modify an existing orderline and increase the quantity in the order. The quantity is increased by adding more items to the order, through the usual Item for which is visible when adding or modifying an order. > >To test: > >1. Ensure you have a budget, fund, vendor etc. to use the Acquisitions module >2. Open a new basket. Make sure you do NOT check the 'orders are standing' option >3. Add an order to the basket using any method. Add an item or more to this orderline and save the order to the basket >4. Click Modify to edit the orderline >5. Notice the quantity text field. Try to directly change this number. You'll get an error pop-up and be redirected back to the basket. > >6. Apply the patch, restart services, refresh the basket page > >7. Click Modify to edit the orderline >8. Notice the item form and Items list table is visible with your existing item(s) for this order. There should be no Action buttons as actions can't be done on an existing item order. >9. Confirm you are able to add more items to the Items list and to the order by filling out the form and clicking 'Add item' as normal. Confirm the quantity increases accordingly. >10. Confirm the Edit and Delete buttons for newly added items work as expected >11. Save and confirm the quantity for the orderline has increased >12. Confirm this behaviour persists with the other methods of adding new orders to a basket > >Sponsored-by: Pymble Ladies' College >--- > acqui/neworderempty.pl | 5 +++- > .../prog/en/modules/acqui/neworderempty.tt | 27 +++++++++++++++++-- > 2 files changed, 29 insertions(+), 3 deletions(-) > >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index 2557a4c51b4..25b1987e36c 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -349,7 +349,7 @@ foreach my $r (@{$budgets}) { > $template->param( sort1 => $data->{'sort1'} ); > $template->param( sort2 => $data->{'sort2'} ); > >-if ($basketobj->effective_create_items eq 'ordering' && !$ordernumber) { >+if ($basketobj->effective_create_items eq 'ordering') { > # Check if ACQ framework exists > my $marc = GetMarcStructure(1, 'ACQ', { unsafe => 1 } ); > unless($marc) { >@@ -420,11 +420,13 @@ $quantity //= 0; > my $record; > my @additional_fields = Koha::AdditionalFields->search({ tablename => 'aqorders' })->as_list; > my %additional_field_values; >+my $items; > if ($ordernumber) { > my $order = Koha::Acquisition::Orders->find($ordernumber); > foreach my $value ($order->additional_field_values->as_list) { > $additional_field_values{$value->field_id} = $value->value; > } >+ $items = $order->items; > } elsif ( $biblionumber ) { > foreach my $af (@additional_fields) { > if ($af->marcfield) { >@@ -437,6 +439,7 @@ if ($ordernumber) { > $template->param( > additional_fields => \@additional_fields, > additional_field_values => \%additional_field_values, >+ items => $items, > ); > > # fill template >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >index 4523300a8da..971346842ef 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >@@ -5,6 +5,7 @@ > [% USE Price %] > [% USE ItemTypes %] > [% USE AuthorisedValues %] >+[% USE Branches %] > [% PROCESS 'i18n.inc' %] > [% INCLUDE 'doc-head-open.inc' %] > <title>[% FILTER collapse %] >@@ -132,6 +133,10 @@ > } > > $(document).ready(function(){ >+ [% UNLESS ordernumber %] >+ $("#items_list").hide(); >+ [% END %] >+ > [% IF AcqCreateItemOrdering and not basket.is_standing %] > cloneItemBlock(0, '[% UniqueItemFields | html %]'); > [% END %] >@@ -490,7 +495,7 @@ > [% UNLESS subscriptionid || basket.is_standing %][% # it is a suggestion, we have not items %] > [% IF (AcqCreateItemOrdering) %] > >- <div id="items_list" class="page-section" style="display:none"> >+ <div id="items_list" class="page-section"> > <p><strong>Items list</strong></p> > <div style="width:100%;overflow:auto;"> > <table> >@@ -513,6 +518,24 @@ > </tr> > </thead> > <tbody> >+ [% FOREACH item IN items %] >+ <tr idblock="itemblock[% item.id | html %]"> >+ <td> </td> >+ <td>[% item.barcode | html %]</td> >+ <td>[% Branches.GetName(item.homebranch) | html %]</td> >+ <td>[% Branches.GetName(item.holdingbranch) | html %]</td> >+ <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) | html %]</td> >+ <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.restricted', authorised_value => item.restricted ) | html %]</td> >+ <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => item.location ) | html %]</td> >+ <td>[% item.itemcallnumber | html %]</td> >+ <td>[% item.copynumber | html %]</td> >+ <td>[% item.stocknumber | html %]</td> >+ <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => item.ccode ) | html %]</td> >+ <td>[% ItemTypes.GetDescription( item.itype ) | html %]</td> >+ <td>[% item.materials | html %]</td> >+ <td>[% item.itemnotes | html %]</td> >+ </tr> >+ [% END %] > </tbody> > </table> > </div> >@@ -544,7 +567,7 @@ > [% IF basket.is_standing %] > <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" /> > [% ELSE %] >- <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="0" /> >+ <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="[% quantityrec | html %]" /> > [% END %] > [% ELSE %] > [% IF basket.is_standing %] >-- >2.30.2
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 34708
:
155520
|
155580
|
156039
|
158407