code change · fixIntegration & APIsofficial - Microsoftreviewed - checked by Opus

#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.

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

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.”

No source states these links: they share an object, a model read them, or a person found the same subject.

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).