From 5192426e8c6a759225a9a3fceba39d28b126f93a Mon Sep 17 00:00:00 2001 From: Jonathan Druart 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 --- 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() - [% FOREACH currency IN currencies %] - + [% FOREACH c IN currencies %] + [% END %]
  1. @@ -523,11 +523,11 @@ $(document).ready(function() [% ELSE %] 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) {
    1. -- 2.1.4