---
id: change/bcapps/10741
type: change
title: "#10741 [Shopify] Fix exchange refund order links, totals, and refund page layout"
summary: Fixed Shopify return-with-exchange processing by ensuring exchange credit memos retain order identifiers, creating proper document links for moved invoices, excluding exchange items from order totals in the factbox, and repositioning the tax section on the refund page.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit shpfy document link mgt.
  - page shpfy refund
  - codeunit shpfy create sales doc. refund
  - codeunit shpfy copy sales document
  - page shpfy order totals factbox
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:07:15.614Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 542c26b4440ba4d498932e722279f847d39ffd43
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10741
    title: "microsoft/BCApps#10741: [Shopify] Fix exchange refund order links, totals, and refund page layout"
    date: "2026-08-28"
    commit: 542c26b4440ba4d498932e722279f847d39ffd43
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/30262
    - object/page/30145
    - object/codeunit/30246
    - object/codeunit/30408
    - object/page/30172
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10741
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10741
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-28T12:29:39Z"
author: onbuyuka
author_type: User
community_contribution: false
labels:
  - "AL: Apps (W1)"
  - "Team: Integrations"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 7
  additions: 351
  deletions: 19
  al: 5
apps:
  - Shopify
objects_touched:
  - key: codeunit/30262
    page: codeunit/30262
    type: codeunit
    id: 30262
    name: Shpfy Document Link Mgt.
    app: Shopify
    status: modified
  - key: page/30145
    page: page/30145
    type: page
    id: 30145
    name: Shpfy Refund
    app: Shopify
    status: modified
  - key: codeunit/30246
    page: codeunit/30246
    type: codeunit
    id: 30246
    name: Shpfy Create Sales Doc. Refund
    app: Shopify
    status: modified
  - key: codeunit/30408
    page: codeunit/30408
    type: codeunit
    id: 30408
    name: Shpfy Copy Sales Document
    app: Shopify
    status: modified
  - key: page/30172
    page: page/30172
    type: page
    id: 30172
    name: Shpfy Order Totals FactBox
    app: Shopify
    status: modified
objects_unjoined: []
obsoletions: []
backports:
  - number: 11402
    base: releases/29.x
    url: https://github.com/microsoft/BCApps/pull/11402
fixes_issues: []
work_items:
  - 647857
  - 647858
  - 647859
  - 647961
systems:
  - integration
quote: null
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #10741 [Shopify] Fix exchange refund order links, totals, and refund page layout

> Fixed Shopify return-with-exchange processing by ensuring exchange credit memos retain order identifiers, creating proper document links for moved invoices, excluding exchange items from order totals in the factbox, and repositioning the tax section on the refund page.

[Pull request](https://github.com/microsoft/BCApps/pull/10741) · merged into `main` (BC30) on 2026-08-28 by onbuyuka · 7 files (+351 -19), 5 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Exchange credit memos and moved invoices now stamped with Shopify order identifiers for proper sync
- Moved invoices created from exchange credit memos automatically linked to Shopify orders
- Order totals factbox now excludes exchange items from Shopify subtotal, total, and VAT calculations
- Tax section repositioned below lines on Shopify refund page layout
- New tests validate exchange item handling in credit memos and order totals
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 30262 "Shpfy Document Link Mgt."](../../objects/codeunit/30262.md), Shopify: modified
- [Page 30145 "Shpfy Refund"](../../objects/page/30145.md), Shopify: modified
- [Codeunit 30246 "Shpfy Create Sales Doc. Refund"](../../objects/codeunit/30246.md), Shopify: modified
- [Codeunit 30408 "Shpfy Copy Sales Document"](../../objects/codeunit/30408.md), Shopify: modified
- [Page 30172 "Shpfy Order Totals FactBox"](../../objects/page/30172.md), Shopify: modified

## Also merged into

- [#11402](https://github.com/microsoft/BCApps/pull/11402) into `releases/29.x` on 2026-09-18

## Context

- Work items: AB#647857, AB#647858, AB#647859, AB#647961
- Labels: AL: Apps (W1), Team: Integrations
- Systems: integration

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