Skip to content

Backport #10990: [29.x] Add Expense VAT settings to Contoso demo tool - #10994

Open
Alexander Yakunin (Alexander-Ya) wants to merge 3 commits into
releases/29.xfrom
backport/releases/29.x/10990/20260903114017
Open

Backport #10990: [29.x] Add Expense VAT settings to Contoso demo tool#10994
Alexander Yakunin (Alexander-Ya) wants to merge 3 commits into
releases/29.xfrom
backport/releases/29.x/10990/20260903114017

Conversation

@Alexander-Ya

@Alexander-Ya Alexander Yakunin (Alexander-Ya) commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Backport of #10990 to releases/29.x.

Original change: Add Expense VAT settings to the Contoso demo tool.

Bug: AB#648890

@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 1

Recommendation: Request Changes

What this PR does

The change wires Expense VAT rate creation into the Contoso demo module for the 29.x branch. This should let demo data create VAT product posting groups, VAT posting setup, and default VAT settings for Expense Agent categories.

The new call is not enough to create a complete setup. The VAT rate code depends on the Expense Agent setup already having a default VAT business posting group. The existing setup helper fills that default and records that VAT rates were applied, but the direct codeunit call bypasses both parts.

Problem-solution fit

Fit: Partial

The change adds VAT rates to demo master data, but it does not apply the full setup state that the VAT flow needs. A demo company can still be left without the default VAT business posting group used by agent-created VAT specifications.

Suggestions

S1 (🔴 High): Use the setup helper for VAT defaults
The new Codeunit.Run(Codeunit::"Create Expense VAT Rates") call can run while Default VAT Bus. Posting Group is still blank. Then the rates are created for the wrong VAT business group, and later agent VAT specifications can fail because the setup default is missing. Please call the setup helper that sets the default VAT business posting group and applies the rates, or set the same setup fields before creating the rates.

Risk assessment and necessity

Risk: This affects Contoso Expense Agent demo setup and VAT posting setup. If the default VAT business group is missing or the rates are created against a blank group, demo expenses can fail VAT specification insertion or use incomplete VAT setup.

Necessity: The change is needed so demo data includes the VAT settings used by Expense Agent. The scope is right, but it needs to use the setup path that creates a complete configuration.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=10994 round=1 by=alexei-dobriansky at=2026-09-03T13:20:11Z lastSha=5354de386f7ef1ed226c15fea69d6414196a6936 reviewKey=2c4dd2e162ae60c7d3c1a8c178565442d297641d77db8e387249f288868d3d4e suggestions=S1@43fb032b

@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Good Sense Reviewer - Round 2

Recommendation: Request Changes

What this PR does

The update changes Expense Agent demo setup to use a country-aware setup path, adds VAT-rate G/L accounts for demo data, and sets the default VAT business posting group before creating VAT rates. It also carries more expense fields into report lines and adds country-specific per-diem demo data.

The previous blank VAT business posting group issue is fixed in the demo flow. However, the shared VAT-rate creation code now depends on demo G/L accounts that are not created by the setup default path, and the demo flow does not mark VAT defaults as applied after creating them.

Status of previous suggestions
ID Title Status Author response
S1 Use the setup helper for VAT defaults Addressed The demo path now sets the default VAT business posting group before VAT-rate creation.
New observations (commits since round 1)

S2 (🔴 High): Default VAT setup can miss purchase account
The new account lookup only fills Purchase VAT Account when an Expense VAT account already exists. The setup default path can run this code before those demo accounts are created, so VAT Posting Setup may be inserted without a purchase VAT account. Create or keep a fallback account before inserting the setup.

S3 (🟠 Moderate): Mark VAT defaults as applied
The demo flow sets the default VAT business group and runs the VAT rate codeunit directly. It does not set VAT Rates Applied after the rates succeed, so the setup page can still show the defaults as missing. Use the setup helper or set the flag in the same successful flow.

Risk assessment and necessity

Risk: This touches VAT Posting Setup, default VAT groups, and report VAT specification amounts. If the VAT setup is incomplete, expense VAT posting can fail or use incomplete account setup.

Necessity: Adding VAT setup to Expense Agent demo data is needed so the demo company can create usable VAT specifications. The scope is appropriate, but the default setup path must stay complete and the setup state must match the inserted VAT data.


[AI-PR-REVIEW] version=1 promptVersion=4 system=github pr=10994 round=2 by=alexei-dobriansky at=2026-09-09T13:50:28Z lastSha=0fd59bb721a8528685550ea7640c406cd6a90510 reviewKey=04c201dc9592251a56eab972b274c2ea47d9655e6f125b5a5cf2693d8dcf9ef6 suggestions=S1@43fb032b:addressed,S2@500c29cc:new,S3@81adb082:new parentRound=1

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 ExpenseManagement Team: Finance GitHub request for Finance area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants