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

--- Comment #2 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 205793
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205793&action=edit
Bug 43534: Allow MarcFieldsToOrder to map a MARC field to supplier's reference
number/qualifier

This adds two new fields to the MarcFieldsToOrder mapping mechanism:
suppliers_reference_number (mapped from a MARC field, like the other
MarcFieldsToOrder fields) and suppliers_reference_qualifier (a literal
EDIFACT reference qualifier code, e.g. SLI, rather than a MARC mapping,
since it does not vary per record).

Both are stored on the resulting aqorders row (suppliers_reference_number
/ suppliers_reference_qualifier), the same columns already populated by
the EDIFACT quote-to-order flow.

On the "review staged records" screen (addorderiso2709.pl), the supplier
reference is shown read-only, taken only from the MARC record's own
mapping - it is the vendor's identifier, not something a librarian edits
or bulk-applies. Once an order line is saved, the supplier reference is
shown read-only on the order line detail view (neworderempty.tt) too,
appearing only when set - which only happens for order lines created via
EDI or a MARC order file, so manually-created order lines are unaffected.

Also adds a discoverability panel to the MARC order accounts admin page,
showing the currently configured MarcFieldsToOrder / MarcItemFieldsToOrder
mappings and linking to the relevant system preferences, since that
mapping is global and not editable from the account itself.

Test plan:
1. Apply patch, restart_all.
2. Set the MarcFieldsToOrder system preference to include:
   suppliers_reference_number: 037$a
   suppliers_reference_qualifier: SLI
3. Stage a MARC file for MARC ordering that has a 037$a value, using either
   the UI (Acquisitions > MARC order accounts > new account > order from
   file) or the marc_ordering_process.pl cronjob.
4. On the "review staged records" screen (addorderiso2709.pl), confirm the
   "Supplier reference" field shows the mapped value but cannot be edited,
   and that there is no "apply to all" override for it.
5. Save the order and confirm the resulting order line has
   suppliers_reference_number and suppliers_reference_qualifier set
   correctly (visible via the order line detail page, or by checking the
   aqorders table).
6. Open that order line for editing (acqui/neworderempty.pl?ordernumber=X)
   and confirm a read-only "Supplier reference" entry is shown in the
   accounting details, with the qualifier in parentheses. Open a
   manually-created order line and confirm no such entry is shown there.
7. Go to Acquisitions > MARC order accounts > New account. Confirm the new
   "MARC field mappings" section shows the current MarcFieldsToOrder /
   MarcItemFieldsToOrder mappings and links to the relevant preferences.
8. prove t/db_dependent/Koha/MarcOrder.t

-- 
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