[Bug 43291] New: SIP2 responses hardcode currency to USD regardless of library configuration
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43291 Bug ID: 43291 Summary: SIP2 responses hardcode currency to USD regardless of library configuration Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: SIP2 Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org Target Milestone: --- C4::SIP::ILS::Transaction's sip_currency field (used for FID_CURRENCY in patron status and fee-related SIP2 responses) is hardcoded to 'USD' with a "FIXME: why hardcoded?" comment, regardless of the library's actual currency. Any library using a self-check/SIP2 integration outside the US gets an incorrect currency code in every fee-related SIP2 response. This patch uses Koha::Acquisition::Currencies->get_active's isocode when one is configured, falling back to 'USD' (the previous, and still sensible default, behaviour) when no active currency exists. Every C4::SIP::ILS::Transaction subclass calls SUPER::new() first and none of them override sip_currency in their own %fields, so this applies uniformly across checkout, checkin, renew, hold, and fee payment SIP responses. Test plan: 1. prove t/db_dependent/SIP/Transaction.t 2. With no active currency configured, confirm a SIP2 patron status response still reports USD (AY field / currency) 3. Mark a currency (e.g. GBP) as active in Administration > Currencies 4. Repeat step 2 and confirm the response now reports GBP -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43291 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 203594 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203594&action=edit Bug 43291: Use the active currency's isocode for SIP2 responses instead of hardcoded USD C4::SIP::ILS::Transaction's sip_currency field (used for FID_CURRENCY in patron status and fee-related SIP2 responses) was hardcoded to 'USD' with a 'FIXME: why hardcoded?' comment, regardless of the library's actual currency. Use Koha::Acquisition::Currencies->get_active's isocode when one is configured, falling back to 'USD' (the previous behaviour) when no active currency exists. Every C4::SIP::ILS::Transaction subclass calls SUPER::new() first and none of them override sip_currency in their own %fields, so this applies uniformly across checkout, checkin, renew, hold, and fee payment SIP responses. Test plan: 1) prove t/db_dependent/SIP/Transaction.t 2) With no active currency configured, confirm a SIP2 patron status response still reports USD (AY field / currency) 3) Mark a currency (e.g. GBP) as active in Administration > Currencies 4) Repeat step 2 and confirm the response now reports GBP -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43291 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43291 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43291 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43291 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.field@openfifth.co | |.uk, | |steven.raith@openfifth.co.u | |k -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org