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;
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,
<td><input type="text" name="adjustment" id="adjustment_[% adjustment.adjustment_id %]" value="[% adjustment.adjustment | $Price %]" /></td>
<td>
[% reasons = AuthorisedValues.Get("ADJ_REASON") %]
- [% IF reasons %]
+ [% IF reasons.0 %]
<select id="reason_[% adjustment.adjustment_id %]" name="reason">
<option value="">No reason</option>
[% FOREACH reason IN reasons %]
<td><input type="text" name="adjustment" id="adjustment_new]" /></td>
<td>
[% reasons = AuthorisedValues.Get("ADJ_REASON") %]
- [% IF reasons %]
+ [% IF reasons.0 %]
<select id="reason_[% adjustment.adjustment_id %]" name="reason">
<option value="">No reason</option>
[% FOREACH reason IN reasons %]
</table>
[% ELSE %]
<div class="dialog message"><p>No orders yet</p>
- [% IF adjustments.count > 0 || shipmentcost > 0 %]
+ [% IF adjustments && adjustments.count > 0 || shipmentcost && shipmentcost > 0 %]
<p>Adjustments plus shipping:[% total_adj + shipmentcost | $Price %]</p>
[% END %]
</div>