Bugzilla – Attachment 35994 Details for
Bug 11062
Invoice's shipment/shipping cost should be included PRE-gst tax (as an option)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11062: rename shipmentcost with shipping
Bug-11062-rename-shipmentcost-with-shipping.patch (text/plain), 16.41 KB, created by
Jonathan Druart
on 2015-02-18 15:45:53 UTC
(
hide
)
Description:
Bug 11062: rename shipmentcost with shipping
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-02-18 15:45:53 UTC
Size:
16.41 KB
patch
obsolete
>From bd445c3b974457ca896bde93236b22a9100f258c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 13 Feb 2015 14:53:10 +0100 >Subject: [PATCH] Bug 11062: rename shipmentcost with shipping > >For more consistency, the shipmentcost variables and labels will be >renamed with shipping. >--- > C4/Acquisition.pm | 12 ++++++------ > C4/Budgets.pm | 12 ++++++------ > acqui/invoice.pl | 10 +++++----- > acqui/orderreceive.pl | 6 +++--- > acqui/parcels.pl | 6 +++--- > acqui/spent.pl | 12 ++++++------ > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt | 12 ++++++------ > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt | 6 +++--- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt | 8 ++++---- > 9 files changed, 42 insertions(+), 42 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 8c52de3..75a4784 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -2408,7 +2408,7 @@ Return a list of invoices that match all given criteria. > > $order_by is "column_name (asc|desc)", where column_name is any of > 'invoicenumber', 'booksellerid', 'shipmentdate', 'billingdate', 'closedate', >-'shipmentcost', 'shipmentcost_budgetid'. >+'shipping', 'shipmentcost_budgetid'. > > asc is the default if omitted > >@@ -2418,7 +2418,7 @@ sub GetInvoices { > my %args = @_; > > my @columns = qw(invoicenumber booksellerid shipmentdate billingdate >- closedate shipmentcost shipmentcost_budgetid); >+ closedate shipping shipmentcost_budgetid); > > my $dbh = C4::Context->dbh; > my $query = qq{ >@@ -2608,7 +2608,7 @@ sub GetInvoiceDetails { > shipmentdate => $shipmentdate, > billingdate => $billingdate, > closedate => $closedate, >- shipmentcost => $shipmentcost, >+ shipping => $shipping, > shipmentcost_budgetid => $shipmentcost_budgetid > ); > >@@ -2622,7 +2622,7 @@ sub AddInvoice { > return unless(%invoice and $invoice{invoicenumber}); > > my @columns = qw(invoicenumber booksellerid shipmentdate billingdate >- closedate shipmentcost shipmentcost_budgetid); >+ closedate shipping shipmentcost_budgetid); > > my @set_strs; > my @set_args; >@@ -2656,7 +2656,7 @@ sub AddInvoice { > shipmentdate => $shipmentdate, > billingdate => $billingdate, > closedate => $closedate, >- shipmentcost => $shipmentcost, >+ shipping => $shipping, > shipmentcost_budgetid => $shipmentcost_budgetid > ); > >@@ -2672,7 +2672,7 @@ sub ModInvoice { > return unless(%invoice and $invoice{invoiceid}); > > my @columns = qw(invoicenumber booksellerid shipmentdate billingdate >- closedate shipmentcost shipmentcost_budgetid); >+ closedate shipping shipmentcost_budgetid); > > my @set_strs; > my @set_args; >diff --git a/C4/Budgets.pm b/C4/Budgets.pm >index a78b44f..b1c8cc1 100644 >--- a/C4/Budgets.pm >+++ b/C4/Budgets.pm >@@ -344,14 +344,14 @@ sub GetBudgetSpent { > my $sum = $sth->fetchrow_array; > > $sth = $dbh->prepare(qq| >- SELECT SUM(shipmentcost) AS sum >+ SELECT SUM(shipping) AS sum > FROM aqinvoices > WHERE shipmentcost_budgetid = ? > AND closedate IS NOT NULL > |); > $sth->execute($budget_id); >- my ($shipmentcost_sum) = $sth->fetchrow_array; >- $sum += $shipmentcost_sum; >+ my ($shipping_sum) = $sth->fetchrow_array; >+ $sum += $shipping_sum; > > return $sum; > } >@@ -370,14 +370,14 @@ sub GetBudgetOrdered { > my $sum = $sth->fetchrow_array; > > $sth = $dbh->prepare(qq| >- SELECT SUM(shipmentcost) AS sum >+ SELECT SUM(shipping) AS sum > FROM aqinvoices > WHERE shipmentcost_budgetid = ? > AND closedate IS NULL > |); > $sth->execute($budget_id); >- my ($shipmentcost_sum) = $sth->fetchrow_array; >- $sum += $shipmentcost_sum; >+ my ($shipping_sum) = $sth->fetchrow_array; >+ $sum += $shipping_sum; > > return $sum; > } >diff --git a/acqui/invoice.pl b/acqui/invoice.pl >index 9fcef0e..7fcd365 100755 >--- a/acqui/invoice.pl >+++ b/acqui/invoice.pl >@@ -78,13 +78,13 @@ elsif ( $op && $op eq 'reopen' ) { > elsif ( $op && $op eq 'mod' ) { > my $shipmentdate = $input->param('shipmentdate'); > my $billingdate = $input->param('billingdate'); >- my $shipmentcost = $input->param('shipmentcost'); >+ my $shipping = $input->param('shipping'); > my $shipment_budget_id = $input->param('shipment_budget_id'); > ModInvoice( > invoiceid => $invoiceid, > shipmentdate => C4::Dates->new($shipmentdate)->output("iso"), > billingdate => C4::Dates->new($billingdate)->output("iso"), >- shipmentcost => $shipmentcost, >+ shipping => $shipping, > shipmentcost_budgetid => $shipment_budget_id > ); > if ($input->param('reopen')) { >@@ -167,15 +167,15 @@ $template->param( > shipmentdate => $details->{'shipmentdate'}, > billingdate => $details->{'billingdate'}, > invoiceclosedate => $details->{'closedate'}, >- shipmentcost => $details->{'shipmentcost'}, >+ shipping => $details->{'shipping'}, > orders_loop => \@orders_loop, > foot_loop => \@foot_loop, > total_quantity => $total_quantity, > total_tax_excluded => $total_tax_excluded, > total_tax_included => $total_tax_included, > total_tax_value => $total_tax_value, >- total_tax_excluded_shipment => $total_tax_excluded + $details->{shipmentcost}, >- total_tax_included_shipment => $total_tax_included + $details->{shipmentcost}, >+ total_tax_excluded_shipment => $total_tax_excluded + $details->{shipping}, >+ total_tax_included_shipment => $total_tax_included + $details->{shipping}, > invoiceincgst => $bookseller->{invoiceincgst}, > currency => GetCurrency()->{currency}, > budgets_loop => \@budgets_loop, >diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl >index 23b1b8f..b32c520 100755 >--- a/acqui/orderreceive.pl >+++ b/acqui/orderreceive.pl >@@ -42,7 +42,7 @@ to know on what supplier this script has to display receive order. > > the id of this invoice. > >-=item freight >+=item shipping > > =item biblio > >@@ -84,7 +84,7 @@ my $dbh = C4::Context->dbh; > my $invoiceid = $input->param('invoiceid'); > my $invoice = GetInvoice($invoiceid); > my $booksellerid = $invoice->{booksellerid}; >-my $freight = $invoice->{shipmentcost}; >+my $shipping = $invoice->{shipping}; > my $datereceived = $invoice->{shipmentdate}; > my $ordernumber = $input->param('ordernumber'); > >@@ -205,7 +205,7 @@ $template->param( > ordernumber => $order->{'ordernumber'}, > subscriptionid => $order->{subscriptionid}, > booksellerid => $order->{'booksellerid'}, >- freight => $freight, >+ shipping => $shipping, > name => $bookseller->{'name'}, > date => format_date($order->{entrydate}), > title => $order->{'title'}, >diff --git a/acqui/parcels.pl b/acqui/parcels.pl >index e3b8f5f..952d0f2 100755 >--- a/acqui/parcels.pl >+++ b/acqui/parcels.pl >@@ -101,7 +101,7 @@ our ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( > > my $invoicenumber = $input->param('invoice'); > my $shipmentdate = $input->param('shipmentdate'); >-my $shipmentcost = $input->param('shipmentcost'); >+my $shipping = $input->param('shipping'); > my $shipmentcost_budgetid = $input->param('shipmentcost_budgetid'); > if($shipmentdate) { > $shipmentdate = C4::Dates->new($shipmentdate)->output('iso'); >@@ -117,7 +117,7 @@ if ( $op and $op eq 'new' ) { > $template->{'VARS'}->{'duplicate_invoices'} = \@invoices; > $template->{'VARS'}->{'invoicenumber'} = $invoicenumber; > $template->{'VARS'}->{'shipmentdate'} = $shipmentdate; >- $template->{'VARS'}->{'shipmentcost'} = $shipmentcost; >+ $template->{'VARS'}->{'shipping'} = $shipping; > $template->{'VARS'}->{'shipmentcost_budgetid'} = > $shipmentcost_budgetid; > } >@@ -129,7 +129,7 @@ if ($op and $op eq 'confirm') { > invoicenumber => $invoicenumber, > booksellerid => $booksellerid, > shipmentdate => $shipmentdate, >- shipmentcost => $shipmentcost, >+ shipping => $shipping, > shipmentcost_budgetid => $shipmentcost_budgetid, > ); > if(defined $invoiceid) { >diff --git a/acqui/spent.pl b/acqui/spent.pl >index c3c4693..852f795 100755 >--- a/acqui/spent.pl >+++ b/acqui/spent.pl >@@ -105,19 +105,19 @@ while ( my $data = $sth->fetchrow_hashref ) { > > my $total = $subtotal; > $query = qq{ >- SELECT invoicenumber, shipmentcost >+ SELECT invoicenumber, shipping > FROM aqinvoices > WHERE shipmentcost_budgetid = ? > }; > $sth = $dbh->prepare($query); > $sth->execute($bookfund); >-my @shipmentcosts; >+my @shippings; > while (my $data = $sth->fetchrow_hashref) { >- push @shipmentcosts, { >- shipmentcost => sprintf("%.2f", $data->{shipmentcost}), >+ push @shippings, { >+ shipping => sprintf("%.2f", $data->{shipping}), > invoicenumber => $data->{invoicenumber} > }; >- $total += $data->{shipmentcost}; >+ $total += $data->{shipping}; > } > $sth->finish; > >@@ -127,7 +127,7 @@ $template->param( > fund => $bookfund, > spent => \@spent, > subtotal => $subtotal, >- shipmentcosts => \@shipmentcosts, >+ shippings => \@shippings, > total => $total, > fund_code => $fund_code > ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >index 456a231..4df2a9c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt >@@ -46,7 +46,7 @@ $(document).ready(function() { > 'invoicenumber': $(row).find('td:nth-child(2) a').text(), > 'shipmentdate': $(row).attr('data-shipmentdate'), > 'billingdate': $(row).attr('data-billingdate'), >- 'shipmentcost': $(row).attr('data-shipmentcost'), >+ 'shipping': $(row).attr('data-shipping'), > 'shipment_budgetid': $(row).attr('data-shipment_budgetid'), > 'closedate': $(row).attr('data-closedate'), }); > $('#merge_invoice_form').append('<input type="hidden" name="merge" value="' + $(row).attr('data-invoiceid') + '" />'); >@@ -56,13 +56,13 @@ $(document).ready(function() { > } else { > $('#merge_table tbody').empty(); > $.each(invoices, function (idx, invoice) { >- var row = $('<tr data-invoiceid="' + invoice.invoiceid + '"><td>' + invoice.invoicenumber + '</td><td>' + invoice.shipmentdate + '</td><td>' + invoice.billingdate + '</td><td>' + invoice.shipmentcost + '</td></tr>'); >+ var row = $('<tr data-invoiceid="' + invoice.invoiceid + '"><td>' + invoice.invoicenumber + '</td><td>' + invoice.shipmentdate + '</td><td>' + invoice.billingdate + '</td><td>' + invoice.shipping + '</td></tr>'); > $(row).appendTo('#merge_table tbody'); > $(row).click(function () { > $('#merge_table tbody tr').removeClass('active'); > $(this).addClass('active'); > $('#merge_invoicenumber').text(invoice.invoicenumber); >- $.each(['invoiceid', 'shipmentdate', 'billingdate', 'shipmentcost', 'shipment_budgetid'], function (idx, prop) { >+ $.each(['invoiceid', 'shipmentdate', 'billingdate', 'shipping', 'shipment_budgetid'], function (idx, prop) { > $('#merge_' + prop).val(invoice[prop]); > }); > if (invoice.closedate) { >@@ -115,7 +115,7 @@ $(document).ready(function() { > </thead> > <tbody> > [% FOREACH invoice IN invoices %] >- <tr data-invoiceid="[% invoice.invoiceid %]" data-booksellerid="[% invoice.booksellerid %]" data-shipmentdate="[% invoice.shipmentdate | $KohaDates %]" data-billingdate="[% invoice.billingdate | $KohaDates %]" data-shipmentcost="[% invoice.shipmentcost %]" data-shipment_budgetid="[% invoice.shipmentcost_budgetid %]" data-closedate="[% invoice.closedate | $KohaDates %]"> >+ <tr data-invoiceid="[% invoice.invoiceid %]" data-booksellerid="[% invoice.booksellerid %]" data-shipmentdate="[% invoice.shipmentdate | $KohaDates %]" data-billingdate="[% invoice.billingdate | $KohaDates %]" data-shipping="[% invoice.shipping %]" data-shipment_budgetid="[% invoice.shipmentcost_budgetid %]" data-closedate="[% invoice.closedate | $KohaDates %]"> > <td>[% invoice.is_linked_to_subscriptions %]</td> > <td><input type="checkbox" class="select-invoice" value="[% invoice.invoiceid %]" /></td> > <td><a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% invoice.invoiceid %]">[% invoice.invoicenumber %]</a></td> >@@ -177,8 +177,8 @@ $(document).ready(function() { > <li><label for="merge_billingdate">Billing date:</label> > <input type="text" size="10" id="merge_billingdate" name="billingdate" value="" readonly="readonly" class="datepicker" /></li> > >- <li><label for="merge_shipmentcost">Shipment cost:</label> >- <input type="text" size="10" id="merge_shipmentcost" name="shipmentcost" value="" /></li> >+ <li><label for="merge_shipping">Shipping:</label> >+ <input type="text" size="10" id="merge_shipping" name="shipping" value="" /></li> > <li><label for="merge_shipment_budgetid">Fund:</label> > <select id="merge_shipment_budgetid" name="shipment_budget_id"> > <option value="">No fund</option> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt >index 147a26f..a871298 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tt >@@ -71,7 +71,7 @@ > <input type="hidden" name="op" value="confirm" /> > <input type="hidden" name="invoice" value="[% invoicenumber %]" /> > <input type="hidden" name="shipmentdate" value="[% shipmentdate | $KohaDates %]" /> >- <input type="hidden" name="shipmentcost" value="[% shipmentcost %]" /> >+ <input type="hidden" name="shipping" value="[% shipping %]" /> > <input type="hidden" name="shipmentcost_budgetid" value="[% shipmentcost_budgetid %]" /> > <input type="submit" class="button" value="Create new invoice anyway" /> > </form> >@@ -176,8 +176,8 @@ > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > <li> >- <label for="shipmentcost">Shipping cost: </label> >- <input type="text" id="shipmentcost" name="shipmentcost" size="10" /> >+ <label for="shipping">Shipping cost: </label> >+ <input type="text" id="shipping" name="shipping" size="10" /> > </li> > <li> > <label for="shipmentcost_budgetid">Fund: </label> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt >index dbc69d6..c35ca5f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt >@@ -91,16 +91,16 @@ > </tr> > [% END %] > <tfoot> >- [% IF shipmentcosts.size %] >+ [% IF shippings.size %] > <tr valign="top"> > <td colspan="9"> Sub total </td> > <td class="data"> [% subtotal %] </td> > </tr> >- [% FOREACH shipmentcost IN shipmentcosts %] >+ [% FOREACH shipping IN shippings %] > <tr> > <td></td> >- <td colspan="8">Shipping cost for invoice [% shipmentcost.invoicenumber %]</td> >- <td class="data total">[% shipmentcost.shipmentcost %]</td> >+ <td colspan="8">Shipping cost for invoice [% shipping.invoicenumber %]</td> >+ <td class="data total">[% shipping.shipping %]</td> > </tr> > [% END %] > [% END %] >-- >2.1.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 11062
:
28891
|
31033
| 35994 |
35995
|
35996