Bug 611704: Align Tax Transaction Value ID assignment with G/L Entry pattern - #10660
v-maheshsharma wants to merge 1 commit into
Conversation
Good Sense Reviewer - Round 1Recommendation: Request ChangesWhat this PR doesThis change moves Tax Transaction Value ID assignment away from SQL identity values by assigning Sequence No. Mgt. numbers before persistent inserts. That targets the reported overflow caused by repeated tax value delete/reinsert cycles and rollback or preview flows. The insert paths are covered, but the new sequence helper still uses the normal table sequence during posting preview because table 20261 is not marked as previewable, so the main source of burned numbers is still present. Problem-solution fitFit: Partial The change matches the reported table and the high-churn insert paths, but it does not fully match the rollback and posting preview part of the problem. Preview can still consume the persistent sequence, so the fix reduces reliance on SQL identity but does not fully remove the overflow path. SuggestionsS1 (🔴 High): Use a preview sequence for tax values Risk assessment and necessityRisk: The regression surface is India tax transaction storage during tax calculation, document posting, and transfer of tax values. ID allocation is data-sensitive because a duplicate, exhausted, or skipped persistent sequence can stop posting or tax recomputation; the change does not alter tax amounts directly, but it sits on a posting-adjacent path. Necessity: The change is necessary because the table is churned heavily and identity values can be consumed even when data is rolled back. The scope is close to the right G/L Entry pattern, but it must include the preview-sequence part of that pattern to solve the reported failure completely.
|
|
AB#611704
Slice 611704: [Repair Item][IN] Change "Tax Transaction Value".ID to be BigInteger
Issue
The ID field on the Tax Transaction Value table (20261) is assigned solely via SQL IDENTITY (
AutoIncrement). Due to high churn (delete + re-insert on every tax recompute) and non-transactional IDENTITY consumption (numbers burned on Posting Preview and rollbacks), the ID column overflowed, producing "Arithmetic overflow error converting IDENTITY to data type int" (AB#611704).Cause
ID generation depended only on the database IDENTITY column — there was no application-managed sequence and no alignment with the platform's standard ledger-entry numbering pattern used by G/L Entry.
Solution
Introduced G/L Entry–style ID assignment:
GetNextID()procedure that returns the next number fromSequence No. Mgt., mirroring G/L Entry'sGetNextEntryNo(). The field is left unchanged (Integer,AutoIncrement = true) — no schema/breaking change.ID := GetNextID()beforeInsert().Tested: Purchase Invoice posting completes successfully with no errors.