Fix conflict for taxable value having same item in GSTR-1 Report (#14492)
* Update gstr_1.py Merge conflict for taxable value having same item * Update gstr_1.py * Minor Fix * Update gstr_1.py
This commit is contained in:
parent
5d0674a23a
commit
46c8ccc6a8
@ -144,17 +144,10 @@ class Gstr1Report(object):
|
||||
""" % (self.doctype, ', '.join(['%s']*len(self.invoices))), tuple(self.invoices), as_dict=1)
|
||||
|
||||
for d in items:
|
||||
item_details = {}
|
||||
item_details[d.item_code] = d.base_net_amount
|
||||
|
||||
if d.parent in self.invoice_items:
|
||||
parent_dict = self.invoice_items[d.parent]
|
||||
if d.item_code in parent_dict:
|
||||
item_details[d.item_code] += parent_dict[d.item_code]
|
||||
else:
|
||||
item_details.update(parent_dict)
|
||||
|
||||
self.invoice_items[d.parent] = 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('base_net_amount', 0) for i in items
|
||||
if i.item_code == d.item_code and i.parent == d.parent))
|
||||
|
||||
def get_items_based_on_tax_rate(self):
|
||||
self.tax_details = frappe.db.sql("""
|
||||
|
Loading…
x
Reference in New Issue
Block a user