Browse Source

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=<your fund>&fund_code=<your
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 <JDeShaw@fargolibrary.org>
Signed-off-by: Laurel Moran <lmoran@sdlawlibrary.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
remotes/origin/19.11.x
Liz Rea 5 years ago
committed by Martin Renvoize
parent
commit
be4c4f8040
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 5
      acqui/spent.pl
  2. 2
      koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt

5
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};
}

2
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt

@ -88,7 +88,7 @@
<tr>
<td></td>
<td colspan="8">Shipping cost for invoice
<a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% shipmentcode.invoiceid | uri %]">
<a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% shipmentcost.invoiceid | uri %]">
[% shipmentcost.invoicenumber | html %]
</a>
</td>

Loading…
Cancel
Save