Bugzilla – Attachment 78979 Details for
Bug 19271
Ordered/Spent lists should display vendor name, not vendor code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19271: Show vendor name and format prices on ordered/spent lists
Bug-19271-Show-vendor-name-and-format-prices-on-or.patch (text/plain), 7.36 KB, created by
Chris Cormack
on 2018-09-16 18:45:56 UTC
(
hide
)
Description:
Bug 19271: Show vendor name and format prices on ordered/spent lists
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2018-09-16 18:45:56 UTC
Size:
7.36 KB
patch
obsolete
>From 2a755a6f5315a6525a3a884e336f6634cbb45cf8 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Fri, 10 Aug 2018 16:52:52 +0000 >Subject: [PATCH] Bug 19271: Show vendor name and format prices on > ordered/spent lists > >Improvements to the display of lists of ordered and received orders: >- Format prices according to CurrencyFormat system preference >- Show the vendor's name instead of the internal number > >To test: >- Make sure you have some pending and received orders >- Access the Spent and Ordered pages by clicking on the > amount ordered or spent on the acq start page >- Verify that > - All price information is shown according to CurrencyFormat > - Vendor name shows >--- > acqui/ordered.pl | 7 ++++--- > acqui/spent.pl | 12 ++++++------ > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt | 9 +++++---- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt | 9 +++++---- > 4 files changed, 20 insertions(+), 17 deletions(-) > >diff --git a/acqui/ordered.pl b/acqui/ordered.pl >index e39349092e..27fe71bd9d 100755 >--- a/acqui/ordered.pl >+++ b/acqui/ordered.pl >@@ -56,6 +56,7 @@ SELECT > quantity-quantityreceived AS tleft, > ecost, budgetdate, entrydate, > aqbasket.booksellerid, >+ aqbooksellers.name as vendorname, > itype, > title > FROM (aqorders, aqbasket) >@@ -65,6 +66,8 @@ LEFT JOIN aqorders_items ON > aqorders.ordernumber=aqorders_items.ordernumber > LEFT JOIN items ON > items.itemnumber=aqorders_items.itemnumber >+LEFT JOIN aqbooksellers ON >+ aqbasket.booksellerid = aqbooksellers.id > WHERE > aqorders.basketno=aqbasket.basketno AND > budget_id=? AND >@@ -90,7 +93,7 @@ while ( my $data = $sth->fetchrow_hashref ) { > } > if ( $left && $left > 0 ) { > my $subtotal = $left * $data->{'ecost'}; >- $data->{subtotal} = sprintf( "%.2f", $subtotal ); >+ $data->{subtotal} = $subtotal; > $data->{'left'} = $left; > push @ordered, $data; > $total += $subtotal; >@@ -102,8 +105,6 @@ while ( my $adj = $adjustments->next ){ > $total += $adj->adjustment; > } > >-$total = sprintf( "%.2f", $total ); >- > $template->{VARS}->{'fund'} = $fund_id; > $template->{VARS}->{'ordered'} = \@ordered; > $template->{VARS}->{'total'} = $total; >diff --git a/acqui/spent.pl b/acqui/spent.pl >index 988b8c28ee..b376973e8d 100755 >--- a/acqui/spent.pl >+++ b/acqui/spent.pl >@@ -64,7 +64,8 @@ SELECT > aqinvoices.invoicenumber, > quantityreceived, > unitprice, >- datereceived >+ datereceived, >+ aqbooksellers.name as vendorname > FROM (aqorders, aqbasket) > LEFT JOIN biblio ON > biblio.biblionumber=aqorders.biblionumber >@@ -74,6 +75,8 @@ LEFT JOIN items ON > aqorders_items.itemnumber = items.itemnumber > LEFT JOIN aqinvoices ON > aqorders.invoiceid = aqinvoices.invoiceid >+LEFT JOIN aqbooksellers ON >+ aqbasket.booksellerid = aqbooksellers.id > WHERE > aqorders.basketno=aqbasket.basketno AND > budget_id=? AND >@@ -93,8 +96,7 @@ while ( my $data = $sth->fetchrow_hashref ) { > my $recv = $data->{'quantityreceived'}; > if ( $recv > 0 ) { > my $rowtotal = $recv * $data->{'unitprice'}; >- $data->{'rowtotal'} = sprintf( "%.2f", $rowtotal ); >- $data->{'unitprice'} = sprintf( "%.2f", $data->{'unitprice'} ); >+ $data->{'rowtotal'} = $rowtotal; > $subtotal += $rowtotal; > push @spent, $data; > } >@@ -112,7 +114,7 @@ $sth->execute($bookfund); > my @shipmentcosts; > while (my $data = $sth->fetchrow_hashref) { > push @shipmentcosts, { >- shipmentcost => sprintf("%.2f", $data->{shipmentcost}), >+ shipmentcost => $data->{shipmentcost}, > invoicenumber => $data->{invoicenumber} > }; > $total += $data->{shipmentcost}; >@@ -124,8 +126,6 @@ while ( my $adj = $adjustments->next ){ > $total += $adj->adjustment; > } > >-$total = sprintf( "%.2f", $total ); >- > $template->param( > fund => $bookfund, > spent => \@spent, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt >index 44f256a766..233ea0529a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt >@@ -2,6 +2,7 @@ > [% USE Asset %] > [% USE KohaDates %] > [% USE ItemTypes %] >+[% USE Price %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions › Ordered</title> >@@ -52,7 +53,7 @@ > [% END %] > </td> > <td class="cell"> >- <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.booksellerid | html %]">[% order.booksellerid | html %]</a> >+ <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.booksellerid | html %]">[% order.vendorname | html %]</a> > </td> > <td class="cell"> > [% ItemTypes.GetDescription( order.itype ) | html %] >@@ -61,13 +62,13 @@ > [% order.left | html %] > </td> > <td class="data cell"> >- [% order.ecost | html %] >+ [% order.ecost | $Price %] > </td> > <td class="cell"> > <span title="[% order.entrydate | html %]">[% order.entrydate | $KohaDates %]</span> > </td> > <td class="data cell"> >- [% order.subtotal | html %] >+ [% order.subtotal | $Price %] > </td> > </tr> > [% END %] >@@ -92,7 +93,7 @@ > <td> </td> > <td> </td> > <td class="data"> >- [% total | html %] >+ [% total | $Price %] > </td> > </tr> > </tfoot> >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 d3cae4fb4a..816f264fac 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt >@@ -2,6 +2,7 @@ > [% USE Asset %] > [% USE KohaDates %] > [% USE ItemTypes %] >+[% USE Price %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Acquisitions › Spent</title> >@@ -50,7 +51,7 @@ > [% order.ordernumber | html %] > </td> > <td class="cell"> >- <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.booksellerid | html %]">[% order.booksellerid | html %]</a> >+ <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.booksellerid | html %]">[% order.vendorname | html %]</a> > </td> > <td class="cell"> > <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | html %]">[% order.invoicenumber | html %]</a> >@@ -62,7 +63,7 @@ > [% order.quantityreceived | html %] > </td> > <td class="cell"> >- [% order.unitprice | html %] >+ [% order.unitprice | $Price %] > </td> > <td class="cell"> > <span title="[% order.entrydate | html %]">[% order.entrydate | $KohaDates %]</span> >@@ -71,7 +72,7 @@ > <span title="[% order.datereceived | html %]">[% order.datereceived | $KohaDates %]</span> > </td> > <td class="data cell"> >- [% order.rowtotal | html %] >+ [% order.rowtotal | $Price %] > </td> > </tr> > [% END %] >@@ -103,7 +104,7 @@ > [% END %] > <tr> > <td colspan="9">TOTAL</td> >- <td class="data total">[% total | html %]</td> >+ <td class="data total">[% total | $Price %]</td> > </tr> > </tfoot> > </table> >-- >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 19271
:
77705
|
78979
|
79482
|
79483
|
79613