Browse Source

Bug 32705: Display the column if 1 order has an invoice price

On 25655 we added a new patch to store the invoice unitprice and
currency even if it's the active currency. Here we then want to display
the column if at least one order has an invoice price in a currency that
is not the active one.

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
23.05.x
Jonathan Druart 1 year ago
committed by Tomas Cohen Arazi
parent
commit
4d59e2717d
  1. 5
      acqui/invoice.pl

5
acqui/invoice.pl

@ -251,6 +251,7 @@ elsif ( $op && $op eq 'mod_adj' ) {
}
}
my $active_currency = Koha::Acquisition::Currencies->get_active,
my $details = GetInvoiceDetails($invoiceid);
my $bookseller = Koha::Acquisition::Booksellers->find( $details->{booksellerid} );
my @orders_loop = ();
@ -283,7 +284,7 @@ foreach my $order (@$orders) {
$total_tax_included += get_rounded_price($$line{total_tax_included});
$line->{orderline} = $line->{parent_ordernumber};
$has_invoice_unitprice = 1 if defined $line->{invoice_unitprice};
$has_invoice_unitprice = 1 if $line->{invoice_currency} ne $active_currency->currency;
push @orders_loop, $line;
}
@ -343,7 +344,7 @@ $template->param(
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,
currency => $active_currency,
budgets => $budget_loop,
budget => GetBudget( $shipmentcost_budgetid ),
has_invoice_unitprice => $has_invoice_unitprice,

Loading…
Cancel
Save