Browse Source

Bug 32705: Display invoice price

On bug 25655 we are storing the unit price and currency used for
invoicing. Here we are displaying them on the invoice page.

Test plan:
Reuse the test plan from 25655 and go to the invoice page
Notice that a new 'Invoice price' column is displayed if at least one
order of the invoice had a price given in a foreign currency

We could discuss the display of the prices here, we've decided to not
format them.
We cannot do better for now as we are not storing the format along with
the currency.

Sponsored-by: The Research University in the Helmholtz Association (KIT)
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 4 months ago
committed by Tomas Cohen Arazi
parent
commit
7983181fce
  1. 3
      acqui/invoice.pl
  2. 19
      koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt

3
acqui/invoice.pl

@ -262,6 +262,7 @@ my $total_quantity = 0;
my $total_tax_excluded = 0;
my $total_tax_included = 0;
my $total_tax_value = 0;
my $has_invoice_unitprice;
foreach my $order (@$orders) {
my $line = get_infos( $order, $bookseller);
@ -282,6 +283,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};
push @orders_loop, $line;
}
@ -344,6 +346,7 @@ $template->param(
currency => Koha::Acquisition::Currencies->get_active,
budgets => $budget_loop,
budget => GetBudget( $shipmentcost_budgetid ),
has_invoice_unitprice => $has_invoice_unitprice,
);
defined( $invoice_files ) && $template->param( files => $invoice_files->GetFilesInfo() );

19
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt

@ -317,6 +317,9 @@
<tr>
<th class="anti-the">Summary</th>
<th>Library</th>
[% IF has_invoice_unitprice %]
<th>Invoice price</th>
[% END %]
<th class="tax_excluded">Actual cost tax exc.</th>
<th class="tax_included">Actual cost tax inc.</th>
<th class="replacementprice">Replacement price</th>
@ -349,6 +352,13 @@
</td>
<td>
<p>[% order.branchcode | html %]</p>
[% IF has_invoice_unitprice %]
<td>
[% IF order.invoice_unitprice %]
[% order.invoice_unitprice | $Price %] [% order.invoice_currency | html %]
[% END %]
</td>
[% END %]
</td>
<td class="number tax_excluded">
[% order.unitprice_tax_excluded | $Price %]
@ -388,6 +398,9 @@
[% FOR tf IN foot_loop %]
<tr>
<th colspan="2">Total (GST [% tf.tax_rate * 100 | html %] %)</th>
[% IF has_invoice_unitprice %]
<th></th>
[% END %]
<th class="tax_excluded"></th>
<th class="tax_included"></th>
<th class="replacementprice"/>
@ -401,6 +414,9 @@
[% END # /FOR tf %]
<tr>
<th colspan="2">Total ([% currency.symbol | html %])</th>
[% IF has_invoice_unitprice %]
<th></th>
[% END %]
<th class="tax_excluded"></th>
<th class="tax_included"></th>
<th class="replacementprice"/>
@ -413,6 +429,9 @@
</tr>
<tr>
<th colspan="2">Total + adjustments + shipment cost ([% currency.symbol | html %])</th>
[% IF has_invoice_unitprice %]
<th></th>
[% END %]
<th class="tax_excluded"></th>
<th class="tax_included"></th>
<th class="replacementprice"/>

Loading…
Cancel
Save