#14123 [Shopify] Keep gift cards from unverified POS returns on the sales invoice
Modified Shopify gift card handling on POS unverified returns so they remain on sales invoices rather than being treated as exchange items, preventing empty invoice generation with auto-release enabled.
- 13files
- 3AL files
- 3objects
Pull request · merged into main (BC30) on 2026-11-17 by onbuyuka · 13 files (+385 -37), 3 AL · fix · tier official · reviewed (checked by Opus)
What changed
- A gift card on a return with unverified return lines is treated as a regular order line again and invoiced
- Fixes empty sales invoices that failed to release when Auto Release was on
- Is Exchange Item is now set for every line as it is written, replacing MarkExchangeItemOrderLines, so re-importing fixes orders that were flagged by mistake
- Refund import creates no synthetic exchange refund line for these gift cards and removes one left by an earlier import
- Verified returns with exchanges behave as before; 7 tests added
- Behaviour changes for users or extensions.
AL objects touched
- Codeunit 30228 “Shpfy Refunds API”, Shopify: modified
- Codeunit 30250 “Shpfy Returns API”, Shopify: modified
- Codeunit 30161 “Shpfy Import Order”, Shopify: modified
Context
- Work items: AB#601701
- Labels: AL: Apps (W1), Team: Integrations
- Systems: integration
- From the description: “A Shopify POS unverified return can only be refunded to a gift card.”
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Process sales return orders — possibly related: Documents processing sales returns and handling refunds. (model-linked)
- Synchronize and fulfill sales orders — possibly related: Documents Shopify sales order processing and synchronization. (model-linked)
Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).