Koha-clms/t/edi_testfiles
Martin Renvoize 711bb2dd76
Bug 30144: Add tests for EDIFACT servicing instruction handling
This commit adds comprehensive tests for servicing instruction
processing in both incoming quotes and outgoing orders:

1. Integration tests for incoming quote processing (Koha/EDI.pm)
   - Tests LVC (coded) and LVT (freetext) extraction
   - Tests multiple GIR occurrences with different servicing instructions
   - Tests all combinations: LVC only, LVT only, and LVC+LVT together

2. Test EDIFACT quote file (QUOTES_SERVICING.CEQ)
   - Contains 3 line items with 4 total orders
   - Demonstrates different servicing instruction patterns

3. Fix for multi-occurrence servicing instruction extraction
   - Modified quote_item() to extract servicing instructions
     per GIR occurrence instead of across all occurrences
   - Ensures each order gets only its own servicing instructions
   - Aligns with existing multi-item processing for funds and stock rotation

Test coverage:
- t/db_dependent/Koha/EDI.t: 29 tests for incoming quote processing
- t/db_dependent/Koha/Edifact/Order.t: 18 tests for outgoing order generation
  (previously added)

All tests pass successfully.

Sponsored-by: Martin Renvoize <martin.renvoize@gmail.com>
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-08-28 16:36:24 +00:00
..
BLSINV337023.CEI
…
INVOICE.CEI Bug 38689: Improve test coverage 2025-02-21 16:41:23 +01:00
QUOTES_413514.CEQ
…
QUOTES_BIG.CEQ Bug 38689: Improve test coverage 2025-02-21 16:41:23 +01:00
QUOTES_MULTI.CEQ Bug 38689: Improve test coverage 2025-02-21 16:41:23 +01:00
QUOTES_SERVICING.CEQ Bug 30144: Add tests for EDIFACT servicing instruction handling 2026-08-28 16:36:24 +00:00
QUOTES_SERVICING_INVALID_LVC.CEQ Bug 30144: Add tests for EDIFACT servicing instruction handling 2026-08-28 16:36:24 +00:00
QUOTES_SMALL.CEQ
…
QUOTES_SMALL_2.CEQ Bug 38271: Handle missing 008 fields in EDI 2024-10-29 08:46:38 +01:00
ordrsp1.CEA
…
ordrsp2.CEA
…
ordrsp3.CEA
…
ordrsp4.CEA
…
prquotes_73050_20140430.CEQ
…