Bugzilla – Attachment 92449 Details for
Bug 23397
Order lines can be duplicated in acqui scripts spent.pl and ordered.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23397: (follow-up) Split and display itemtypes
Bug-23397-follow-up-Split-and-display-itemtypes.patch (text/plain), 4.25 KB, created by
Marcel de Rooy
on 2019-08-23 14:38:44 UTC
(
hide
)
Description:
Bug 23397: (follow-up) Split and display itemtypes
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2019-08-23 14:38:44 UTC
Size:
4.25 KB
patch
obsolete
>From e5412fa9ce13cbdd25b8d24e36ed61d4d7a39c49 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 23 Aug 2019 13:14:57 +0000 >Subject: [PATCH] Bug 23397: (follow-up) Split and display itemtypes >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > acqui/ordered.pl | 3 ++- > acqui/spent.pl | 3 ++- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt | 7 +++++-- > koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt | 7 +++++-- > 4 files changed, 14 insertions(+), 6 deletions(-) > >diff --git a/acqui/ordered.pl b/acqui/ordered.pl >index 7899cb8026..b490f42d33 100755 >--- a/acqui/ordered.pl >+++ b/acqui/ordered.pl >@@ -58,7 +58,7 @@ SELECT > ecost_tax_included, budgetdate, entrydate, > aqbasket.booksellerid, > aqbooksellers.name as vendorname, >- GROUP_CONCAT(DISTINCT itype), >+ GROUP_CONCAT(DISTINCT itype SEPARATOR '|') AS itypes, > title > FROM (aqorders, aqbasket) > LEFT JOIN biblio ON >@@ -93,6 +93,7 @@ my @ordered; > > my $total = 0; > while ( my $data = $sth->fetchrow_hashref ) { >+ $data->{'itemtypes'} = [split('\|', $data->{itypes})]; > my $left = $data->{'tleft'}; > if ( !$left || $left eq '' ) { > $left = $data->{'quantity'}; >diff --git a/acqui/spent.pl b/acqui/spent.pl >index 95b2de6d43..083429a338 100755 >--- a/acqui/spent.pl >+++ b/acqui/spent.pl >@@ -59,7 +59,7 @@ SELECT > quantity-quantityreceived AS tleft, > budgetdate, entrydate, > aqbasket.booksellerid, >- GROUP_CONCAT(DISTINCT itype), >+ GROUP_CONCAT(DISTINCT itype SEPARATOR '|') as itypes, > title, > aqorders.invoiceid, > aqinvoices.invoicenumber, >@@ -106,6 +106,7 @@ my $subtotal = 0; > my @spent; > while ( my $data = $sth->fetchrow_hashref ) { > my $recv = $data->{'quantityreceived'}; >+ $data->{'itemtypes'} = [split('\|', $data->{itypes})]; > if ( $recv > 0 ) { > my $rowtotal = $recv * get_rounded_price($data->{'unitprice_tax_included'}); > $data->{'rowtotal'} = sprintf( "%.2f", $rowtotal ); >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 483cc8ce37..275559f471 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt >@@ -29,7 +29,7 @@ > <th class="anti-the"> Title </th> > <th> Order </th> > <th> Vendor </th> >- <th> Item type </th> >+ <th> Item types </th> > <th> Left on order </th> > <th> Estimated cost per unit </th> > <th class="title-string"> Date ordered </th> >@@ -55,7 +55,10 @@ > <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% order.booksellerid | uri %]">[% order.vendorname | html %]</a> > </td> > <td class="cell"> >- [% ItemTypes.GetDescription( order.itype ) | html %] >+ [% FOREACH itemtype IN order.itemtypes %] >+ [% IF !(loop.count() mod 2) %] | [% END %] >+ [% ItemTypes.GetDescription( itemtype ) | html %] >+ [% END %] > </td> > <td class="cell"> > [% order.left | html %] >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 010f3e1a2c..e5687c3dae 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt >@@ -30,7 +30,7 @@ > <th>Order</th> > <th>Vendor</th> > <th>Invoice</th> >- <th>Item type</th> >+ <th>Item types</th> > <th>Received</th> > <th>Unit price</th> > <th class="title-string">Date ordered</th> >@@ -56,7 +56,10 @@ > <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]">[% order.invoicenumber | html %]</a> > </td> > <td class="cell"> >- [% ItemTypes.GetDescription( order.itype ) | html %] >+ [% FOREACH itemtype IN order.itemtypes %] >+ [% IF !(loop.count() mod 2) %] | [% END %] >+ [% ItemTypes.GetDescription( itemtype ) | html %] >+ [% END %] > </td> > <td class="cell"> > [% order.quantityreceived | html %] >-- >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 23397
:
91855
|
92344
|
92446
|
92448
| 92449 |
92450