@@ -, +, @@ --- 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(-) --- a/acqui/ordered.pl +++ a/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'}; --- a/acqui/spent.pl +++ a/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 ); --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt @@ -29,7 +29,7 @@ Title Order Vendor - Item type + Item types Left on order Estimated cost per unit Date ordered @@ -55,7 +55,10 @@ [% order.vendorname | html %] - [% ItemTypes.GetDescription( order.itype ) | html %] + [% FOREACH itemtype IN order.itemtypes %] + [% IF !(loop.count() mod 2) %] | [% END %] + [% ItemTypes.GetDescription( itemtype ) | html %] + [% END %] [% order.left | html %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt @@ -30,7 +30,7 @@ Order Vendor Invoice - Item type + Item types Received Unit price Date ordered @@ -56,7 +56,10 @@ [% order.invoicenumber | html %] - [% ItemTypes.GetDescription( order.itype ) | html %] + [% FOREACH itemtype IN order.itemtypes %] + [% IF !(loop.count() mod 2) %] | [% END %] + [% ItemTypes.GetDescription( itemtype ) | html %] + [% END %] [% order.quantityreceived | html %] --