Skip to content

[Bug][SubscriptionBilling]Apply customer/vendor "Format Region" when creating document lines#6911

Merged
JesperSchulz merged 1 commit into
microsoft:mainfrom
miljance:SBDateRegionFormatForSalesDocuments
Mar 5, 2026
Merged

[Bug][SubscriptionBilling]Apply customer/vendor "Format Region" when creating document lines#6911
JesperSchulz merged 1 commit into
microsoft:mainfrom
miljance:SBDateRegionFormatForSalesDocuments

Conversation

@miljance
Copy link
Copy Markdown
Contributor

@miljance miljance commented Mar 1, 2026

Summary

This pull request enhances the handling of date and number formatting for billing period descriptions in both sales and purchase documents, ensuring that the document's format region is used instead of the operator's region. It also introduces comprehensive automated tests to verify this behavior for both document types.

Improvements to formatting behavior:

  • Updated codeunit 8060 "Create Billing Documents" to temporarily set the format region to the document's format region (from SalesHeader or PurchaseHeader) when generating billing period descriptions, ensuring consistency regardless of the operator's regional settings. The override is cleared immediately after use.
  • Added a Language codeunit variable to manage format region overrides.
  • Added using System.Globalization; to support culture-specific formatting.

Automated tests:

  • Added two new tests in RecurringBillingDocsTest.Codeunit.al:
    • One verifies that sales document billing period descriptions use the document's format region, not the operator's.
    • The other ensures the same behavior for purchase documents, checking the attached description line.

Work Item(s)

Fixes #6680

Fixes AB#624267

@miljance miljance requested a review from a team as a code owner March 1, 2026 12:46
@github-actions github-actions Bot added AL: Apps (W1) Add-on apps for W1 From Fork Pull request is coming from a fork labels Mar 1, 2026
@miljance miljance changed the title Apply customer/vendor "Format Region" when creating document lines [Bug][SubscriptionBilling]Apply customer/vendor "Format Region" when creating document lines Mar 2, 2026
@JesperSchulz JesperSchulz added the Finance GitHub request for Finance area label Mar 2, 2026
@JesperSchulz JesperSchulz added the Linked Issue is linked to a Azure Boards work item label Mar 5, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Mar 5, 2026
@JesperSchulz JesperSchulz merged commit 71f120c into microsoft:main Mar 5, 2026
48 of 51 checks passed
djukicmilica pushed a commit that referenced this pull request Mar 20, 2026
…creating document lines for 28.x (#7085)

<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md
-->
#### Summary <!-- Provide a general summary of your changes -->
This is a backport of the PR
#6911

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes #6680
Fixes
[AB#625940](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/625940)
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.

[Bug][SubscriptionBilling]: Inconsistent date formatting in Subscription Billing Invoices and Credit Memos

3 participants