Bugzilla – Attachment 146088 Details for
Bug 25655
Additionally store 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 25655: Select currency and prefill unitprice with previous receipt
Bug-25655-Select-currency-and-prefill-unitprice-wi.patch (text/plain), 3.44 KB, created by
PTFS Europe Sandboxes
on 2023-02-03 12:42:36 UTC
(
hide
)
Description:
Bug 25655: Select currency and prefill unitprice with previous receipt
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2023-02-03 12:42:36 UTC
Size:
3.44 KB
patch
obsolete
>From 314644ed6d7d7eafad445bd319c2eab36a6a8603 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 16 Jan 2023 22:51:31 +0100 >Subject: [PATCH] Bug 25655: Select currency and prefill unitprice with > previous receipt > >In case of partial order we want to prefill the unit price and the >currency with the value of the previous receipt. > >Sponsored-by: The Research University in the Helmholtz Association (KIT) >Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> >--- > .../prog/en/modules/acqui/orderreceive.tt | 18 +++++++++++++++--- > 1 file changed, 15 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >index d06b3e3e37..dd2151ba29 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >@@ -429,12 +429,20 @@ > </li> > <li id="select_currency"> > <label for="invoice_unitprice"></label> >- <input type="text" size="20" name="invoice_unitprice" id="invoice_unitprice" value="" /> >+ <input type="text" size="20" name="invoice_unitprice" id="invoice_unitprice" value="[% order.invoice_unitprice | $Price on_editing => 1 %]" /> > [% IF currencies.count %] > <select name="invoice_currency"> >- <option value="[% active_currency.currency | html %]" data-rate="[% active_currency.rate | html %]" selected="selected">[% active_currency.currency | html %] ([% active_currency.symbol | html %])</option> >+ [% IF order.invoice_currency == active_currency.currency %] >+ <option value="[% active_currency.currency | html %]" data-rate="[% active_currency.rate | html %]" selected="selected">[% active_currency.currency | html %] ([% active_currency.symbol | html %])</option> >+ [% ELSE %] >+ <option value="[% active_currency.currency | html %]" data-rate="[% active_currency.rate | html %]">[% active_currency.currency | html %] ([% active_currency.symbol | html %])</option> >+ [% END %] > [% FOR currency IN currencies %] >- <option value="[% currency.currency | html%]" data-rate="[% currency.rate | html %]">[% currency.currency | html %] ([% currency.symbol | html %])</option> >+ [% IF order.invoice_currency == currency.currency %] >+ <option value="[% currency.currency | html%]" data-rate="[% currency.rate | html %]" selected="selected">[% currency.currency | html %] ([% currency.symbol | html %])</option> >+ [% ELSE %] >+ <option value="[% currency.currency | html%]" data-rate="[% currency.rate | html %]">[% currency.currency | html %] ([% currency.symbol | html %])</option> >+ [% END %] > [% END %] > </select> > [% END %] >@@ -607,6 +615,10 @@ > } > }).change(); > >+ [% IF order.invoice_unitprice %] >+ $("input[name='change_currency']").click().trigger('change'); >+ [% END %] >+ > function update_unitprice() { > var rate = Number($("select[name='invoice_currency'] option:selected").data('rate')); > var unitprice = $("#invoice_unitprice").val(); >-- >2.30.2
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 25655
:
144618
|
145906
|
145907
|
145908
|
145909
|
145910
|
145911
|
145912
|
146082
|
146084
|
146085
|
146086
|
146087
|
146088
|
146089
|
146478
|
146479
|
146480
|
146481
|
146482
|
146483
|
146484
|
146658
|
146660
|
146818
|
146819
|
146820
|
146821
|
146822
|
146823
|
146824
|
146825
|
146826