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>
This commit is contained in:
parent
95b6f56026
commit
be4c4f8040
2 changed files with 4 additions and 3 deletions
|
@ -119,7 +119,7 @@ while ( my $data = $sth->fetchrow_hashref ) {
|
||||||
|
|
||||||
my $total = $subtotal;
|
my $total = $subtotal;
|
||||||
$query = qq{
|
$query = qq{
|
||||||
SELECT invoicenumber, shipmentcost
|
SELECT invoiceid, invoicenumber, shipmentcost
|
||||||
FROM aqinvoices
|
FROM aqinvoices
|
||||||
WHERE shipmentcost_budgetid = ?
|
WHERE shipmentcost_budgetid = ?
|
||||||
};
|
};
|
||||||
|
@ -129,6 +129,7 @@ my @shipmentcosts;
|
||||||
while (my $data = $sth->fetchrow_hashref) {
|
while (my $data = $sth->fetchrow_hashref) {
|
||||||
push @shipmentcosts, {
|
push @shipmentcosts, {
|
||||||
shipmentcost => sprintf("%.2f", $data->{shipmentcost}),
|
shipmentcost => sprintf("%.2f", $data->{shipmentcost}),
|
||||||
|
invoiceid => $data->{invoiceid},
|
||||||
invoicenumber => $data->{invoicenumber}
|
invoicenumber => $data->{invoicenumber}
|
||||||
};
|
};
|
||||||
$total += $data->{shipmentcost};
|
$total += $data->{shipmentcost};
|
||||||
|
|
|
@ -88,7 +88,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td colspan="8">Shipping cost for invoice
|
<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 %]
|
[% shipmentcost.invoicenumber | html %]
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
Loading…
Reference in a new issue