]> git.koha-community.org Git - koha.git/commit
Bug 9593: improve parsing of prices from staged files
authorLyon3 Team <koha@univ-lyon3.fr>
Tue, 15 Apr 2014 10:13:05 +0000 (12:13 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Sun, 4 May 2014 22:02:08 +0000 (22:02 +0000)
commit94d3aed746b8f925dd8832b104137741415b886c
tree860985ca4b19e6690243bdc8a0bd4cad63c041b7
parentbbd3db8c84af321485d93352ee6ccb83a96b61be
Bug 9593: improve parsing of prices from staged files

Initial bug :
When there's a round price with no decimals after it,
or when the symbol is after the digits, the price is not captured
by regular expression in MungeMarcPrice routine and the variable
is not initialized.

Enhancement :
The MungeMarcPrice routine had been widely modified.
It's still possible to priority pick the active currency but
unlike the previous mechanism that worked only for prices preceded
by the currency sign, it's now valid wherever the symbol is situated.
As symbol you may enter a pure currency sign as well as a string
including it like '$US'. Moreover, an 'isocode' column had been
added in currency table (editable in the staffo interface from
Administration/Currencies and exchange rates). So the active
currency can be picked either through its symbol or through its iso
code.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests, especially t/db_dependent/MungeMarcPrice.t
Checked currencies can be added, edited and deleted.
Notes: new ISO code field is mandatory.
       Sample sql files need to be updated (bug 12146)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Biblio.pm
admin/currency.pl
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tt
t/db_dependent/MungeMarcPrice.t [new file with mode: 0755]