fix: always set correct gst treatment#3751
Conversation
WalkthroughUpdated GST treatment assignment in Changes
Sequence Diagram(s)sequenceDiagram
participant TX as transaction.py
participant DB as ItemTaxTemplate DB
participant Item as Item
rect rgb(235, 248, 255)
Note over TX,DB: New flow — direct map build
TX->>DB: query names for item_templates set
DB-->>TX: returns mapping (item_tax_template -> gst_treatment)
TX->>Item: item.gst_treatment = gst_treatment_map.get(item.item_tax_template)
alt no treatment
TX->>Item: apply default_treatment
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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). (4)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3751 +/- ##
===========================================
- Coverage 69.60% 69.59% -0.02%
===========================================
Files 182 182
Lines 17974 17967 -7
===========================================
- Hits 12511 12504 -7
Misses 5463 5463
🚀 New features to boost your workflow:
|
847a328 to
31690a4
Compare
…tfix/pr-3751 fix: always set correct gst treatment (backport #3751)
…tfix/pr-3751 fix: always set correct gst treatment (backport #3751)
Issue: incorrect gst treatment if the item tax template is changed from the backend or the item tax template is updated from exempted to taxable.
Steps to replicate:
18%.ExemptedGST treatment will be Taxable, but the Item Tax Template will be
Exemptedbecause erpnext changed it.Summary by CodeRabbit