From fd9f9f9be17207b8e4e152d3b5f25bee5260ad38 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 8 Apr 2016 11:42:15 +0100 Subject: [PATCH] Bug 16227: Fix regression from bug 15084 - select currencies correctly 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 Signed-off-by: Katrin Fischer Signed-off-by: Brendan Gallagher --- acqui/neworderempty.pl | 2 ++ .../prog/en/modules/acqui/neworderempty.tt | 14 ++++++------- .../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 3885a7b347..4fdf33fdc1 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 dbb2b02315..77a9abcbda 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 c50629c038..dba55df7a1 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.39.5