https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20253
Martin Renvoize (ashimema) <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187171|0 |1 is obsolete| | --- Comment #61 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 187880 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187880&action=edit Bug 20253: (follow-up) Use purchase order number in BGM segment for outgoing ORDER messages When vendors are configured to use purchase order numbers for basket naming, the purchase order number should be included in outgoing ORDER messages as the document message number in the BGM segment for proper EDI workflow continuity. According to EDIFACT specifications, the purchase order number from incoming quote messages (RFF+ON segments) should be used as the document message number in the BGM segment of outgoing ORDER messages, rather than as a separate RFF+ON segment. This follow-up ensures that: 1. Purchase order numbers from incoming QUOTE messages are preserved 2. The same purchase order numbers are sent back in ORDER messages via BGM segment 3. Vendors receive the reference numbers they expect for order processing in the correct format. Implementation: - Added get_purchase_order_number() method to extract PO number from basket name when vendor is configured with 'po_is_basketname' - Modified beginning_of_message() to accept purchase order number parameter - Uses purchase order number in BGM segment when available, falls back to basketno - Added comprehensive tests for purchase order number handling in ORDER messages Test Plan: 1. Apply patches 2. Configure a vendor EDI account with "Basket name source" = "Purchase order number" 3. Process a QUOTE message containing RFF+ON segment 4. Verify basket is created with purchase order number as name 5. Generate ORDER message from the basket 6. Verify ORDER message contains purchase order number in BGM segment 7. Run tests: prove t/db_dependent/Koha/Edifact/Order.t This completes the round-trip EDI workflow for purchase order number handling according to EDIFACT standards: Quote RFF+ON → Basket Name → Order BGM Signed-off-by: Hannah Dunne-Howrie <[email protected]> Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/> Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/> Sponsored-by: OpenFifth <https://openfifth.co.uk/> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
