Bugzilla – Attachment 50150 Details for
Bug 16227
The currencies of vendor and order do not display correctly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 16227: Fix regression from bug 15084 - select currencies correctly
SIGNED-OFF-Bug-16227-Fix-regression-from-bug-15084.patch (text/plain), 6.20 KB, created by
Owen Leonard
on 2016-04-12 14:38:27 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 16227: Fix regression from bug 15084 - select currencies correctly
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2016-04-12 14:38:27 UTC
Size:
6.20 KB
patch
obsolete
>From 5192426e8c6a759225a9a3fceba39d28b126f93a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 8 Apr 2016 11:42:15 +0100 >Subject: [PATCH] [SIGNED-OFF] Bug 16227: Fix regression from bug 15084 - > select currencies correctly >Content-Type: text/plain; charset="utf-8" > >This patch fixes a regression introduced by bug 15084: The currency >dropdown lists are not correctly built. >The selected currencies are wrong. > >Test plan: >Create a vendor, the selected currencies should be the default one >Edit the vendor, the selected currencies should be the ones defined for > this vendor >Create an order, the selected currency should be the 'List prices' of > the vendor >Edit an order, the selected currency should be the one defined for this > order > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > acqui/neworderempty.pl | 2 ++ > .../prog/en/modules/acqui/neworderempty.tt | 14 +++++++------- > .../intranet-tmpl/prog/en/modules/acqui/supplier.tt | 20 ++++++++++---------- > 3 files changed, 19 insertions(+), 17 deletions(-) > >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index 3885a7b..4fdf33f 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -352,6 +352,8 @@ $template->param( > cur_active_sym => $active_currency->symbol, > cur_active => $active_currency->currency, > currencies => \@currencies, >+ currency => $data->{currency}, >+ vendor_currency => $bookseller->{listprice}, > orderexists => ( $new eq 'yes' ) ? 0 : 1, > title => $data->{'title'}, > author => $data->{'author'}, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >index dbb2b02..77a9abc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt >@@ -302,8 +302,8 @@ $(document).ready(function() > <input type="hidden" name="suggestionid" value="[% suggestionid %]" /> > <input type="hidden" name="import_batch_id" value="[% import_batch_id %]" /> > >- [% FOREACH currency IN currencies %] >- <input type="hidden" id="currency_rate_[% currency.currency %]" name="[% currency.currency %]" value="[% currency.rate %]" /> >+ [% FOREACH c IN currencies %] >+ <input type="hidden" id="currency_rate_[% c.currency %]" name="[% c.currency %]" value="[% c.rate %]" /> > [% END %] > > <ol><li> >@@ -523,11 +523,11 @@ $(document).ready(function() > [% ELSE %] > <label for="currency">Currency:</label> > <select name="currency" id="currency" onchange="updateCosts();"> >- [% FOREACH currency IN currencies %] >- [% IF ordernumber and currency.currency == listprice or not ordernumber and currency.active %] >- <option value="[% currency.currency %]" selected="selected">[% currency.currency %]</option> >- [% ELSIF not currency.archived %] >- <option value="[% currency.currency %]">[% currency.currency %]</option> >+ [% FOREACH c IN currencies %] >+ [% IF ordernumber and c.currency == currency or not ordernumber and c.currency == vendor_currency %] >+ <option value="[% c.currency %]" selected="selected">[% c.currency %]</option> >+ [% ELSIF not c.archived %] >+ <option value="[% c.currency %]">[% c.currency %]</option> > [% END %] > [% END %] > </select> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt >index c50629c..dba55df 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt >@@ -222,22 +222,22 @@ function delete_contact(ev) { > <ol> > <li><label for="list_currency">List prices are: </label> > <select name="list_currency" id="list_currency"> >- [% FOREACH currency IN currencies %] >- [% IF booksellerid and currency.currency == listprice or not booksellerid and currency.active %] >- <option value="[% currency.currency %]" selected="selected">[% currency.currency %]</option> >- [% ELSIF not currency.archived %] >- <option value="[% currency.currency %]" selected="selected">[% currency.currency %]</option> >+ [% FOREACH c IN currencies %] >+ [% IF booksellerid and c.currency == listprice or not booksellerid and c.active %] >+ <option value="[% c.currency %]" selected="selected">[% c.currency %]</option> >+ [% ELSIF not c.archived %] >+ <option value="[% c.currency %]">[% c.currency %]</option> > [% END %] > [% END %] > </select> > </li> > <li><label for="invoice_currency">Invoice prices are: </label> > <select name="invoice_currency" id="invoice_currency"> >- [% FOREACH currency IN currencies %] >- [% IF booksellerid and currency.currency == invoiceprice or not booksellerid and currency.active %] >- <option value="[% currency.currency %]" selected="selected">[% currency.currency %]</option> >- [% ELSIF not currency.archived %] >- <option value="[% currency.currency %]" selected="selected">[% currency.currency %]</option> >+ [% FOREACH c IN currencies %] >+ [% IF booksellerid and c.currency == invoiceprice or not booksellerid and c.active %] >+ <option value="[% c.currency %]" selected="selected">[% c.currency %]</option> >+ [% ELSIF not c.archived %] >+ <option value="[% c.currency %]">[% c.currency %]</option> > [% END %] > [% END %] > </select> >-- >2.1.4
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 16227
:
50067
|
50150
|
50219