diff --git a/addons/l10n_in/data/account.account.template.csv b/addons/l10n_in/data/account.account.template.csv
index 756be074f75..1f845221b74 100644
--- a/addons/l10n_in/data/account.account.template.csv
+++ b/addons/l10n_in/data/account.account.template.csv
@@ -5,6 +5,7 @@
"p10051","SGST Receivable","10051","account.data_account_type_current_assets","l10n_in.indian_chart_template_standard","l10n_in.sgst_tag_account","False"
"p10052","CGST Receivable","10052","account.data_account_type_current_assets","l10n_in.indian_chart_template_standard","l10n_in.cgst_tag_account","False"
"p10053","IGST Receivable","10053","account.data_account_type_current_assets","l10n_in.indian_chart_template_standard","l10n_in.igst_tag_account","False"
+"p10057","Reverse Charge Tax Receivable","10057","account.data_account_type_current_assets","l10n_in.indian_chart_template_standard","","False"
"p10054","TDS Receivable","10058","account.data_account_type_current_assets","l10n_in.indian_chart_template_standard","","False"
"p10061","Deposit Account","10061","account.data_account_type_current_assets","l10n_in.indian_chart_template_standard","","False"
"p10071","Prepaid Insurance","10071","account.data_account_type_current_assets","l10n_in.indian_chart_template_standard","","False"
diff --git a/addons/l10n_in/data/account_fiscal_position_data.xml b/addons/l10n_in/data/account_fiscal_position_data.xml
index d36e31fc1d0..169c309f9d2 100644
--- a/addons/l10n_in/data/account_fiscal_position_data.xml
+++ b/addons/l10n_in/data/account_fiscal_position_data.xml
@@ -137,4 +137,75 @@
+
+
+ Reverse charge Intra State
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Reverse charge Inter State
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/l10n_in/data/account_tax_template_data.xml b/addons/l10n_in/data/account_tax_template_data.xml
index 16be0fcb531..30113e7741a 100644
--- a/addons/l10n_in/data/account_tax_template_data.xml
+++ b/addons/l10n_in/data/account_tax_template_data.xml
@@ -51,6 +51,37 @@
4
+
+
+ SGST Reverse Charge
+ SGST (RC)
+
+
+ 3
+
+
+ CGST Reverse Charge
+ CGST (RC)
+
+
+ 4
+
+
+
+ IGST Reverse Charge
+ IGST (RC)
+
+
+ 4
+
+
+ CESS Reverse Charge
+ CESS (RC)
+
+
+ 5
+
+
Exempt
Exempt
@@ -1949,4 +1980,1071 @@ if tax > result:result=tax
+
+
+
+
+
+ CESS Purchase 5% (RC)
+ CESS 5%
+ none
+ percent
+ 5
+
+
+
+
+
+
+
+
+ CESS Purchase 1591 Per Thousand (RC)
+ 1591 PER THOUSAND
+ none
+ fixed
+ 1.591
+
+
+
+
+
+
+
+
+ CESS 5% + RS.1591/THOUSAND (RC)
+ CESS 5% + RS.1591/THOUSAND
+ purchase
+ group
+ 0
+
+
+
+
+
+
+
+ CESS 21% or RS.4170/THOUSAND (RC)
+ CESS 21% or RS.4170/THOUSAND
+ purchase
+ code
+ 0
+ result=base_amount * 0.21
+tax=quantity * 4.17
+if tax > result:result=tax
+
+
+
+
+
+
+
+
+
+
+
+ IGST 1% (RC)
+ IGST 1%
+ purchase
+ percent
+ 1
+
+
+
+
+
+
+
+
+ IGST 2% (RC)
+ IGST 2%
+ purchase
+ percent
+ 2
+
+
+
+
+
+
+
+
+ IGST 28% (RC)
+ IGST 28%
+ purchase
+ percent
+ 28
+
+
+
+
+
+
+
+
+ IGST 18% (RC)
+ IGST 18%
+ purchase
+ percent
+ 18
+
+
+
+
+
+
+
+
+ IGST 12% (RC)
+ IGST 12%
+ purchase
+ percent
+ 12
+
+
+
+
+
+
+
+
+ IGST 5% (RC)
+ IGST 5%
+ purchase
+ percent
+ 5
+
+
+
+
+
+
+
+
+
+
+ SGST Purchase 0.5% (RC)
+ SGST 0.5%
+ none
+ percent
+ 0.5
+
+
+
+
+
+
+
+
+ CGST Purchase 0.5% (RC)
+ CGST 0.5%
+ none
+ percent
+ 0.5
+
+
+
+
+
+
+
+
+ GST 1% (RC)
+ GST 1%
+ purchase
+ group
+ 1.0
+
+
+
+
+
+
+
+ SGST Purchase 1% (RC)
+ SGST 1%
+ none
+ percent
+ 1
+
+
+
+
+
+
+
+
+ CGST Purchase 1% (RC)
+ CGST 1%
+ none
+ percent
+ 1
+
+
+
+
+
+
+
+
+
+ GST 2% (RC)
+ GST 2%
+ purchase
+ group
+ 2.0
+
+
+
+
+
+
+
+ SGST Purchase 14% (RC)
+ SGST 14%
+ none
+ percent
+ 14
+
+
+
+
+
+
+
+
+ CGST Purchase 14% (RC)
+ CGST 14%
+ none
+ percent
+ 14
+
+
+
+
+
+
+
+
+ GST 28% (RC)
+ GST 28%
+ purchase
+ group
+ 28.0
+
+
+
+
+
+
+
+ SGST Purchase 9% (RC)
+ SGST 9%
+ none
+ percent
+ 9
+
+
+
+
+
+
+
+
+ CGST Purchase 9% (RC)
+ CGST 9%
+ none
+ percent
+ 9
+
+
+
+
+
+
+
+
+ GST 18% (RC)
+ GST 18%
+ purchase
+ group
+ 18.0
+
+
+
+
+
+
+
+ SGST Purchase 6% (RC)
+ SGST 6%
+ none
+ percent
+ 6
+
+
+
+
+
+
+
+
+ CGST Purchase 6% (RC)
+ CGST 6%
+ none
+ percent
+ 6
+
+
+
+
+
+
+
+
+ GST 12% (RC)
+ GST 12%
+ purchase
+ group
+ 12.0
+
+
+
+
+
+
+
+ SGST Purchase 2.5% (RC)
+ SGST 2.5%
+ none
+ percent
+ 2.5
+
+
+
+
+
+
+
+
+ CGST Purchase 2.5% (RC)
+ CGST 2.5%
+ none
+ percent
+ 2.5
+
+
+
+
+
+
+
+
+ GST 5% (RC)
+ GST 5%
+ purchase
+ group
+ 5.0
+
+
+
+ 0
+
+
+
diff --git a/addons/l10n_in/report/account_invoice_report.py b/addons/l10n_in/report/account_invoice_report.py
index 5f59a4497aa..c37a11983cd 100644
--- a/addons/l10n_in/report/account_invoice_report.py
+++ b/addons/l10n_in/report/account_invoice_report.py
@@ -207,17 +207,17 @@ class L10nInAccountInvoiceReport(models.Model):
ELSE ''
END) as gst_format_shipping_bill_date,
CASE WHEN tag_rep_ln.account_tax_report_line_id IN
- (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_igst')
+ (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_igst', 'tax_report_line_igst_rc'))
THEN aml.balance
ELSE 0
END AS igst_amount,
CASE WHEN tag_rep_ln.account_tax_report_line_id IN
- (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_cgst')
+ (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_cgst', 'tax_report_line_cgst_rc'))
THEN aml.balance
ELSE 0
END AS cgst_amount,
CASE WHEN tag_rep_ln.account_tax_report_line_id IN
- (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_sgst')
+ (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_sgst', 'tax_report_line_sgst_rc'))
THEN aml.balance
ELSE 0
END AS sgst_amount,
@@ -226,14 +226,14 @@ class L10nInAccountInvoiceReport(models.Model):
JOIN account_account_tag aat_temp ON aat_temp.id = aat_aml_rel_temp.account_account_tag_id
JOIN account_tax_report_line_tags_rel tag_rep_ln_temp ON aat_temp.id = tag_rep_ln_temp.account_account_tag_id
where temp_aml.move_id = aml.move_id and temp_aml.product_id = aml.product_id
- and tag_rep_ln_temp.account_tax_report_line_id IN (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_cess')
+ and tag_rep_ln_temp.account_tax_report_line_id IN (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_cess', 'tax_report_line_cess_rc'))
) AS cess_amount,
CASE WHEN tag_rep_ln.account_tax_report_line_id IN
- (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_sgst') OR at.l10n_in_reverse_charge = True
+ (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_sgst', 'tax_report_line_sgst_rc'))
THEN NULL
ELSE (CASE WHEN aml.tax_base_amount <> 0 THEN aml.tax_base_amount ELSE NULL END)
END AS price_total,
- (CASE WHEN aj.type = 'sale' AND (am.move_type IS NULL OR am.move_type != 'out_refund') THEN -1 ELSE 1 END) AS amount_sign,
+ (CASE WHEN (aj.type = 'sale' AND am.move_type != 'out_refund') or (aj.type = 'purchase' AND at.l10n_in_reverse_charge AND am.move_type != 'in_refund') THEN -1 ELSE 1 END) AS amount_sign,
(CASE WHEN atr.parent_tax IS NOT NULL THEN atr.parent_tax
ELSE at.id END) AS tax_id,
(CASE WHEN atr.parent_tax IS NOT NULL THEN parent_at.amount
@@ -265,7 +265,7 @@ class L10nInAccountInvoiceReport(models.Model):
def _where(self):
return """
WHERE am.state = 'posted'
- AND tag_rep_ln.account_tax_report_line_id in (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_igst','tax_report_line_cgst','tax_report_line_sgst','tax_report_line_zero_rated'))
+ AND tag_rep_ln.account_tax_report_line_id in (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_igst', 'tax_report_line_cgst', 'tax_report_line_sgst', 'tax_report_line_zero_rated', 'tax_report_line_igst_rc', 'tax_report_line_cgst_rc', 'tax_report_line_sgst_rc'))
"""
def _group_by(self):
diff --git a/addons/l10n_in/report/hsn_gst_report.py b/addons/l10n_in/report/hsn_gst_report.py
index 6bf43767be6..f92bf8a3a0e 100644
--- a/addons/l10n_in/report/hsn_gst_report.py
+++ b/addons/l10n_in/report/hsn_gst_report.py
@@ -43,37 +43,37 @@ class L10nInProductHsnReport(models.Model):
CASE WHEN pt.l10n_in_hsn_description IS NULL THEN '' ELSE pt.l10n_in_hsn_description END AS hsn_description,
CASE WHEN uom.l10n_in_code IS NULL THEN '' ELSE uom.l10n_in_code END AS l10n_in_uom_code,
CASE WHEN tag_rep_ln.account_tax_report_line_id IN
- (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_sgst') OR at.l10n_in_reverse_charge = True
+ (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_sgst', 'tax_report_line_sgst_rc')) OR at.l10n_in_reverse_charge = True
THEN 0
ELSE aml.quantity
END AS quantity,
CASE WHEN tag_rep_ln.account_tax_report_line_id IN
- (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_igst')
+ (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_igst', 'tax_report_line_igst_rc'))
THEN aml.balance * (CASE WHEN aj.type = 'sale' THEN -1 ELSE 1 END)
ELSE 0
END AS igst_amount,
CASE WHEN tag_rep_ln.account_tax_report_line_id IN
- (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_cgst')
+ (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_cgst', 'tax_report_line_cgst_rc'))
THEN aml.balance * (CASE WHEN aj.type = 'sale' THEN -1 ELSE 1 END)
ELSE 0
END AS cgst_amount,
CASE WHEN tag_rep_ln.account_tax_report_line_id IN
- (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_sgst')
+ (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_sgst', 'tax_report_line_sgst_rc'))
THEN aml.balance * (CASE WHEN aj.type = 'sale' THEN -1 ELSE 1 END)
ELSE 0
END AS sgst_amount,
CASE WHEN tag_rep_ln.account_tax_report_line_id IN
- (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_cess')
+ (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_cess', 'tax_report_line_cess_rc'))
THEN aml.balance * (CASE WHEN aj.type = 'sale' THEN -1 ELSE 1 END)
ELSE 0
END AS cess_amount,
CASE WHEN tag_rep_ln.account_tax_report_line_id IN
- (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_sgst')
+ (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_sgst', 'tax_report_line_sgst_rc'))
THEN 0
ELSE (CASE WHEN aml.tax_line_id IS NOT NULL THEN aml.tax_base_amount ELSE aml.balance * (CASE WHEN aj.type = 'sale' THEN -1 ELSE 1 END) END)
END AS price_total,
(CASE WHEN tag_rep_ln.account_tax_report_line_id IN
- (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name='tax_report_line_sgst')
+ (SELECT res_id FROM ir_model_data WHERE module='l10n_in' AND name in ('tax_report_line_sgst', 'tax_report_line_sgst_rc'))
THEN 0
ELSE (CASE WHEN aml.tax_line_id IS NOT NULL THEN aml.tax_base_amount ELSE 1 END)
END) + (aml.balance * (CASE WHEN aj.type = 'sale' THEN -1 ELSE 1 END)) AS total