Compare commits
36 Commits
version-14
...
v14.70.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c4a2af9ab | ||
|
|
5ba0082bc7 | ||
|
|
47b3e96a37 | ||
|
|
810378c899 | ||
|
|
bdf198c94f | ||
|
|
e8286d7b3c | ||
|
|
fd73a8a348 | ||
|
|
91de46922d | ||
|
|
3823e0e494 | ||
|
|
b6648eebfa | ||
|
|
faa3c7c3a4 | ||
|
|
13dfbe3d80 | ||
|
|
7e3c15e0b6 | ||
|
|
c910b8ab03 | ||
|
|
b9ebb50a02 | ||
|
|
38cc28a4c3 | ||
|
|
bbb9b9e3b6 | ||
|
|
94c3ee645d | ||
|
|
b7d6a54bed | ||
|
|
05e4dae1b8 | ||
|
|
dfaca93292 | ||
|
|
40de3f3481 | ||
|
|
9d5e4b3b3a | ||
|
|
d7709cf4e4 | ||
|
|
5ae29655f9 | ||
|
|
81a99309d8 | ||
|
|
d160f5b61a | ||
|
|
40ece3f5da | ||
|
|
c93840eb56 | ||
|
|
2026c986ba | ||
|
|
91c202f172 | ||
|
|
7e52f72bed | ||
|
|
30b2cac423 | ||
|
|
67be2ba9dc | ||
|
|
84789b7407 | ||
|
|
cd70c6c1b2 |
@@ -3,7 +3,7 @@ import inspect
|
||||
|
||||
import frappe
|
||||
|
||||
__version__ = "14.67.1"
|
||||
__version__ = "14.70.5"
|
||||
|
||||
|
||||
def get_default_company(user=None):
|
||||
|
||||
@@ -5,14 +5,15 @@
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.utils import flt
|
||||
from pypika import Order
|
||||
|
||||
import erpnext
|
||||
from erpnext.accounts.report.item_wise_sales_register.item_wise_sales_register import (
|
||||
add_sub_total_row,
|
||||
add_total_row,
|
||||
apply_group_by_conditions,
|
||||
get_grand_total,
|
||||
get_group_by_and_display_fields,
|
||||
get_group_by_conditions,
|
||||
get_tax_accounts,
|
||||
)
|
||||
from erpnext.accounts.report.utils import get_query_columns, get_values_for_columns
|
||||
@@ -29,7 +30,7 @@ def _execute(filters=None, additional_table_columns=None):
|
||||
|
||||
company_currency = erpnext.get_company_currency(filters.company)
|
||||
|
||||
item_list = get_items(filters, get_query_columns(additional_table_columns))
|
||||
item_list = get_items(filters, additional_table_columns)
|
||||
aii_account_map = get_aii_accounts()
|
||||
if item_list:
|
||||
itemised_tax, tax_columns = get_tax_accounts(
|
||||
@@ -287,59 +288,87 @@ def get_columns(additional_table_columns, filters):
|
||||
return columns
|
||||
|
||||
|
||||
def get_conditions(filters):
|
||||
conditions = ""
|
||||
def apply_conditions(query, pi, pii, filters):
|
||||
for opts in ("company", "supplier", "item_code", "mode_of_payment"):
|
||||
if filters.get(opts):
|
||||
query = query.where(pi[opts] == filters[opts])
|
||||
|
||||
for opts in (
|
||||
("company", " and `tabPurchase Invoice`.company=%(company)s"),
|
||||
("supplier", " and `tabPurchase Invoice`.supplier = %(supplier)s"),
|
||||
("item_code", " and `tabPurchase Invoice Item`.item_code = %(item_code)s"),
|
||||
("from_date", " and `tabPurchase Invoice`.posting_date>=%(from_date)s"),
|
||||
("to_date", " and `tabPurchase Invoice`.posting_date<=%(to_date)s"),
|
||||
("mode_of_payment", " and ifnull(mode_of_payment, '') = %(mode_of_payment)s"),
|
||||
):
|
||||
if filters.get(opts[0]):
|
||||
conditions += opts[1]
|
||||
if filters.get("from_date"):
|
||||
query = query.where(pi.posting_date >= filters.get("from_date"))
|
||||
|
||||
if filters.get("to_date"):
|
||||
query = query.where(pi.posting_date <= filters.get("to_date"))
|
||||
|
||||
if filters.get("item_group"):
|
||||
query = query.where(pii.item_group == filters.get("item_group"))
|
||||
|
||||
if not filters.get("group_by"):
|
||||
conditions += (
|
||||
"ORDER BY `tabPurchase Invoice`.posting_date desc, `tabPurchase Invoice Item`.item_code desc"
|
||||
)
|
||||
query = query.orderby(pi.posting_date, order=Order.desc)
|
||||
query = query.orderby(pii.item_group, order=Order.desc)
|
||||
else:
|
||||
conditions += get_group_by_conditions(filters, "Purchase Invoice")
|
||||
query = apply_group_by_conditions(filters, "Purchase Invoice")
|
||||
|
||||
return conditions
|
||||
return query
|
||||
|
||||
|
||||
def get_items(filters, additional_query_columns):
|
||||
conditions = get_conditions(filters)
|
||||
if additional_query_columns:
|
||||
additional_query_columns = "," + ",".join(additional_query_columns)
|
||||
return frappe.db.sql(
|
||||
"""
|
||||
select
|
||||
`tabPurchase Invoice Item`.`name`, `tabPurchase Invoice Item`.`parent`,
|
||||
`tabPurchase Invoice`.posting_date, `tabPurchase Invoice`.credit_to, `tabPurchase Invoice`.company,
|
||||
`tabPurchase Invoice`.supplier, `tabPurchase Invoice`.remarks, `tabPurchase Invoice`.base_net_total,
|
||||
`tabPurchase Invoice`.unrealized_profit_loss_account,
|
||||
`tabPurchase Invoice Item`.`item_code`, `tabPurchase Invoice Item`.description,
|
||||
`tabPurchase Invoice Item`.`item_name` as pi_item_name, `tabPurchase Invoice Item`.`item_group`
|
||||
,`tabPurchase Invoice Item`.`item_group` as pi_item_group,
|
||||
`tabItem`.`item_name` as i_item_name, `tabItem`.`item_group` as i_item_group,
|
||||
`tabPurchase Invoice Item`.`project`, `tabPurchase Invoice Item`.`purchase_order`,
|
||||
`tabPurchase Invoice Item`.`purchase_receipt`, `tabPurchase Invoice Item`.`po_detail`,
|
||||
`tabPurchase Invoice Item`.`expense_account`, `tabPurchase Invoice Item`.`stock_qty`,
|
||||
`tabPurchase Invoice Item`.`stock_uom`, `tabPurchase Invoice Item`.`base_net_amount`,
|
||||
`tabPurchase Invoice`.`supplier_name`, `tabPurchase Invoice`.`mode_of_payment` {}
|
||||
from `tabPurchase Invoice`, `tabPurchase Invoice Item`, `tabItem`
|
||||
where `tabPurchase Invoice`.name = `tabPurchase Invoice Item`.`parent` and
|
||||
`tabItem`.name = `tabPurchase Invoice Item`.`item_code` and
|
||||
`tabPurchase Invoice`.docstatus = 1 {}
|
||||
""".format(additional_query_columns, conditions),
|
||||
filters,
|
||||
as_dict=1,
|
||||
def get_items(filters, additional_table_columns):
|
||||
pi = frappe.qb.DocType("Purchase Invoice")
|
||||
pii = frappe.qb.DocType("Purchase Invoice Item")
|
||||
Item = frappe.qb.DocType("Item")
|
||||
query = (
|
||||
frappe.qb.from_(pi)
|
||||
.join(pii)
|
||||
.on(pi.name == pii.parent)
|
||||
.left_join(Item)
|
||||
.on(pii.item_code == Item.name)
|
||||
.select(
|
||||
pii.name.as_("pii_name"),
|
||||
pii.parent,
|
||||
pi.posting_date,
|
||||
pi.credit_to,
|
||||
pi.company,
|
||||
pi.supplier,
|
||||
pi.remarks,
|
||||
pi.base_net_total,
|
||||
pi.unrealized_profit_loss_account,
|
||||
pii.item_code,
|
||||
pii.description,
|
||||
pii.item_group,
|
||||
pii.item_name.as_("pi_item_name"),
|
||||
pii.item_group.as_("pi_item_group"),
|
||||
Item.item_name.as_("i_item_name"),
|
||||
Item.item_group.as_("i_item_group"),
|
||||
pii.project,
|
||||
pii.purchase_order,
|
||||
pii.purchase_receipt,
|
||||
pii.po_detail,
|
||||
pii.expense_account,
|
||||
pii.stock_qty,
|
||||
pii.stock_uom,
|
||||
pii.base_net_amount,
|
||||
pi.supplier_name,
|
||||
pi.mode_of_payment,
|
||||
)
|
||||
.where(pi.docstatus == 1)
|
||||
)
|
||||
|
||||
if filters.get("supplier"):
|
||||
query = query.where(pi.supplier == filters["supplier"])
|
||||
if filters.get("company"):
|
||||
query = query.where(pi.company == filters["company"])
|
||||
|
||||
if additional_table_columns:
|
||||
for column in additional_table_columns:
|
||||
if column.get("_doctype"):
|
||||
table = frappe.qb.DocType(column.get("_doctype"))
|
||||
query = query.select(table[column.get("fieldname")])
|
||||
else:
|
||||
query = query.select(pi[column.get("fieldname")])
|
||||
|
||||
query = apply_conditions(query, pi, pii, filters)
|
||||
|
||||
return query.run(as_dict=True)
|
||||
|
||||
|
||||
def get_aii_accounts():
|
||||
return dict(frappe.db.sql("select name, stock_received_but_not_billed from tabCompany"))
|
||||
|
||||
@@ -41,6 +41,12 @@ frappe.query_reports["Item-wise Sales Register"] = {
|
||||
label: __("Warehouse"),
|
||||
fieldtype: "Link",
|
||||
options: "Warehouse",
|
||||
get_query: function () {
|
||||
const company = frappe.query_report.get_filter_value("company");
|
||||
return {
|
||||
filters: { company: company },
|
||||
};
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldname: "brand",
|
||||
|
||||
@@ -7,6 +7,7 @@ from frappe import _
|
||||
from frappe.model.meta import get_field_precision
|
||||
from frappe.utils import cstr, flt
|
||||
from frappe.utils.xlsxutils import handle_html
|
||||
from pypika import Order
|
||||
|
||||
from erpnext.accounts.report.sales_register.sales_register import get_mode_of_payments
|
||||
from erpnext.accounts.report.utils import get_query_columns, get_values_for_columns
|
||||
@@ -26,7 +27,7 @@ def _execute(filters=None, additional_table_columns=None, additional_conditions=
|
||||
|
||||
company_currency = frappe.get_cached_value("Company", filters.get("company"), "default_currency")
|
||||
|
||||
item_list = get_items(filters, get_query_columns(additional_table_columns), additional_conditions)
|
||||
item_list = get_items(filters, additional_table_columns, additional_conditions)
|
||||
if item_list:
|
||||
itemised_tax, tax_columns = get_tax_accounts(item_list, columns, company_currency)
|
||||
|
||||
@@ -83,9 +84,7 @@ def _execute(filters=None, additional_table_columns=None, additional_conditions=
|
||||
"company": d.company,
|
||||
"sales_order": d.sales_order,
|
||||
"delivery_note": d.delivery_note,
|
||||
"income_account": d.unrealized_profit_loss_account
|
||||
if d.is_internal_customer == 1
|
||||
else d.income_account,
|
||||
"income_account": get_income_account(d),
|
||||
"cost_center": d.cost_center,
|
||||
"stock_qty": d.stock_qty,
|
||||
"stock_uom": d.stock_uom,
|
||||
@@ -150,6 +149,15 @@ def _execute(filters=None, additional_table_columns=None, additional_conditions=
|
||||
return columns, data, None, None, None, skip_total_row
|
||||
|
||||
|
||||
def get_income_account(row):
|
||||
if row.enable_deferred_revenue:
|
||||
return row.deferred_revenue_account
|
||||
elif row.is_internal_customer == 1:
|
||||
return row.unrealized_profit_loss_account
|
||||
else:
|
||||
return row.income_account
|
||||
|
||||
|
||||
def get_columns(additional_table_columns, filters):
|
||||
columns = []
|
||||
|
||||
@@ -333,93 +341,140 @@ def get_columns(additional_table_columns, filters):
|
||||
return columns
|
||||
|
||||
|
||||
def get_conditions(filters, additional_conditions=None):
|
||||
conditions = ""
|
||||
def apply_conditions(query, si, sii, filters, additional_conditions=None):
|
||||
for opts in ("company", "customer", "item_code"):
|
||||
if filters.get(opts):
|
||||
query = query.where(si[opts] == filters[opts])
|
||||
|
||||
for opts in (
|
||||
("company", " and `tabSales Invoice`.company=%(company)s"),
|
||||
("customer", " and `tabSales Invoice`.customer = %(customer)s"),
|
||||
("item_code", " and `tabSales Invoice Item`.item_code = %(item_code)s"),
|
||||
("from_date", " and `tabSales Invoice`.posting_date>=%(from_date)s"),
|
||||
("to_date", " and `tabSales Invoice`.posting_date<=%(to_date)s"),
|
||||
):
|
||||
if filters.get(opts[0]):
|
||||
conditions += opts[1]
|
||||
if filters.get("from_date"):
|
||||
query = query.where(si.posting_date >= filters.get("from_date"))
|
||||
|
||||
if additional_conditions:
|
||||
conditions += additional_conditions
|
||||
if filters.get("to_date"):
|
||||
query = query.where(si.posting_date <= filters.get("to_date"))
|
||||
|
||||
if filters.get("mode_of_payment"):
|
||||
conditions += """ and exists(select name from `tabSales Invoice Payment`
|
||||
where parent=`tabSales Invoice`.name
|
||||
and ifnull(`tabSales Invoice Payment`.mode_of_payment, '') = %(mode_of_payment)s)"""
|
||||
sales_invoice = frappe.db.get_all(
|
||||
"Sales Invoice Payment", {"mode_of_payment": filters.get("mode_of_payment")}, pluck="parent"
|
||||
)
|
||||
query = query.where(si.name.isin(sales_invoice))
|
||||
|
||||
if filters.get("warehouse"):
|
||||
if frappe.db.get_value("Warehouse", filters.get("warehouse"), "is_group"):
|
||||
lft, rgt = frappe.db.get_all(
|
||||
"Warehouse", filters={"name": filters.get("warehouse")}, fields=["lft", "rgt"], as_list=True
|
||||
)[0]
|
||||
conditions += f"and ifnull(`tabSales Invoice Item`.warehouse, '') in (select name from `tabWarehouse` where lft > {lft} and rgt < {rgt}) "
|
||||
warehouses = frappe.db.get_all("Warehouse", {"lft": (">", lft), "rgt": ("<", rgt)}, pluck="name")
|
||||
query = query.where(sii.warehouse.isin(warehouses))
|
||||
else:
|
||||
conditions += """and ifnull(`tabSales Invoice Item`.warehouse, '') = %(warehouse)s"""
|
||||
query = query.where(sii.warehouse == filters.get("warehouse"))
|
||||
|
||||
if filters.get("brand"):
|
||||
conditions += """and ifnull(`tabSales Invoice Item`.brand, '') = %(brand)s"""
|
||||
query = query.where(sii.brand == filters.get("brand"))
|
||||
|
||||
if filters.get("item_group"):
|
||||
conditions += """and ifnull(`tabSales Invoice Item`.item_group, '') = %(item_group)s"""
|
||||
query = query.where(sii.item_group == filters.get("item_group"))
|
||||
|
||||
if filters.get("income_account"):
|
||||
query = query.where(
|
||||
(sii.income_account == filters.get("income_account"))
|
||||
| (sii.deferred_revenue_account == filters.get("income_account"))
|
||||
| (si.unrealized_profit_loss_account == filters.get("income_account"))
|
||||
)
|
||||
|
||||
if not filters.get("group_by"):
|
||||
conditions += "ORDER BY `tabSales Invoice`.posting_date desc, `tabSales Invoice Item`.item_group desc"
|
||||
query = query.orderby(si.posting_date, order=Order.desc)
|
||||
query = query.orderby(sii.item_group, order=Order.desc)
|
||||
else:
|
||||
conditions += get_group_by_conditions(filters, "Sales Invoice")
|
||||
query = apply_group_by_conditions(query, si, sii, filters)
|
||||
|
||||
return conditions
|
||||
for key, value in (additional_conditions or {}).items():
|
||||
query = query.where(si[key] == value)
|
||||
|
||||
return query
|
||||
|
||||
|
||||
def get_group_by_conditions(filters, doctype):
|
||||
def apply_group_by_conditions(query, si, ii, filters):
|
||||
if filters.get("group_by") == "Invoice":
|
||||
return f"ORDER BY `tab{doctype} Item`.parent desc"
|
||||
query = query.orderby(ii.parent, order=Order.desc)
|
||||
elif filters.get("group_by") == "Item":
|
||||
return f"ORDER BY `tab{doctype} Item`.`item_code`"
|
||||
query = query.orderby(ii.item_code)
|
||||
elif filters.get("group_by") == "Item Group":
|
||||
return "ORDER BY `tab{} Item`.{}".format(doctype, frappe.scrub(filters.get("group_by")))
|
||||
query = query.orderby(ii.item_group)
|
||||
elif filters.get("group_by") in ("Customer", "Customer Group", "Territory", "Supplier"):
|
||||
return "ORDER BY `tab{}`.{}".format(doctype, frappe.scrub(filters.get("group_by")))
|
||||
query = query.orderby(si[frappe.scrub(filters.get("group_by"))])
|
||||
|
||||
return query
|
||||
|
||||
|
||||
def get_items(filters, additional_query_columns, additional_conditions=None):
|
||||
conditions = get_conditions(filters, additional_conditions)
|
||||
si = frappe.qb.DocType("Sales Invoice")
|
||||
sii = frappe.qb.DocType("Sales Invoice Item")
|
||||
item = frappe.qb.DocType("Item")
|
||||
|
||||
query = (
|
||||
frappe.qb.from_(si)
|
||||
.join(sii)
|
||||
.on(si.name == sii.parent)
|
||||
.left_join(item)
|
||||
.on(sii.item_code == item.name)
|
||||
.select(
|
||||
sii.name,
|
||||
sii.parent,
|
||||
si.posting_date,
|
||||
si.debit_to,
|
||||
si.unrealized_profit_loss_account,
|
||||
si.is_internal_customer,
|
||||
si.customer,
|
||||
si.remarks,
|
||||
si.territory,
|
||||
si.company,
|
||||
si.base_net_total,
|
||||
sii.project,
|
||||
sii.item_code,
|
||||
sii.description,
|
||||
sii.item_name,
|
||||
sii.item_group,
|
||||
sii.item_name.as_("si_item_name"),
|
||||
sii.item_group.as_("si_item_group"),
|
||||
item.item_name.as_("i_item_name"),
|
||||
item.item_group.as_("i_item_group"),
|
||||
sii.sales_order,
|
||||
sii.delivery_note,
|
||||
sii.income_account,
|
||||
sii.cost_center,
|
||||
sii.enable_deferred_revenue,
|
||||
sii.deferred_revenue_account,
|
||||
sii.stock_qty,
|
||||
sii.stock_uom,
|
||||
sii.base_net_rate,
|
||||
sii.base_net_amount,
|
||||
si.customer_name,
|
||||
si.customer_group,
|
||||
sii.so_detail,
|
||||
si.update_stock,
|
||||
sii.uom,
|
||||
sii.qty,
|
||||
)
|
||||
.where(si.docstatus == 1)
|
||||
)
|
||||
|
||||
if additional_query_columns:
|
||||
additional_query_columns = "," + ",".join(additional_query_columns)
|
||||
return frappe.db.sql(
|
||||
"""
|
||||
select
|
||||
`tabSales Invoice Item`.name, `tabSales Invoice Item`.parent,
|
||||
`tabSales Invoice`.posting_date, `tabSales Invoice`.debit_to,
|
||||
`tabSales Invoice`.unrealized_profit_loss_account,
|
||||
`tabSales Invoice`.is_internal_customer,
|
||||
`tabSales Invoice`.customer, `tabSales Invoice`.remarks,
|
||||
`tabSales Invoice`.territory, `tabSales Invoice`.company, `tabSales Invoice`.base_net_total,
|
||||
`tabSales Invoice Item`.project,
|
||||
`tabSales Invoice Item`.item_code, `tabSales Invoice Item`.description,
|
||||
`tabSales Invoice Item`.`item_name`, `tabSales Invoice Item`.`item_group`,
|
||||
`tabSales Invoice Item`.`item_name` as si_item_name, `tabSales Invoice Item`.`item_group` as si_item_group,
|
||||
`tabItem`.`item_name` as i_item_name, `tabItem`.`item_group` as i_item_group,
|
||||
`tabSales Invoice Item`.sales_order, `tabSales Invoice Item`.delivery_note,
|
||||
`tabSales Invoice Item`.income_account, `tabSales Invoice Item`.cost_center,
|
||||
`tabSales Invoice Item`.stock_qty, `tabSales Invoice Item`.stock_uom,
|
||||
`tabSales Invoice Item`.base_net_rate, `tabSales Invoice Item`.base_net_amount,
|
||||
`tabSales Invoice`.customer_name, `tabSales Invoice`.customer_group, `tabSales Invoice Item`.so_detail,
|
||||
`tabSales Invoice`.update_stock, `tabSales Invoice Item`.uom, `tabSales Invoice Item`.qty {}
|
||||
from `tabSales Invoice`, `tabSales Invoice Item`, `tabItem`
|
||||
where `tabSales Invoice`.name = `tabSales Invoice Item`.parent and
|
||||
`tabItem`.name = `tabSales Invoice Item`.`item_code` and
|
||||
`tabSales Invoice`.docstatus = 1 {}
|
||||
""".format(additional_query_columns, conditions),
|
||||
filters,
|
||||
as_dict=1,
|
||||
) # nosec
|
||||
for column in additional_query_columns:
|
||||
if column.get("_doctype"):
|
||||
table = frappe.qb.DocType(column.get("_doctype"))
|
||||
query = query.select(table[column.get("fieldname")])
|
||||
else:
|
||||
query = query.select(si[column.get("fieldname")])
|
||||
|
||||
if filters.get("customer"):
|
||||
query = query.where(si.customer == filters["customer"])
|
||||
|
||||
if filters.get("customer_group"):
|
||||
query = query.where(si.customer_group == filters["customer_group"])
|
||||
|
||||
query = apply_conditions(query, si, sii, filters, additional_conditions)
|
||||
|
||||
return query.run(as_dict=True)
|
||||
|
||||
|
||||
def get_delivery_notes_against_sales_order(item_list):
|
||||
@@ -427,16 +482,14 @@ def get_delivery_notes_against_sales_order(item_list):
|
||||
so_item_rows = list(set([d.so_detail for d in item_list]))
|
||||
|
||||
if so_item_rows:
|
||||
delivery_notes = frappe.db.sql(
|
||||
"""
|
||||
select parent, so_detail
|
||||
from `tabDelivery Note Item`
|
||||
where docstatus=1 and so_detail in (%s)
|
||||
group by so_detail, parent
|
||||
"""
|
||||
% (", ".join(["%s"] * len(so_item_rows))),
|
||||
tuple(so_item_rows),
|
||||
as_dict=1,
|
||||
dn_item = frappe.qb.DocType("Delivery Note Item")
|
||||
delivery_notes = (
|
||||
frappe.qb.from_(dn_item)
|
||||
.select(dn_item.parent, dn_item.so_detail)
|
||||
.where(dn_item.docstatus == 1)
|
||||
.where(dn_item.so_detail.isin(so_item_rows))
|
||||
.groupby(dn_item.so_detail, dn_item.parent)
|
||||
.run(as_dict=True)
|
||||
)
|
||||
|
||||
for dn in delivery_notes:
|
||||
@@ -446,15 +499,16 @@ def get_delivery_notes_against_sales_order(item_list):
|
||||
|
||||
|
||||
def get_grand_total(filters, doctype):
|
||||
return frappe.db.sql(
|
||||
f""" SELECT
|
||||
SUM(`tab{doctype}`.base_grand_total)
|
||||
FROM `tab{doctype}`
|
||||
WHERE `tab{doctype}`.docstatus = 1
|
||||
and posting_date between %s and %s
|
||||
""",
|
||||
(filters.get("from_date"), filters.get("to_date")),
|
||||
)[0][0] # nosec
|
||||
return flt(
|
||||
frappe.db.get_value(
|
||||
doctype,
|
||||
{
|
||||
"docstatus": 1,
|
||||
"posting_date": ("between", [filters.get("from_date"), filters.get("to_date")]),
|
||||
},
|
||||
"sum(base_grand_total)",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def get_tax_accounts(
|
||||
|
||||
Reference in New Issue
Block a user