Skip to content

fix: cart header layout. - #2

Merged
engahmed1190 merged 3 commits into
BrainWise-DEV:developfrom
defendicon:develop
Oct 4, 2025
Merged

fix: cart header layout.#2
engahmed1190 merged 3 commits into
BrainWise-DEV:developfrom
defendicon:develop

Conversation

@defendicon

Copy link
Copy Markdown
Contributor

No description provided.

@engahmed1190
engahmed1190 merged commit 3b2d655 into BrainWise-DEV:develop Oct 4, 2025
1 of 3 checks passed
FrontierSoftech pushed a commit to Frontier-Softech/POSNext that referenced this pull request Jan 24, 2026
Issue:
- ValidationError: Cannot use Reverse Charge Account in Row BrainWise-DEV#2 since transaction is without Reverse Charge
- Tax templates like 'Output GST RCM Out-state - TJCPL' contain both regular and RCM taxes
- RCM taxes should only be used when is_reverse_charge = 1
- India Compliance validates this and throws error for normal sales

Solution:
- Filter out RCM taxes in update_invoice() after loading taxes
- Filter out RCM taxes in validate() hook before processing
- Filter out RCM taxes in before_save() hook as final check
- Exclude RCM templates in get_tax_template_from_category() when auto-detecting

RCM Tax Identification:
- Uses India Compliance's get_gst_accounts_by_type() to identify RCM accounts
- Fallback to pattern matching (account name contains 'RCM')

Result:
- Normal POS sales now only use regular taxes (IGST, CGST, SGST)
- RCM taxes are automatically filtered out
- No validation errors
- Taxes calculated correctly

Files Modified:
- pos_next/api/invoices.py: Added RCM filtering after tax loading
- pos_next/api/sales_invoice_hooks.py: Added RCM filtering in validate and before_save hooks
- pos_next/api/gst_tax.py: Updated to exclude RCM templates in auto-detection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants