[29.0] Bug 649735: [Excise Tax] Improving Excise Duty Calculation - #11302
[29.0] Bug 649735: [Excise Tax] Improving Excise Duty Calculation#11302v-rohangarg20 wants to merge 4 commits into
Conversation
The item-ledger path evaluated RequiresTaxableAmount before the OnAfterUpdateExciseJournalLineFromItemLedgerEntry subscriber applied the rate for the ledger entry item category. When the item category and the ledger entry category resolved to different calculation types, an ad valorem or hybrid line could keep a zero taxable amount and calculate the wrong tax. The taxable amount is now set after the event so the final calculation type is used. Also fixed VerifyFAJournalLinesForAcquisitionCost to create the fixed asset rate with an explicit Excise Calculation Type, so the rate lookup resolves as the test expects.
…29.x The main-branch change deprecated table 7413 and page 7412 in favour of the new Excise Tax Rate table, gating them behind CLEAN30/CLEANSCHEMA33. Deprecating an object in a servicing branch is not valid: the obsolete tags 30.0 and 33.0 refer to versions newer than 29.x, and those CLEAN symbols are not defined here. The old table and page are therefore restored byte-identical to the 29.x baseline, and the preprocessor gates are dropped from the permission sets and the upgrade codeunit so the rate migration always runs. Only the additive part of the feature - the Excise Tax Rate table, the Excise Tax Rates page, the calculation type enum and the calculation changes - is backported.
Good Sense Reviewer - Round 1Recommendation: Request ChangesWhat this PR doesThis change adds ad valorem and hybrid excise calculation types, a rate table with item-category matching, migration from the old rate setup, journal/log fields, and calculation tests. The calculation flow applies the final rate before deciding whether taxable amount is needed, but the changed posted item-ledger path is still not covered by a posting-derived regression test. Problem-solution fitFit: Strong The described scenario is clear and the diff targets that behavior directly. SuggestionsS1 (🔴 High): Add posted-entry excise coverage Risk assessment and necessityRisk: High. This is a tax amount calculation path; a missing posted-entry regression can let a wrong taxable amount or tax amount reach the excise journal and transaction log. Necessity: The rate-model change is needed, but the posted item-ledger flow must be proven because that is where the production taxable amount is sourced.
|
Fixes AB#649735
Issue
The 29.0 branch did not support rate-based excise duty calculation for specific-per-unit, ad valorem, and hybrid duties. In item ledger scenarios, the tax amount could also be calculated incorrectly when the final item category changed the applicable calculation type.
Cause
The calculation flow relied on the legacy item and fixed-asset rate model and did not resolve an explicit calculation type before calculating the taxable amount. The new rate model also required migration and servicing-compatible schema changes for the 29.0 branch.
Solution
Validation
releases/29.0.