https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43059

--- Comment #1 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 201904
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201904&action=edit
Bug 43059: Add get_marc_price to MetadataExtractor

Adds get_marc_price() to both MARC21 and UNIMARC extractors:
- MARC21: extracts from 345$c, 020$c
- UNIMARC: extracts from 345$d, 010$d, 071$d

The price normalization logic (MungeMarcPrice) is implemented as a
shared _munge_price helper in the base MARC extractor class. It handles
currency symbol detection, thousand separators, and decimal
normalization.

Test plan:
1. Apply this patch
2. Run:
   prove t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC/MARC21.t
   prove t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC/UNIMARC.t
   => SUCCESS: All tests pass
3. Note the new get_marc_price() subtests covering:
   - Price extraction from each relevant field
   - Field priority order
   - Thousands separator removal
   - Comma to dot conversion (UNIMARC)
   - Returns 0 when no price present

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
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