fix(India): Incorrect taxable in GSTR-3B report
This commit is contained in:
parent
25f9d58c34
commit
20f568c159
@ -244,11 +244,10 @@ class GSTR3BReport(Document):
|
|||||||
)
|
)
|
||||||
|
|
||||||
for d in item_details:
|
for d in item_details:
|
||||||
if d.item_code not in self.invoice_items.get(d.parent, {}):
|
self.invoice_items.setdefault(d.parent, {}).setdefault(d.item_code, 0.0)
|
||||||
self.invoice_items.setdefault(d.parent, {}).setdefault(d.item_code, 0.0)
|
self.invoice_items[d.parent][d.item_code] += d.get("taxable_value", 0) or d.get(
|
||||||
self.invoice_items[d.parent][d.item_code] += d.get("taxable_value", 0) or d.get(
|
"base_net_amount", 0
|
||||||
"base_net_amount", 0
|
)
|
||||||
)
|
|
||||||
|
|
||||||
if d.is_nil_exempt and d.item_code not in self.is_nil_exempt:
|
if d.is_nil_exempt and d.item_code not in self.is_nil_exempt:
|
||||||
self.is_nil_exempt.append(d.item_code)
|
self.is_nil_exempt.append(d.item_code)
|
||||||
@ -335,7 +334,7 @@ class GSTR3BReport(Document):
|
|||||||
|
|
||||||
def set_outward_taxable_supplies(self):
|
def set_outward_taxable_supplies(self):
|
||||||
inter_state_supply_details = {}
|
inter_state_supply_details = {}
|
||||||
|
invoice_list = {}
|
||||||
for inv, items_based_on_rate in self.items_based_on_tax_rate.items():
|
for inv, items_based_on_rate in self.items_based_on_tax_rate.items():
|
||||||
gst_category = self.invoice_detail_map.get(inv, {}).get("gst_category")
|
gst_category = self.invoice_detail_map.get(inv, {}).get("gst_category")
|
||||||
place_of_supply = (
|
place_of_supply = (
|
||||||
@ -343,6 +342,8 @@ class GSTR3BReport(Document):
|
|||||||
)
|
)
|
||||||
export_type = self.invoice_detail_map.get(inv, {}).get("export_type")
|
export_type = self.invoice_detail_map.get(inv, {}).get("export_type")
|
||||||
|
|
||||||
|
invoice_list.setdefault(inv, 0.0)
|
||||||
|
|
||||||
for rate, items in items_based_on_rate.items():
|
for rate, items in items_based_on_rate.items():
|
||||||
for item_code, taxable_value in self.invoice_items.get(inv).items():
|
for item_code, taxable_value in self.invoice_items.get(inv).items():
|
||||||
if item_code in items:
|
if item_code in items:
|
||||||
@ -361,7 +362,6 @@ class GSTR3BReport(Document):
|
|||||||
else:
|
else:
|
||||||
self.report_dict["sup_details"]["osup_det"]["iamt"] += taxable_value * rate / 100
|
self.report_dict["sup_details"]["osup_det"]["iamt"] += taxable_value * rate / 100
|
||||||
self.report_dict["sup_details"]["osup_det"]["txval"] += taxable_value
|
self.report_dict["sup_details"]["osup_det"]["txval"] += taxable_value
|
||||||
|
|
||||||
if (
|
if (
|
||||||
gst_category in ["Unregistered", "Registered Composition", "UIN Holders"]
|
gst_category in ["Unregistered", "Registered Composition", "UIN Holders"]
|
||||||
and self.gst_details.get("gst_state") != place_of_supply.split("-")[1]
|
and self.gst_details.get("gst_state") != place_of_supply.split("-")[1]
|
||||||
@ -374,10 +374,12 @@ class GSTR3BReport(Document):
|
|||||||
inter_state_supply_details[(gst_category, place_of_supply)]["iamt"] += (
|
inter_state_supply_details[(gst_category, place_of_supply)]["iamt"] += (
|
||||||
taxable_value * rate / 100
|
taxable_value * rate / 100
|
||||||
)
|
)
|
||||||
|
invoice_list[inv] += taxable_value
|
||||||
|
|
||||||
if self.invoice_cess.get(inv):
|
if self.invoice_cess.get(inv):
|
||||||
self.report_dict["sup_details"]["osup_det"]["csamt"] += flt(self.invoice_cess.get(inv), 2)
|
self.report_dict["sup_details"]["osup_det"]["csamt"] += flt(self.invoice_cess.get(inv), 2)
|
||||||
|
|
||||||
|
print({k: v for k, v in sorted(invoice_list.items(), key=lambda item: item[1])})
|
||||||
self.set_inter_state_supply(inter_state_supply_details)
|
self.set_inter_state_supply(inter_state_supply_details)
|
||||||
|
|
||||||
def set_supplies_liable_to_reverse_charge(self):
|
def set_supplies_liable_to_reverse_charge(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user