From a224e220b8f1b7e1e0d6b0c532199e26fe0a5bbc Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Tue, 14 Apr 2020 11:42:22 +0000 Subject: [PATCH] Bug 17458: Fix information shown on top of order receive page Before this patch the order receive page (parcel.pl) would show ... Received by: On: This is not really helpful. Whenever you viewed an invoice, it would tell you it was _you_ who received that _today_. As we don't store a creator of an invoice and the order lines in an invoice could have been received by different people (which we also don't know about), the "Received by" is removed by this patch. Instead of today's date, we can show the shipment date entered for the invoice. Again: different order lines could have been received on different dates for this shipment. To test: - Create a basket with some orders in acq - Close the basket - Receive shipment and create an invoice - Make sure shipment date is not set to today - Verify the information shown on top of parcel.pl is you and today - Change staff users - Go to your invoice, it's now this user and today - Apply patch - Received by: should be gone and the On: replaced by Shipment date: with the date you selected If you have older invoices in your system, it would work even better with these as you'd see that always today's date is displaying without the patch. --- acqui/parcel.pl | 4 ++-- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/acqui/parcel.pl b/acqui/parcel.pl index 8d094d8ffe..e21a2c9236 100755 --- a/acqui/parcel.pl +++ b/acqui/parcel.pl @@ -284,7 +284,7 @@ $template->param( invoiceid => $invoice->{invoiceid}, invoice => $invoice->{invoicenumber}, invoiceclosedate => $invoice->{closedate}, - datereceived => dt_from_string, + shipmentdate => $invoice->{shipmentdate}, name => $bookseller->name, booksellerid => $bookseller->id, loop_received => \@loop_received, @@ -294,6 +294,6 @@ $template->param( total_tax_excluded => $total_tax_excluded, total_tax_included => $total_tax_included, subtotal_for_funds => $subtotal_for_funds, - sticky_filters => $sticky_filters, + sticky_filters => $sticky_filters, ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index 414844397c..ff238edb0c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -89,7 +89,7 @@ [% UNLESS no_orders_to_display %]
-

Invoice number: [% invoice | html %] Received by: [% logged_in_user.userid | html %] On: [% datereceived | $KohaDates %]

+

Invoice number: [% invoice | html %] Shipment date: [% shipmentdate | $KohaDates %]

[% UNLESS (invoiceclosedate) %]