fix: set taxes and totals before validating subcontracting transaction#3782
Conversation
WalkthroughMoves tax initialization to the start of subcontracting transaction validation, removes a duplicate tax initialization, and updates tests and ITC-04 test data to reflect adjusted numeric totals and txval values. Changes
Sequence Diagram(s)sequenceDiagram
participant Caller as validate(doc)
participant FieldMap as field_map selection
participant TaxCtrl as CustomTaxController
participant Remaining as remaining validation logic
Note over Caller,FieldMap: Reordered — taxes set early
Caller->>FieldMap: determine field_map
FieldMap->>TaxCtrl: CustomTaxController(doc, field_map)
TaxCtrl->>TaxCtrl: set_taxes_and_totals()
TaxCtrl-->>Caller: taxes & totals set
Caller->>Remaining: continue validate (checks, updates, return)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-06-25T08:19:02.607ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
9d5e3d0 to
7cea4ab
Compare
|
@karm1000 resolve test cases |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3782 +/- ##
========================================
Coverage 69.59% 69.59%
========================================
Files 182 182
Lines 17967 17967
========================================
Hits 12504 12504
Misses 5463 5463
🚀 New features to boost your workflow:
|
|
@Mergifyio backport version-15-hotfix |
✅ Backports have been createdDetails
|
…tfix/pr-3782 fix: set taxes and totals before validating subcontracting transaction (backport #3782)
Fixes: #3777
Summary by CodeRabbit
Refactor
Bug Fixes / Tests
Tests