https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42789 --- Comment #7 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 201088 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201088&action=edit Bug 42789: EDI ORDRSP cancellation should use Koha::Acquisition::Order->cancel() The process_ordrsp() function was calling C4::Acquisition::ModOrder() directly when processing a supplier cancellation, which only updated the order status fields and left associated items and purchase suggestions untouched. Replace with Koha::Acquisition::Order->cancel(), which mirrors the behaviour of manual cancellation via the acquisitions UI: - Deletes on-order items via safe_delete() with error capture - Reverts any linked purchase suggestion from ORDERED back to ACCEPTED - Updates orderstatus, cancellationreason and datecancellationprinted The delete_biblio option is intentionally omitted (defaults to false) as silent biblio deletion is not appropriate for an automated EDI flow. ModOrder is retained for the non-cancellation branch which only needs to update suppliers_report. Sponsored-by: OpenFifth <https://openfifth.co.uk/> Signed-off-by: Sharon Dugdale <sharon.dugdale@cumberland.gov.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.