fixed vat allocation report not being in formula editor
This commit is contained in:
parent
4d778cf8f1
commit
24740d0b44
|
|
@ -7,19 +7,25 @@
|
|||
"doctype": "DocType",
|
||||
"engine": "InnoDB",
|
||||
"field_order": [
|
||||
"classification_name"
|
||||
"classification_name",
|
||||
"data_jprd"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"fieldname": "classification_name",
|
||||
"fieldtype": "Text",
|
||||
"label": "Classification Name"
|
||||
},
|
||||
{
|
||||
"fieldname": "data_jprd",
|
||||
"fieldtype": "Data",
|
||||
"label": "test"
|
||||
}
|
||||
],
|
||||
"grid_page_length": 50,
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2026-01-14 18:25:43.132614",
|
||||
"modified": "2026-02-10 20:51:03.394521",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Taxes Az",
|
||||
"name": "Classification code",
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
"disabled": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "Report",
|
||||
"filters": [],
|
||||
"idx": 0,
|
||||
"is_standard": "Yes",
|
||||
"json": "{}",
|
||||
"letter_head": "",
|
||||
"modified": "2025-11-26 12:00:00.000000",
|
||||
"modified_by": "Administrator",
|
||||
|
|
|
|||
|
|
@ -59,13 +59,17 @@ def get_columns():
|
|||
def get_data(filters):
|
||||
"""Get VAT allocation documents and calculate values"""
|
||||
|
||||
# Return empty data if filters are not provided (needed for Formula Editor)
|
||||
if not filters:
|
||||
return []
|
||||
|
||||
# Validate filters
|
||||
if not filters.get('company'):
|
||||
frappe.throw(_("Company is required"))
|
||||
return []
|
||||
if not filters.get('year'):
|
||||
frappe.throw(_("Year is required"))
|
||||
return []
|
||||
if not filters.get('month'):
|
||||
frappe.throw(_("Month is required"))
|
||||
return []
|
||||
|
||||
# Find VAT allocation document (max one result due to autoname format)
|
||||
vat_name = f"VAT-{filters.get('year')}-{filters.get('month')}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue