Skip to content

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

Open
miljance wants to merge 1 commit intomicrosoft:mainfrom
miljance:SBDateRegionFormatForSalesDocuments
Open

[Bug][SubscriptionBilling]Apply customer/vendor "Format Region" when creating document lines#6911
miljance wants to merge 1 commit intomicrosoft:mainfrom
miljance:SBDateRegionFormatForSalesDocuments

Conversation

@miljance
Copy link
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

@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
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

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