fix taxable amount for same items (#13927)
This commit is contained in:
parent
764b9bfeba
commit
55daa9cd24
@ -144,7 +144,17 @@ class Gstr1Report(object):
|
|||||||
""" % (self.doctype, ', '.join(['%s']*len(self.invoices))), tuple(self.invoices), as_dict=1)
|
""" % (self.doctype, ', '.join(['%s']*len(self.invoices))), tuple(self.invoices), as_dict=1)
|
||||||
|
|
||||||
for d in items:
|
for d in items:
|
||||||
self.invoice_items.setdefault(d.parent, {}).setdefault(d.item_code, d.base_net_amount)
|
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
|
||||||
|
|
||||||
def get_items_based_on_tax_rate(self):
|
def get_items_based_on_tax_rate(self):
|
||||||
self.tax_details = frappe.db.sql("""
|
self.tax_details = frappe.db.sql("""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user