Bug 16227

Summary: The currencies of vendor and order do not display correctly
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: AcquisitionsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: brendan, julian.maurice
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 15084    
Bug Blocks:    
Attachments: Bug 16227: Fix regression from bug 15084 - select currencies correctly
[SIGNED-OFF] Bug 16227: Fix regression from bug 15084 - select currencies correctly
[PASSED QA] Bug 16227: Fix regression from bug 15084 - select currencies correctly

Description Jonathan Druart 2016-04-08 10:42:09 UTC
From commit 1538e9ecf47642c4974693ff499c3e95e4d71977
     Bug 15084: Replace C4::Budgets::GetCurrencies with Koha::Acquisition::Currencies->search
"""
    Most part of the code here is unnecessary complex. We should selected
    the currency if it is selected, that's all :)
"""

Well, it's not hard to change, but the commit was wrong.
The expected behaviors are:
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
Comment 1 Jonathan Druart 2016-04-08 10:44:20 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2016-04-12 14:38:27 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2016-04-14 05:34:12 UTC
Created attachment 50219 [details] [review]
[PASSED QA] 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 <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Brendan Gallagher 2016-04-20 18:36:22 UTC
Pushed to Master - Should be in the May 2016 Release.  Thanks!
Comment 5 Julian Maurice 2016-04-21 07:36:35 UTC
Not needed in stable versions, status changed to RESOLVED