Bugzilla – Attachment 79867 Details for
Bug 20817
Add ability to retain 9xx fields when adding on order item to existing record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20817 - Add ability to retain 9xx fields when adding on order item to existing record
Bug-20817---Add-ability-to-retain-9xx-fields-when-.patch (text/plain), 6.37 KB, created by
Devinim
on 2018-10-03 13:15:40 UTC
(
hide
)
Description:
Bug 20817 - Add ability to retain 9xx fields when adding on order item to existing record
Filename:
MIME Type:
Creator:
Devinim
Created:
2018-10-03 13:15:40 UTC
Size:
6.37 KB
patch
obsolete
>From bb25c9b85d31e8093f97a5d12c64a597308def74 Mon Sep 17 00:00:00 2001 >From: DEVINIM <kohadevinim@devinim.com.tr> >Date: Wed, 3 Oct 2018 13:12:16 +0000 >Subject: [PATCH] Bug 20817 - Add ability to retain 9xx fields when adding on > order item to existing record > >--- > acqui/addorder.pl | 5 ++ > acqui/neworderempty.pl | 9 +++ > .../prog/en/modules/acqui/neworderempty.tt | 75 ++++++++++++++++++++++ > 3 files changed, 89 insertions(+) > >diff --git a/acqui/addorder.pl b/acqui/addorder.pl >index 17b50e6185..1f7ee00679 100755 >--- a/acqui/addorder.pl >+++ b/acqui/addorder.pl >@@ -299,6 +299,11 @@ if ( $basket->{is_standing} || $orderinfo->{quantity} ne '0' ) { > $order->store; > } > >+ my @items = $input->multi_param('itemnumber'); >+ foreach my $item ( @items ) { >+ $order->add_item($item); >+ } >+ > # now, add items if applicable > if ($basket->effective_create_items eq 'ordering') { > >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index 0e6f2c14c2..60894dd402 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -185,6 +185,15 @@ if ( not $ordernumber ) { # create order > > if ( $biblionumber ) { > $data = GetBiblioData($biblionumber); >+ >+ # get existing items not previously ordered in existing record >+ my @all_items = GetItemsInfo( $biblionumber ); >+ my @items; >+ foreach my $item ( @all_items ){ >+ my $acqitem = Koha::Database->new->schema->resultset('AqordersItem')->find($item->{itemnumber}); >+ push @items, $item unless( $acqitem ); >+ } >+ $template->param( existingitems => \@items ); > } > # get suggestion fields if applicable. If it's a subscription renewal, then the biblio already exists > # otherwise, retrieve suggestion information. >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 cd6837acb8..3899ef45e8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >@@ -246,6 +246,60 @@ > </fieldset> > [% END %] > >+ [% IF ( existingitems ) %] >+ <fieldset class="rows"> >+ <legend>Existing Items</legend> >+ <div id="existing_items_list" > >+ <div style="width:100%;overflow:auto;"> >+ <table> >+ <thead> >+ <tr> >+ <th> </th> >+ <th>Barcode</th> >+ <th>Home library</th> >+ <th>Holding library</th> >+ <th>Not for loan</th> >+ <th>Restricted</th> >+ <th>Location</th> >+ <th>Call number</th> >+ <th>Copy number</th> >+ <th>Inventory number</th> >+ <th>Collection code</th> >+ <th>Item type</th> >+ <th>Materials</th> >+ <th>Price</th> >+ <th>Notes</th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH item IN existingitems %] >+ <tr> >+ <td style="text-align:center;vertical-align:middle"> >+ <input type="checkbox" value="[% item.itemnumber %]" name="itemnumber" data-price="[% item.price %]"/> >+ </td> >+ <td>[% item.barcode %]</td> >+ <td>[% item.homebranch %]</td> >+ <td>[% item.holdingbranch %]</td> >+ <td>[% item.notforloan %]</td> >+ <td>[% item.restricted %]</td> >+ <td>[% item.location %]</td> >+ <td>[% item.itemcallnumber %]</td> >+ <td>[% item.copynumber %]</td> >+ <td>[% item.stocknumber %]</td> >+ <td>[% item.ccode %]</td> >+ <td>[% item.itype %]</td> >+ <td>[% item.materials %]</td> >+ <td>[% item.price %]</td> >+ <td>[% item.itemnotes %]</td> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+ </div> >+ </div> >+ </fieldset> >+ [% END %] >+ > [% UNLESS subscriptionid || basket.is_standing %][% # it is a suggestion, we have not items %] > [% IF (AcqCreateItemOrdering) %] > >@@ -611,6 +665,27 @@ > } > > $(document).ready(function(){ >+ $("input[name='itemnumber'][type='checkbox']").change(function() { >+ if (this.checked) { >+ var number = new Number( $("#quantity").val() ); >+ $("#quantity").val( number+1 ); >+ var price = new Number( $(this).attr("data-price") ); >+ var total = new Number( $("#total").val() ); >+ var listprice = new Number( (total+price)/Number( $("#quantity").val() ) ); >+ $("#listprice").val( listprice ); >+ updateCosts(); >+ } else { >+ var number = new Number( $("#quantity").val() ); >+ $("#quantity").val( number-1 ); >+ var price = new Number( $(this).attr("data-price") ); >+ var total = new Number( $("#total").val() ); >+ var listprice = new Number( (total-price)/Number( $("#quantity").val() ) ); >+ if( isNaN( listprice ) ) listprice = 0; >+ $("#listprice").val( listprice ); >+ updateCosts(); >+ } >+ }); >+ > [% IF AcqCreateItemOrdering and not basket.is_standing %] > cloneItemBlock(0, '[% UniqueItemFields | html %]'); > [% END %] >-- >2.11.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 20817
:
79867
|
80537
|
86711
|
86746
|
105214
|
105215
|
105216
|
105217
|
105218
|
105219
|
115343
|
118371
|
118372
|
118373
|
118374
|
118375
|
118376
|
118377
|
118378
|
122692
|
122834
|
122841
|
122858
|
122861
|
128766
|
128767
|
128768
|
128769
|
128770
|
128771
|
128772
|
128773
|
128774
|
128775
|
128776
|
128777
|
128782
|
128783
|
128785
|
128786
|
128787
|
128788
|
128789
|
128790
|
128791
|
128792
|
128793
|
128794
|
128795
|
128796
|
128797
|
128798
|
131732
|
131733
|
131734
|
131735
|
131736
|
131737
|
131738
|
131739
|
131740
|
131741
|
131742
|
131743
|
131744
|
131745
|
131746
|
131747
|
131748
|
131749
|
142630
|
142631
|
142632
|
142633
|
142634
|
142635
|
142636
|
142637
|
142638
|
142639
|
142640
|
142641
|
142642
|
142643
|
142644
|
142645
|
142646
|
142647
|
142648
|
142649
|
142650
|
142651
|
142829