Bugzilla – Attachment 146659 Details for
Bug 32705
Display actual cost in foreign currency and currency from the invoice
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32705: Display the column if 1 order has an invoice price
Bug-32705-Display-the-column-if-1-order-has-an-inv.patch (text/plain), 1.90 KB, created by
Jonathan Druart
on 2023-02-15 07:58:59 UTC
(
hide
)
Description:
Bug 32705: Display the column if 1 order has an invoice price
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-02-15 07:58:59 UTC
Size:
1.90 KB
patch
obsolete
>From f7950c58d4062c1d83bac5f4991ef25b97230e20 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 15 Feb 2023 08:56:22 +0100 >Subject: [PATCH] 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. >--- > acqui/invoice.pl | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/acqui/invoice.pl b/acqui/invoice.pl >index 5f5a9345e3e..b9d1bf5d0b9 100755 >--- a/acqui/invoice.pl >+++ b/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, >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32705
:
145913
|
146307
|
146382
|
146477
|
146486
|
146659
|
146814
|
146815