diff --git a/taxes_az/taxes_az/doctype/vat_allocation/vat_allocation.json b/taxes_az/taxes_az/doctype/vat_allocation/vat_allocation.json index bcfab92..923c1f4 100644 --- a/taxes_az/taxes_az/doctype/vat_allocation/vat_allocation.json +++ b/taxes_az/taxes_az/doctype/vat_allocation/vat_allocation.json @@ -168,7 +168,7 @@ "fieldname": "sales_invoice_previous_table", "fieldtype": "Table", "label": "Sales Invoice Previous Months", - "options": "VAT allocation sales invoice" + "options": "VAT allocation sales invoice previous months" }, { "fieldname": "column_break_lpuu", diff --git a/taxes_az/taxes_az/report/vat_allocation_report/vat_allocation_report.py b/taxes_az/taxes_az/report/vat_allocation_report/vat_allocation_report.py index 0ebc9af..81b6573 100644 --- a/taxes_az/taxes_az/report/vat_allocation_report/vat_allocation_report.py +++ b/taxes_az/taxes_az/report/vat_allocation_report/vat_allocation_report.py @@ -91,9 +91,8 @@ def calculate_row_data(vat_allocation_name): item_tax_template, SUM(amount) as total_amount, SUM(allocated_amount) as total_allocated - FROM `tabVAT allocation sales invoice` + FROM `tabVAT allocation sales invoice previous months` WHERE parent = %(parent)s - AND parentfield = 'sales_invoice_previous_table' GROUP BY item_tax_template """, {"parent": vat_allocation_name}, as_dict=1) @@ -104,7 +103,6 @@ def calculate_row_data(vat_allocation_name): SUM(unallocated_amount) as total_unallocated FROM `tabVAT allocation sales invoice` WHERE parent = %(parent)s - AND parentfield = 'sales_invoice_table' GROUP BY item_tax_template """, {"parent": vat_allocation_name}, as_dict=1)