https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43874
Bug ID: 43874
Summary: EDIFACT GIR part-order sets (Lnn with LQT) are not
expanded into copies
Initiative type: ---
Sponsorship ---
status:
Product: Koha
Version: Main
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Acquisitions
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Target Milestone: ---
Koha treats every GIR segment as one copy. The EDItEUR Library EDI
Implementation Guidelines (v1.2: quotes, orders, order responses and invoices)
also define a part-order set, which is one GIR standing for several copies of
an order line that share the same branch, fund, shelfmark and servicing.
In a GIR segment the first element (DE 7297, set identification qualifier) is
either a copy sequence number 001 to 999, or a part-order sequence number L01
to L99. For a part-order set the number of copies is given by the LQT code
(part-order quantity, an integer in DE 7402), which the guidelines require with
an Lnn set and do not use with a copy number. For example:
GIR+L01+3:LQT+BR1:LLO+FIC:LSQ'
means 3 copies to branch BR1 in the FIC sequence, in place of GIR+001, GIR+002
and GIR+003. LAC may repeat to list the barcodes of the set, or LAF and LAL may
give a sequential range. It is a compact form for a large order spread over a
few branches.
Current behaviour:
- Koha::Edifact::Line::extract_gir reads LQT into part_order_quantity, but
nothing uses it. Each GIR is one entry, and segments with the same set number
are merged.
- Quotes: when there is more than one GIR the count must equal the quantity,
otherwise an error "Order for N items, M segments present" is recorded.
Koha::EDI has a comment, in the quote processing, that 1:1 GIR and 1:n GIR
(with LQT values) should both be handled there.
- Invoices: receipt_items and transfer_items take the branch from the GIR of
each copy. With one GIR for N copies, only the first copy is matched by its
branch, and the others have no branch. After bug 43755 they are taken from the
remaining items on the order without any branch matching, so nothing fails but
they may be taken from the wrong branch.
Some suppliers do not follow the guidelines exactly. For example the Civica
Spydus requirements for vendors put LQT on a numbered set
(GIR+001+2:LQT+ABB:LLO...). Support should accept LQT whatever the set number
is.
Proposed change: expand part-order sets in the parser, Koha::Edifact::Line,
into one entry per copy, so that quotes and invoices both see one GIR per copy
and need no changes of their own:
a. A GIR with LQT = n becomes n entries with the same field values.
b. A list of LAC values is spread over the copies in order, and an LAF to LAL
range is expanded into one barcode per copy.
c. The mismatch error for quotes is kept for a count that still does not match
after expansion, and the comment about LQT in the quote processing is removed.
Optionally, as a follow-up, Koha::Edifact::Order could send part-order sets for
a line whose copies share all their GIR data.
Related to bug 43755 (invoice lines with no GIR), which also changes how items
are matched on an invoice line.
Test plan:
1. Process a QUOTE whose line has QTY+21:3 and a single
GIR+L01+3:LQT+BR1:LLO+FIC:LSQ.
2. Without the patch: the line is not treated as 3 copies at BR1.
3. With the patch: the order line is for 3 copies, with 3 items at BR1 in the
FIC sequence.
4. Process an INVOIC for an order of 4 copies, 3 of them at BR1, with QTY+47:3
and GIR+L01+3:LQT+BR1:LLO.
5. Without the patch: only the first copy is matched by branch.
6. With the patch: the 3 items at BR1 are the ones received.
--
You are receiving this mail because:
You are the assignee for the bug.
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/