mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 19:59:12 +00:00
Using same filter for Sales Person from Accounts Receivable
Added Customer/Supplier Ledger Summary in Accounts Module page
This commit is contained in:
@@ -194,9 +194,14 @@ class PartyLedgerSummaryReport(object):
|
|||||||
lft, rgt = frappe.db.get_value("Sales Person",
|
lft, rgt = frappe.db.get_value("Sales Person",
|
||||||
self.filters.get("sales_person"), ["lft", "rgt"])
|
self.filters.get("sales_person"), ["lft", "rgt"])
|
||||||
|
|
||||||
conditions.append("""party in (select parent from `tabSales Team`
|
conditions.append("""exists(select name from `tabSales Team` steam where
|
||||||
where parenttype = 'Customer' and exists(select name from `tabSales Person`
|
steam.sales_person in (select name from `tabSales Person` where lft >= {0} and rgt <= {1})
|
||||||
where lft >= {0} and rgt <= {1} and name=`tabSales Team`.sales_person))""".format(lft, rgt))
|
and ((steam.parent = voucher_no and steam.parenttype = voucher_type)
|
||||||
|
or (steam.parent = against_voucher and steam.parenttype = against_voucher_type)
|
||||||
|
or (steam.parent = party and steam.parenttype = 'Customer')))""".format(lft, rgt))
|
||||||
|
#conditions.append("""party in (select parent from `tabSales Team`
|
||||||
|
# where parenttype = 'Customer' and exists(select name from `tabSales Person`
|
||||||
|
# where lft >= {0} and rgt <= {1} and name=`tabSales Team`.sales_person))""".format(lft, rgt))
|
||||||
|
|
||||||
if self.filters.party_type == "Supplier":
|
if self.filters.party_type == "Supplier":
|
||||||
if self.filters.get("supplier_group"):
|
if self.filters.get("supplier_group"):
|
||||||
|
|||||||
@@ -351,6 +351,36 @@ def get_data():
|
|||||||
"is_query_report": True,
|
"is_query_report": True,
|
||||||
"doctype": "Sales Invoice"
|
"doctype": "Sales Invoice"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "report",
|
||||||
|
"name": "Item-wise Sales Register",
|
||||||
|
"is_query_report": True,
|
||||||
|
"doctype": "Sales Invoice"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "report",
|
||||||
|
"name": "Item-wise Purchase Register",
|
||||||
|
"is_query_report": True,
|
||||||
|
"doctype": "Purchase Invoice"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "report",
|
||||||
|
"name": "Profitability Analysis",
|
||||||
|
"doctype": "GL Entry",
|
||||||
|
"is_query_report": True,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "report",
|
||||||
|
"name": "Customer Ledger Summary",
|
||||||
|
"doctype": "Sales Invoice",
|
||||||
|
"is_query_report": True,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "report",
|
||||||
|
"name": "Supplier Ledger Summary",
|
||||||
|
"doctype": "Sales Invoice",
|
||||||
|
"is_query_report": True,
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -363,12 +393,6 @@ def get_data():
|
|||||||
"doctype": "GL Entry",
|
"doctype": "GL Entry",
|
||||||
"is_query_report": True,
|
"is_query_report": True,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "report",
|
|
||||||
"name": "Profitability Analysis",
|
|
||||||
"doctype": "GL Entry",
|
|
||||||
"is_query_report": True,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "report",
|
"type": "report",
|
||||||
"name": "Payment Period Based On Invoice Date",
|
"name": "Payment Period Based On Invoice Date",
|
||||||
@@ -381,18 +405,6 @@ def get_data():
|
|||||||
"is_query_report": True,
|
"is_query_report": True,
|
||||||
"doctype": "Sales Invoice"
|
"doctype": "Sales Invoice"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "report",
|
|
||||||
"name": "Item-wise Sales Register",
|
|
||||||
"is_query_report": True,
|
|
||||||
"doctype": "Sales Invoice"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "report",
|
|
||||||
"name": "Item-wise Purchase Register",
|
|
||||||
"is_query_report": True,
|
|
||||||
"doctype": "Purchase Invoice"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "report",
|
"type": "report",
|
||||||
"name": "Accounts Receivable Summary",
|
"name": "Accounts Receivable Summary",
|
||||||
|
|||||||
Reference in New Issue
Block a user