From: Liz Rea Date: Tue, 23 Jul 2019 15:22:20 +0000 (-0500) Subject: Bug 23363: Fix Internal Server Error when clicking on shipment cost invoice link X-Git-Url: http://git.equinoxoli.org/?p=koha-equinox.git;a=commitdiff_plain;h=be4c4f8040ba9485f1cc72937ae77027568c0779 Bug 23363: Fix Internal Server Error when clicking on shipment cost invoice link To test: On the fund detail page, have some shipment costs associated with a fund an example would be cgi-bin/koha/acqui/spent.pl?fund=&fund_code= Click the link for the fund, without this patch it will give an internal server error. With this patch, the shipment invoice will be loaded. Signed-off-by: Jason DeShaw Signed-off-by: Laurel Moran Signed-off-by: Josef Moravec Signed-off-by: Martin Renvoize --- diff --git a/acqui/spent.pl b/acqui/spent.pl index 20d2b13..ba843a8 100755 --- a/acqui/spent.pl +++ b/acqui/spent.pl @@ -119,7 +119,7 @@ while ( my $data = $sth->fetchrow_hashref ) { my $total = $subtotal; $query = qq{ - SELECT invoicenumber, shipmentcost + SELECT invoiceid, invoicenumber, shipmentcost FROM aqinvoices WHERE shipmentcost_budgetid = ? }; @@ -129,7 +129,8 @@ my @shipmentcosts; while (my $data = $sth->fetchrow_hashref) { push @shipmentcosts, { shipmentcost => sprintf("%.2f", $data->{shipmentcost}), - invoicenumber => $data->{invoicenumber} + invoiceid => $data->{invoiceid}, + invoicenumber => $data->{invoicenumber} }; $total += $data->{shipmentcost}; } 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 2e5ca3f..6466080 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt @@ -88,7 +88,7 @@ Shipping cost for invoice - + [% shipmentcost.invoicenumber | html %]