@@ -, +, @@ category and minor fixes --- acqui/invoice.pl | 7 ++++--- installer/data/mysql/atomicupdate/bug_19166.perl | 1 + koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) --- a/acqui/invoice.pl +++ a/acqui/invoice.pl @@ -157,6 +157,7 @@ my @orders_loop = (); my $orders = $details->{'orders'}; my @foot_loop; my %foot; +my $shipmentcost = $details->{shipmentcost} || 0; my $total_quantity = 0; my $total_tax_excluded = 0; my $total_tax_included = 0; @@ -211,15 +212,15 @@ $template->param( shipmentdate => $details->{'shipmentdate'}, billingdate => $details->{'billingdate'}, invoiceclosedate => $details->{'closedate'}, - shipmentcost => $details->{'shipmentcost'}, + shipmentcost => $shipmentcost, orders_loop => \@orders_loop, foot_loop => \@foot_loop, total_quantity => $total_quantity, total_tax_excluded => $total_tax_excluded, total_tax_included => $total_tax_included, total_tax_value => $total_tax_value, - total_tax_excluded_shipment => $total_tax_excluded + $details->{shipmentcost}, - total_tax_included_shipment => $total_tax_included + $details->{shipmentcost}, + total_tax_excluded_shipment => $total_tax_excluded + $shipmentcost, + total_tax_included_shipment => $total_tax_included + $shipmentcost, invoiceincgst => $bookseller->invoiceincgst, currency => Koha::Acquisition::Currencies->get_active, budgets_loop => \@budgets_loop, --- a/installer/data/mysql/atomicupdate/bug_19166.perl +++ a/installer/data/mysql/atomicupdate/bug_19166.perl @@ -15,6 +15,7 @@ if( CheckVersion( $DBversion ) ) { CONSTRAINT invoice_adjustments_fk_budget_id FOREIGN KEY (budget_id) REFERENCES aqbudgets (budget_id) ON DELETE SET NULL ON UPDATE CASCADE ) " ); + $dbh->do("INSERT IGNORE INTO authorised_value_categories (category_name) VALUES ('ADJ_REASON')"); SetVersion( $DBversion ); print "Upgrade to $DBversion done (Bug 19166 - Add the ability to add adjustments to an invoice)\n"; } --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt @@ -106,7 +106,7 @@ [% reasons = AuthorisedValues.Get("ADJ_REASON") %] - [% IF reasons %] + [% IF reasons.0 %] [% reasons = AuthorisedValues.Get("ADJ_REASON") %] - [% IF reasons %] + [% IF reasons.0 %]