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: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
  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.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to