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>
my $total = $subtotal;
$query = qq{
- SELECT invoicenumber, shipmentcost
+ SELECT invoiceid, invoicenumber, shipmentcost
FROM aqinvoices
WHERE shipmentcost_budgetid = ?
};
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};
}
<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>