Skip to content

[Bug][SubscriptionBilling]: Outdated ship-to address used on invoice when contract sell-to address is updated for 28.x#8087

Open
miljance wants to merge 1 commit into
microsoft:releases/28.xfrom
miljance:SBOutdatedShipToAddressFor28.x
Open

[Bug][SubscriptionBilling]: Outdated ship-to address used on invoice when contract sell-to address is updated for 28.x#8087
miljance wants to merge 1 commit into
microsoft:releases/28.xfrom
miljance:SBOutdatedShipToAddressFor28.x

Conversation

@miljance
Copy link
Copy Markdown
Contributor

@miljance miljance commented May 11, 2026

What & why

This is a backport of #7538 to 28.x
When the sell-to address was changed on a Customer Subscription Contract with Ship-to Code blank (default), the ship-to address fields were not updated, causing invoices to use the outdated ship-to address.

  • Add UpdateShipToAddressFromSellToAddress to sync ship-to fields from sell-to on Customer Subscription Contract (aligned with Sales Header)
  • Add ShipToAddressEqualsSellToAddress and IsShipToAddressEqualToSellToAddress helper with integration event
  • Refactor UpdatePayToAddressFromBuyFromAddress on Vendor Subscription Contract with shared IsPayToAddressEqualToBuyFromAddress helper (aligned with Purchase Header)
  • Promote notification ID getters to internal for testability
  • Add tests for both customer and vendor contract address sync

Linked work

Fixes AB#634783

How I validated this

  • I read the full diff and it contains only changes I intended.
  • I built the affected app(s) locally with no new analyzer warnings.
  • I ran the change in Business Central and confirmed it behaves as expected.
  • I added or updated tests for the new behavior, or explained below why none are needed.

What I tested and the outcome (required ΓÇö be specific: scenarios, commands, screenshots for UI changes)

Backported the changes

Risk & compatibility

None, this is a backport

Fixes AB#634783

…ted (microsoft#6974)

When the sell-to address was changed on a Customer Subscription Contract
with Ship-to Code blank (default), the ship-to address fields were not
updated, causing invoices to use the outdated ship-to address.

- Add UpdateShipToAddressFromSellToAddress to sync ship-to fields from
  sell-to on Customer Subscription Contract (aligned with Sales Header)
- Add ShipToAddressEqualsSellToAddress and IsShipToAddressEqualToSellToAddress
  helper with integration event
- Refactor UpdatePayToAddressFromBuyFromAddress on Vendor Subscription
  Contract with shared IsPayToAddressEqualToBuyFromAddress helper
  (aligned with Purchase Header)
- Promote notification ID getters to internal for testability
- Add tests for both customer and vendor contract address sync
@miljance miljance requested a review from a team as a code owner May 11, 2026 14:15
@github-actions github-actions Bot added AL: Apps (W1) Add-on apps for W1 From Fork Pull request is coming from a fork labels May 11, 2026
@miljance miljance changed the title [Bug][SubscriptionBilling]: Outdated ship-to address used on invoice when contract sell-to address is updated for 27.x [Bug][SubscriptionBilling]: Outdated ship-to address used on invoice when contract sell-to address is updated for 28.x May 11, 2026
@djukicmilica djukicmilica added the Linked Issue is linked to a Azure Boards work item label May 11, 2026
@djukicmilica djukicmilica enabled auto-merge (squash) May 11, 2026 19:44
@JesperSchulz JesperSchulz added the Finance GitHub request for Finance area label May 13, 2026
@JesperSchulz
Copy link
Copy Markdown
Contributor

We're having some instabilities in our check-in gates. Let's re-run this PR.

auto-merge was automatically disabled May 18, 2026 11:08

Pull request was closed

@JesperSchulz JesperSchulz reopened this May 18, 2026
@djukicmilica djukicmilica reopened this May 18, 2026
@djukicmilica djukicmilica enabled auto-merge (squash) May 18, 2026 12:13
auto-merge was automatically disabled May 18, 2026 12:16

Pull request was closed

@djukicmilica djukicmilica reopened this May 18, 2026
@djukicmilica djukicmilica enabled auto-merge (squash) May 18, 2026 12:17
@github-actions github-actions Bot added this to the Version 28.2 milestone May 18, 2026
auto-merge was automatically disabled May 21, 2026 13:55

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 Finance GitHub request for Finance area From Fork Pull request is coming from a fork Linked Issue is linked to a Azure Boards work item

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants