From 1bb6639743b01e1716a4e1676de424a080c767a3 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Mon, 10 Nov 2014 09:55:52 +0100 Subject: [PATCH] Bug 12059: Publisher column on invoice page always empty This patch moves the publisher information out of its own always empty column into the Summary column below the title, as it is on other acq pages. The information was never displaying, as publishercode is in biblioitems and that table was not selected by GetInvoiceDetails. Also modified the code to take into account that UNIMARC uses biblioitems.publicationyear and MARC21/NORMARC use bibio.copyrightdate for the copyright year. To test: - create an invoice for records that - have a publication year - have no publication year - have a publisher... - 'finish receiving' and check the invoice summary page ...acqui/invoice.pl?invoiceid=? - Make sure all the information displays now but didn't witout the patch. Signed-off-by: Paola Rossi Signed-off-by: Jonathan Druart Signed-off-by: Mason James --- C4/Acquisition.pm | 3 ++- .../prog/en/modules/acqui/invoice.tt | 19 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 60dc59d0ea..c6993c3da6 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -2734,10 +2734,11 @@ sub GetInvoiceDetails { my $invoice = $sth->fetchrow_hashref; $query = q{ - SELECT aqorders.*, biblio.*, aqbasket.basketname + SELECT aqorders.*, biblio.*, biblioitems.*, aqbasket.basketname FROM aqorders LEFT JOIN aqbasket ON aqorders.basketno = aqbasket.basketno LEFT JOIN biblio ON aqorders.biblionumber = biblio.biblionumber + LEFT JOIN biblioitems ON aqorders.biblionumber = biblioitems.biblionumber WHERE invoiceid = ? }; $sth = $dbh->prepare($query); 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 35bc2daf3e..6573735f9a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt @@ -119,7 +119,6 @@ Summary - Publisher Library Actual cost tax exc. Actual cost tax inc. @@ -134,18 +133,18 @@ [% FOREACH order IN orders_loop %] -

[% order.title %] + + [% order.title %] [% IF ( order.author ) %]
by [% order.author %] [% END %] -

- [% IF ( order.publishercode ) %] -

[% order.publishercode %] - [% IF ( order.publicationyear ) %] +
[% order.publishercode %] + [% IF order.publicationyear > 0 %] - [% order.publicationyear %] + [% ELSIF ( order.copyrightdate > 0) %] + - [% order.copyrightdate %] [% END %] -

[% END %]

[% order.branchcode %]

@@ -163,7 +162,7 @@ [% FOR tf IN foot_loop %] - Total (GST [% tf.gstgsti %] %) + Total (GST [% tf.gstgsti %] %) [% tf.quantity %] [% tf.totalgste %] @@ -174,7 +173,7 @@ [% END %] - Total ([% currency %]) + Total ([% currency %]) [% total_quantity %] [% total_gste %] @@ -184,7 +183,7 @@   - Total + Shipment cost ([% currency %]) + Total + Shipment cost ([% currency %]) [% total_quantity %]