[Koha-bugs] [Bug 15084] Move the currency related code to Koha::Acquisition::Currenc[y|ies]

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Dec 18 11:18:13 CET 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15084

Josef Moravec <josef.moravec at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #45690|0                           |1
        is obsolete|                            |

--- Comment #20 from Josef Moravec <josef.moravec at gmail.com> ---
Created attachment 45807
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45807&action=edit
Bug 15084: Add Koha::Acquisition::Currenc[y|ies] classes

The first step of this patch set is to move the business logic code from
admin/currencies.pl to Koha::Acquisition::Currenc[y|ies].

Then a foreign key will be created on aqorders.currency as we want to
assure data integrity. Note that a aqbooksellers.currency also exists
but is never used. It could be removed in another bug report.
This update has to care about possible breaking relation. For instance
an old order has been made using a currency which is now deleted. To be
sure the update process won't break a new column currency.archived is
created and leave open the door for a further improvement (marked a
currency as archived from the interface: this won't be provided by this
enhancement).
These archived currencies won't appear on the interface for newly
created items (order/suggestion).

Once this is done it becomes easy to remove the subroutine from
C4::Budgets: GetCurrencies and GetCurrency.
ConvertCurrency will also be removed but is not used anymore.

Note that none of these subroutines were covered by tests. Now they are.

Test plan:
0/ Don't apply this patch
1/ Create a temporary currency and an order using it
2/ Remove the currency from your CLI
3/ Apply the patch and execute the DB entry
4/ Note that the currency is inserted and marked as archived.
5/ Edit the previous order and confirm that the correct currency is
still selected.
It won't never be displayed anywhere else.
6/ Test the admin script: on admin/currency.pl add/remove/edit
currencies.
You could not have 2 active currencies at the same time.
7/ Then on the different scripts of the acquisition module, focus on the
currencies values and create a new order, receive it.
Create/edit a suggestion

Other changes must be checked by the QAer.

Signed-off-by: Josef Moravec <josef.moravec at gmail.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list