Bugzilla – Attachment 76869 Details for
Bug 18639
Separate replacement cost and retail price fields in acquisitions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18639 - Add replacementprice field to acquisitions workflow
Bug-18639---Add-replacementprice-field-to-acquisit.patch (text/plain), 28.92 KB, created by
Martin Renvoize (ashimema)
on 2018-07-11 20:09:15 UTC
(
hide
)
Description:
Bug 18639 - Add replacementprice field to acquisitions workflow
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2018-07-11 20:09:15 UTC
Size:
28.92 KB
patch
obsolete
>From a0f9220c820462b04e83d91ed8d6bb91ff2877bf Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 29 Dec 2017 16:16:23 +0000 >Subject: [PATCH] Bug 18639 - Add replacementprice field to acquisitions > workflow > >To test: > 0 - Apply patches and updatedatabase > 1 - Add an order to a basket > 2 - You should note new 'Retail price field' > 3 - You should have a separate 'Replacement price' field > 4 - Enter values and ensure they are saved as expected > 5 - In the basket you should see the replacement price > 6 - Modify order and ensure value is loaded and saved correctly > 7 - Add and cancle an order and esure replacement price shows/saves > 8 - Close basket > 9 - Receive an order >10 - You should be able to edit replacement price >11 - 'retail price' field is not editable >12 - Check associated item, replacement price in item should be updated >13 - Cancel receipt, check item. receive again with new replacement >price, check item >14 - Price should be correctly updated >15 - Finish receipt, value should show in table >16 - Test with receive from file > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Acquisition.pm | 8 + > acqui/addorderiso2709.pl | 8 +- > acqui/finishreceive.pl | 6 +- > acqui/neworderempty.pl | 2 + > acqui/orderreceive.pl | 1 + > .../prog/en/modules/acqui/basket.tt | 6 + > .../prog/en/modules/acqui/invoice.tt | 5 + > .../prog/en/modules/acqui/neworderempty.tt | 8 +- > .../prog/en/modules/acqui/orderreceive.tt | 6 +- > .../prog/en/modules/acqui/parcel.tt | 197 +++++++++--------- > 10 files changed, 146 insertions(+), 101 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index a257017dc7..384b598e43 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -1507,6 +1507,10 @@ sub ModReceiveOrder { > orderstatus = 'complete' > |; > >+ $query .= q| >+ , replacementprice = ? >+ | if defined $order->{replacementprice}; >+ > $query .= q| > , unitprice = ?, unitprice_tax_included = ?, unitprice_tax_excluded = ? > | if defined $order->{unitprice}; >@@ -1528,6 +1532,10 @@ sub ModReceiveOrder { > my $sth = $dbh->prepare( $query ); > my @params = ( $quantrec, $datereceived, $invoice->{invoiceid}, ( $budget_id ? $budget_id : $order->{budget_id} ) ); > >+ if ( defined $order->{replacementprice} ) { >+ push @params, $order->{replacementprice}; >+ } >+ > if ( defined $order->{unitprice} ) { > push @params, $order->{unitprice}, $order->{unitprice_tax_included}, $order->{unitprice_tax_excluded}; > } >diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl >index 3ce7e1e133..0b619ee089 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -262,6 +262,7 @@ if ($op eq ""){ > ); > > my $price = $infos->{price}; >+ my $replacementprice = $infos->{replacementprice}; > if ($price){ > # in France, the cents separator is the , but sometimes, ppl use a . > # in this case, the price will be x100 when unformatted ! Replace the . by a , to get a proper price calculation >@@ -283,6 +284,7 @@ if ($op eq ""){ > } else { > $orderinfo{listprice} = 0; > } >+ $orderinfo{replacementprice} = $replacementprice || 0; > > # remove uncertainprice flag if we have found a price in the MARC record > $orderinfo{uncertainprice} = 0 if $orderinfo{listprice}; >@@ -511,8 +513,9 @@ sub import_biblios_list { > my ( $marcblob, $encoding ) = GetImportRecordMarc( $biblio->{'import_record_id'} ); > my $marcrecord = MARC::Record->new_from_usmarc($marcblob) || die "couldn't translate marc information"; > >- my $infos = get_infos_syspref('MarcFieldsToOrder', $marcrecord, ['price', 'quantity', 'budget_code', 'discount', 'sort1', 'sort2']); >+ my $infos = get_infos_syspref('MarcFieldsToOrder', $marcrecord, ['price', 'quantity', 'budget_code', 'discount', 'sort1', 'sort2','replacementprice']); > my $price = $infos->{price}; >+ my $replacementprice = $infos->{replacementprice}; > my $quantity = $infos->{quantity}; > my $budget_code = $infos->{budget_code}; > my $discount = $infos->{discount}; >@@ -566,7 +569,7 @@ sub import_biblios_list { > 'quantity' => $item_quantity, > 'budget_code' => $item_budget_code || $budget_code, > 'itemprice' => $item_price || $price, >- 'replacementprice' => $item_replacement_price, >+ 'replacementprice' => $item_replacement_price || $replacementprice, > 'itemcallnumber' => $item_callnumber, > ); > $all_items_quantity++; >@@ -583,6 +586,7 @@ sub import_biblios_list { > > if ($alliteminfos == -1 || scalar(@$alliteminfos) == 0) { > $cellrecord{price} = $price || ''; >+ $cellrecord{replacementprice} = $replacementprice || ''; > $cellrecord{quantity} = $quantity || ''; > $cellrecord{budget_id} = $budget_id || ''; > $cellrecord{discount} = $discount || ''; >diff --git a/acqui/finishreceive.pl b/acqui/finishreceive.pl >index 8c1439c2c8..c9870acc50 100755 >--- a/acqui/finishreceive.pl >+++ b/acqui/finishreceive.pl >@@ -48,6 +48,7 @@ my $origquantityrec = $input->param('origquantityrec'); > my $quantityrec = $input->param('quantityrec'); > my $quantity = $input->param('quantity'); > my $unitprice = $input->param('unitprice'); >+my $replacementprice = $input->param('replacementprice'); > my $datereceived = $input->param('datereceived'), > my $invoiceid = $input->param('invoiceid'); > my $invoice = GetInvoice($invoiceid); >@@ -59,6 +60,8 @@ my $order = GetOrder($ordernumber); > my $new_ordernumber = $ordernumber; > > $unitprice = Koha::Number::Price->new( $unitprice )->unformat(); >+$replacementprice = Koha::Number::Price->new( $replacementprice )->unformat(); >+warn "Replacement $replacementprice"; > my $basket = Koha::Acquisition::Orders->find( $ordernumber )->basket; > > #need old receivedate if we update the order, parcel.pl only shows the right parcel this way FIXME >@@ -85,6 +88,7 @@ if ($quantityrec > $origquantityrec ) { > > $order->{order_internalnote} = $input->param("order_internalnote"); > $order->{tax_rate_on_receiving} = $input->param("tax_rate"); >+ $order->{replacementprice} = $replacementprice; > $order->{unitprice} = $unitprice; > > $order = C4::Acquisition::populate_order_with_prices( >@@ -156,7 +160,7 @@ ModItem( > dateaccessioned => $datereceived, > datelastseen => $datereceived, > price => $unitprice, >- replacementprice => $order->{rrp}, >+ replacementprice => $replacementprice, > replacementpricedate => $datereceived, > }, > $biblionumber, >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index 6326eaf39b..0e6f2c14c2 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -371,6 +371,7 @@ if ( defined $from_subscriptionid ) { > $data->{tax_rate} = $lastOrderReceived->{tax_rate_on_ordering}; > $data->{discount} = $lastOrderReceived->{discount}; > $data->{rrp} = $lastOrderReceived->{rrp}; >+ $data->{replacementprice} = $lastOrderReceived->{replacementprice}; > $data->{ecost} = $lastOrderReceived->{ecost}; > $data->{quantity} = $lastOrderReceived->{quantity}; > $data->{unitprice} = $lastOrderReceived->{unitprice}; >@@ -454,6 +455,7 @@ $template->param( > quantity => $quantity, > quantityrec => $quantity, > rrp => $data->{'rrp'}, >+ replacementprice => $data->{'replacementprice'}, > gst_values => \@gst_values, > tax_rate => $data->{tax_rate_on_ordering} ? $data->{tax_rate_on_ordering}+0.0 : $bookseller->tax_rate ? $bookseller->tax_rate+0.0 : 0, > listprice => sprintf( "%.2f", $data->{listprice} || $data->{price} || $listprice), >diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl >index 4dbb5f0cb6..91c6e35d67 100755 >--- a/acqui/orderreceive.pl >+++ b/acqui/orderreceive.pl >@@ -213,6 +213,7 @@ $template->param( > quantityreceivedplus1 => $order->{'quantityreceived'} + 1, > quantityreceived => $order->{'quantityreceived'}, > rrp => $rrp, >+ replacementprice => $order->{'replacementprice'}, > ecost => $ecost, > unitprice => $unitprice, > tax_rate => $tax_rate, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >index e1ff9c5cbe..b6c6689ebe 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -357,6 +357,7 @@ > <th class="tax_excluded">ecost tax exc.</th> > <th class="tax_included">RRP tax inc.</th> > <th class="tax_included">ecost tax inc.</th> >+ <th class="replacementprice">Replacement price</th> > <th>Qty.</th> > <th class="tax_excluded">Total tax exc. ([% currency %])</th> > <th class="tax_included">Total tax inc. ([% currency %])</th> >@@ -381,6 +382,7 @@ > <th class="tax_excluded"> </th> > <th class="tax_included"> </th> > <th class="tax_included"> </th> >+ <th class="replacementprice"> </th> > <th>[% foot_loo.quantity %]</th> > <th class="tax_excluded">[% foot_loo.total_tax_excluded | $Price%]</th> > <th class="tax_included">[% foot_loo.total_tax_included | $Price %]</th> >@@ -403,6 +405,7 @@ > <th class="tax_excluded"> </th> > <th class="tax_included"> </th> > <th class="tax_included"> </th> >+ <th class="replacementprice"> </th> > <th>[% total_quantity %]</th> > <th class="tax_excluded">[% total_tax_excluded | $Price %]</th> > <th class="tax_included">[% total_tax_included | $Price %]</th> >@@ -478,6 +481,7 @@ > <td class="number tax_excluded [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_excluded | $Price%]</td> > <td class="number tax_included [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_included | $Price %]</td> > <td class="number tax_included [% IF books_loo.ecost_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_included | $Price %]</td> >+ <td class="number replacementprice [% IF books_loo.replacementprice.search(zero_regex) %]error[% END %]">[% books_loo.replacementprice | $Price %]</td> > <td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity %]</td> > <td class="number tax_excluded [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_excluded | $Price %]</td> > <td class="number tax_included [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_included | $Price %]</td> >@@ -540,6 +544,7 @@ > <th class="tax_excluded">ecost tax exc.</th> > <th class="tax_included">RRP tax inc.</th> > <th class="tax_included">ecost tax inc.</th> >+ <th class="replacementprice">Replacement price</th> > <th>Qty.</th> > <th class="tax_excluded">Total tax exc. ([% currency %])</th> > <th class="tax_included">Total tax inc. ([% currency %])</th> >@@ -592,6 +597,7 @@ > <td class="number tax_excluded">[% order.ecost_tax_excluded | $Price %]</td> > <td class="number tax_included">[% order.rrp_tax_included | $Price %]</td> > <td class="number tax_included">[% order.ecost_tax_included | $Price %]</td> >+ <td class="number replacementprice">[% order.replacementprice | $Price %]</td> > <td class="number">[% order.quantity %]</td> > <td class="number tax_excluded">[% order.total_tax_excluded | $Price %]</td> > <td class="number tax_included">[% order.total_tax_included | $Price %]</td> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >index ef9ebfdb3a..592246e86b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt >@@ -99,6 +99,7 @@ > <th>Library</th> > <th class="tax_excluded">Actual cost tax exc.</th> > <th class="tax_included">Actual cost tax inc.</th> >+ <th class="replacementprice">Replacement price</th> > <th>Qty.</th> > <th class="tax_excluded">Total tax exc. ([% currency.symbol %])</th> > <th class="tax_included">Total tax inc. ([% currency.symbol %])</th> >@@ -129,6 +130,7 @@ > <td><p>[% order.branchcode %]</p></td> > <td class="number tax_excluded">[% order.unitprice_tax_excluded | $Price %]</td> > <td class="number tax_included">[% order.unitprice_tax_included | $Price %]</td> >+ <td class="number replacementprice">[% order.replacementprice | $Price %]</td> > <td class="number">[% order.quantity %]</td> > <td class="number tax_excluded">[% order.total_tax_excluded | $Price %]</td> > <td class="number tax_included">[% order.total_tax_included | $Price %]</td> >@@ -144,6 +146,7 @@ > <th colspan="2">Total (GST [% tf.tax_rate * 100 %] %)</th> > <th class="tax_excluded"></th> > <th class="tax_included"></th> >+ <th class="replacementprice"/> > <th>[% tf.quantity %]</th> > <th class="tax_excluded">[% tf.total_tax_excluded | $Price %]</th> > <th class="tax_included">[% tf.total_tax_included | $Price %]</th> >@@ -156,6 +159,7 @@ > <th colspan="2">Total ([% currency.symbol %])</th> > <th class="tax_excluded"></th> > <th class="tax_included"></th> >+ <th class="replacementprice"/> > <th>[% total_quantity %]</th> > <th class="tax_excluded">[% total_tax_excluded | $Price %]</th> > <th class="tax_included">[% total_tax_included | $Price %]</th> >@@ -167,6 +171,7 @@ > <th colspan="2">Total + Shipment cost ([% currency.symbol %])</th> > <th class="tax_excluded"></th> > <th class="tax_included"></th> >+ <th class="replacementprice"/> > <th>[% total_quantity %]</th> > <th class="tax_excluded">[% total_tax_excluded_shipment | $Price %]</th> > <th class="tax_included">[% total_tax_included_shipment | $Price %]</th> >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 1a10af9f2c..905f4885ff 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >@@ -433,13 +433,17 @@ > </li> > <li> > [% IF ( close ) %] >- <span class="label">Replacement cost: </span> >+ <span class="label">Retail price: </span> > <input type="hidden" name="rrp" id="rrp" value="[% rrp %]" />[% rrp %] (adjusted for [% cur_active %], [% IF (listincgst == 1) %]tax inc.[% ELSE %]tax exc.[% END %]) > [% ELSE %] >- <label for="rrp">Replacement cost: </label> >+ <label for="rrp">Retail price: </label> > <input type="text" size="20" name="rrp" id="rrp" value="[% rrp %]" /> (adjusted for [% cur_active %], [% IF (listincgst == 1) %]tax inc.[% ELSE %]tax exc.[% END %]) > [% END %] > </li> >+ <li> >+ <label for="replacementprice">Replacement cost: </label> >+ <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% replacementprice %]" /> >+ </li> > <li> > <label for="ecost">Budgeted cost: </label> > <input type="text" size="20" name="ecost" id="ecost" value="[% ecost %]" readonly="readonly" /> [% IF (listincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %] >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 8bb78417fe..e6cd9cac52 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >@@ -238,7 +238,11 @@ > <input type="hidden" name="tax_rate" value="0" /> > [% END %] > >- <li><label for="rrp">Replacement cost: </label>[% rrp | $Price %]</li> >+ <li><label for="rrp">Retail price: </label>[% rrp | $Price %]</li> >+ <li> >+ <label for="replacementprice">Replacement price:</label> >+ <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% replacementprice | $Price %]" /> >+ </li> > <li><label for="ecost">Budgeted cost: </label>[% ecost | $Price %]</li> > <li> > <label for="unitprice">Actual cost:</label> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >index 37a35af775..36e7ab8691 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >@@ -102,6 +102,7 @@ > <th>Order line search</th> > <th>Summary search</th> > <th> </th> >+ <th>Replacement price search</th> > <th>Quantity search</th> > <th>Unit cost search</th> > <th>Order cost search</th> >@@ -115,6 +116,7 @@ > <th>Order line</th> > <th>Summary</th> > <th>More</th> >+ <th>Replacement price</th> > <th>Quantity</th> > <th>Unit cost</th> > <th>Order cost</th> >@@ -167,6 +169,7 @@ > <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% loop_order.biblionumber %]" class="previewData">MARC</a><br> > <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% loop_order.biblionumber %]" class="previewData">Card</a> > </td> >+ <td>[% loop_order.replacementprice | $Price %]</td> > <td>[% loop_order.quantity %]</td> > <td>[% loop_order.ecost | $Price %]</td> > <td>[% loop_order.total | $Price %]</td> >@@ -227,6 +230,7 @@ > <th title="Item holds / Total holds">Holds</th> > <th>Summary</th> > <th>More</th> >+ <th>Replacement price</th> > <th>Quantity</th> > <th>Fund</th> > <th>Est cost</th> >@@ -318,6 +322,7 @@ > <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% order.biblionumber %]" class="previewData">MARC</a><br> > <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&id=[% order.biblionumber %]" class="previewData">Card</a> > </td> >+ <td>[% order.replacementprice | $Price %]</td> > <td>[% order.quantityreceived %]</td> > <td>[% order.budget.budget_name %]</td> > <td>[% order.ecost | $Price %]</td> >@@ -437,96 +442,98 @@ > [% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") %] > <style type="text/css">#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style> > <script type="text/javascript"> >- >+ > dt_overwrite_html_sorting_localeCompare(); > var sticky_filters = [% sticky_filters %]; >- >+ > $(document).ready(function(){ >- if ( $("#pendingt").length ) { >- var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, { >- "bStateSave": true, >- "iCookieDuration": 60*60*24*1000, // 1000 days >- "iDisplayLength": 10, >- "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]], >- "aoColumnDefs": [ >- { "aTargets": [ 4, 9, 10 ], "bSortable": false, "bSearchable": false }, >- ], >- "aoColumns": [ >- { "sType": "html" }, >- { "sType": "html" }, >- { "sType": "num-html" }, >- { "sType": "anti-the" }, >- null, >- null, >- null, >- null, >- null, >- null, >- null, >- ], >- 'bAutoWidth': false, >- "sPaginationType": "four_button" >- }) >- ).columnFilter({ >- sPlaceHolder: "head:after", >- aoColumns: [ >- { type: "text" }, >- { type: "text" }, >- { type: "text" }, >- { type: "text" }, >- null, >- { type: "text" }, >- { type: "text" }, >- { type: "text" }, >- { type: "text" }, >- null, >- null >- ] >- }); >- } >- >- if ( $("#receivedt").length ) { >- var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, { >- "bStateSave": true, >- "iCookieDuration": 60*60*24*1000, // 1000 days >- "iDisplayLength": 10, >- "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]], >- "aoColumnDefs": [ >- { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false }, >- ], >- "aoColumns": [ >- { "sType": "html" }, >- { "sType": "html" }, >- { "sType": "html" }, >- { "sType": "num-html" }, >- { "sType": "anti-the" }, >- null, >- null, >- null, >- null, >- null, >- null, >- null >- ], >- "sPaginationType": "four_button" >- })); >- } >- >- // Keep filters from finishreceive.pl to parcel.pl >+ if ( $("#pendingt").length ) { >+ var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "bStateSave": true, >+ "iCookieDuration": 60*60*24*1000, // 1000 days >+ "iDisplayLength": 10, >+ "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]], >+ "aoColumnDefs": [ >+ { "aTargets": [ 4, 9, 10 ], "bSortable": false, "bSearchable": false }, >+ ], >+ "aoColumns": [ >+ { "sType": "html" }, >+ { "sType": "html" }, >+ { "sType": "num-html" }, >+ { "sType": "anti-the" }, >+ null, >+ null, >+ null, >+ null, >+ null, >+ null, >+ null, >+ null, >+ ], >+ 'bAutoWidth': false, >+ "sPaginationType": "four_button" >+ } ) >+ ).columnFilter({ >+ sPlaceHolder: "head:after", >+ aoColumns: [ >+ { type: "text" }, >+ { type: "text" }, >+ { type: "text" }, >+ { type: "text" }, >+ null, >+ { type: "text" }, >+ { type: "text" }, >+ { type: "text" }, >+ { type: "text" }, >+ { type: "text" }, >+ null, >+ null >+ ] >+ }); >+ } >+ >+ if ( $("#receivedt").length ) { >+ var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "bStateSave": true, >+ "iCookieDuration": 60*60*24*1000, // 1000 days >+ "iDisplayLength": 10, >+ "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]], >+ "aoColumnDefs": [ >+ { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false }, >+ ], >+ "aoColumns": [ >+ { "sType": "html" }, >+ { "sType": "html" }, >+ { "sType": "html" }, >+ { "sType": "num-html" }, >+ { "sType": "anti-the" }, >+ null, >+ null, >+ null, >+ null, >+ null, >+ null, >+ null >+ ], >+ "sPaginationType": "four_button" >+ })); >+ } >+ >+ // Keep filters from finishreceive.pl to parcel.pl >+ $.cookie("filter_parcel_summary", $("#summaryfilter").val()); >+ $.cookie("filter_parcel_basketname", $("#basketfilter").val()); >+ $.cookie("filter_parcel_orderno", $("#orderfilter").val()); >+ $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val()); >+ $.cookie("filter_parcel_ean", $("#eanfilter").val()); >+ >+ $("#filterform").on('submit', function(){ > $.cookie("filter_parcel_summary", $("#summaryfilter").val()); > $.cookie("filter_parcel_basketname", $("#basketfilter").val()); > $.cookie("filter_parcel_orderno", $("#orderfilter").val()); > $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val()); > $.cookie("filter_parcel_ean", $("#eanfilter").val()); >- >- $("#filterform").on('submit', function(){ >- $.cookie("filter_parcel_summary", $("#summaryfilter").val()); >- $.cookie("filter_parcel_basketname", $("#basketfilter").val()); >- $.cookie("filter_parcel_orderno", $("#orderfilter").val()); >- $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val()); >- $.cookie("filter_parcel_ean", $("#eanfilter").val()); >- }); >- >+ }); >+ > $(".previewData").on("click", function(e){ > e.preventDefault(); > var ltitle = $(this).text(); >@@ -539,24 +546,24 @@ > $("#dataPreviewLabel").html(""); > $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); > }); >- >- }); >- >- // Case-insensitive version of jquery's contains function >- jQuery.extend(jQuery.expr[':'], { >- icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0" >+ > }); >- >+ >+ // Case-insensitive version of jquery's contains function >+ jQuery.extend(jQuery.expr[':'], { >+ icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0" >+ }); >+ > // Contains exactly function >- jQuery.extend(jQuery.expr[':'], { >- containsExactly: "$(a).text() == m[3]" >- }); >- >- function transfer_order_popup(ordernumber) { >+ jQuery.extend(jQuery.expr[':'], { >+ containsExactly: "$(a).text() == m[3]" >+ }); >+ >+ function transfer_order_popup(ordernumber) { > var url = "/cgi-bin/koha/acqui/transferorder.pl?" > + "ordernumber=" + ordernumber > window.open(url, 'TransferOrder'); >- } >+ } > </script> > [% END %] > >-- >2.17.1
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 18639
:
70213
|
70214
|
70215
|
70216
|
75946
|
76867
|
76868
|
76869
|
76870
|
76871
|
78184
|
78185
|
78186
|
78187
|
78188
|
78189
|
78191
|
78249
|
78250
|
78251
|
78252
|
78253
|
78254
|
78255
|
78256
|
79789