fixed report vat allocation
This commit is contained in:
parent
b2fd9bbe7b
commit
b848bbd1d0
|
|
@ -168,7 +168,7 @@
|
||||||
"fieldname": "sales_invoice_previous_table",
|
"fieldname": "sales_invoice_previous_table",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"label": "Sales Invoice Previous Months",
|
"label": "Sales Invoice Previous Months",
|
||||||
"options": "VAT allocation sales invoice"
|
"options": "VAT allocation sales invoice previous months"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "column_break_lpuu",
|
"fieldname": "column_break_lpuu",
|
||||||
|
|
|
||||||
|
|
@ -91,9 +91,8 @@ def calculate_row_data(vat_allocation_name):
|
||||||
item_tax_template,
|
item_tax_template,
|
||||||
SUM(amount) as total_amount,
|
SUM(amount) as total_amount,
|
||||||
SUM(allocated_amount) as total_allocated
|
SUM(allocated_amount) as total_allocated
|
||||||
FROM `tabVAT allocation sales invoice`
|
FROM `tabVAT allocation sales invoice previous months`
|
||||||
WHERE parent = %(parent)s
|
WHERE parent = %(parent)s
|
||||||
AND parentfield = 'sales_invoice_previous_table'
|
|
||||||
GROUP BY item_tax_template
|
GROUP BY item_tax_template
|
||||||
""", {"parent": vat_allocation_name}, as_dict=1)
|
""", {"parent": vat_allocation_name}, as_dict=1)
|
||||||
|
|
||||||
|
|
@ -104,7 +103,6 @@ def calculate_row_data(vat_allocation_name):
|
||||||
SUM(unallocated_amount) as total_unallocated
|
SUM(unallocated_amount) as total_unallocated
|
||||||
FROM `tabVAT allocation sales invoice`
|
FROM `tabVAT allocation sales invoice`
|
||||||
WHERE parent = %(parent)s
|
WHERE parent = %(parent)s
|
||||||
AND parentfield = 'sales_invoice_table'
|
|
||||||
GROUP BY item_tax_template
|
GROUP BY item_tax_template
|
||||||
""", {"parent": vat_allocation_name}, as_dict=1)
|
""", {"parent": vat_allocation_name}, as_dict=1)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue