Skip to content

Commit

Permalink
fix: GST Reports timeout issue
Browse files Browse the repository at this point in the history
  • Loading branch information
deepeshgarg007 committed Jul 21, 2021
1 parent 57514f7 commit 8a64a84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions erpnext/regional/doctype/gstr_3b_report/gstr_3b_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,8 @@ def get_outward_items(self, doctype):

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,
sum((i.get('taxable_value', 0) or i.get('base_net_amount', 0)) for i in item_details
if i.item_code == d.item_code and i.parent == d.parent))
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('base_net_amount', 0)

if d.is_nil_exempt and d.item_code not in self.is_nil_exempt:
self.is_nil_exempt.append(d.item_code)
Expand Down
5 changes: 2 additions & 3 deletions erpnext/regional/report/gstr_1/gstr_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,8 @@ def get_invoice_items(self):

for d in items:
if d.item_code not in self.invoice_items.get(d.parent, {}):
self.invoice_items.setdefault(d.parent, {}).setdefault(d.item_code,
sum((i.get('taxable_value', 0) or i.get('base_net_amount', 0)) for i in items
if i.item_code == d.item_code and i.parent == d.parent))
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('base_net_amount', 0)

item_tax_rate = {}

Expand Down

0 comments on commit 8a64a84

Please sign in to comment.