fix(email_digest): Linkes annual income and annual expense to profit and loss statement
This commit is contained in:
parent
3c9dd73f91
commit
aab6d0e028
@ -44,7 +44,7 @@ frappe.query_reports["Account Balance"] = {
|
||||
{ "value": "Cost of Goods Sold", "label": __("Cost of Goods Sold") },
|
||||
{ "value": "Depreciation", "label": __("Depreciation") },
|
||||
{ "value": "Equity", "label": __("Equity") },
|
||||
{ "value": "Expense Account", "label": __("MonExpense Accountthly") },
|
||||
{ "value": "Expense Account", "label": __("Expense Account") },
|
||||
{ "value": "Expenses Included In Asset Valuation", "label": __("Expenses Included In Asset Valuation") },
|
||||
{ "value": "Expenses Included In Valuation", "label": __("Expenses Included In Valuation") },
|
||||
{ "value": "Fixed Asset", "label": __("Fixed Asset") },
|
||||
|
@ -332,19 +332,15 @@ class EmailDigest(Document):
|
||||
|
||||
if fieldname == 'income':
|
||||
filters = {
|
||||
"root_type": "Income",
|
||||
"report_date": self.future_to_date,
|
||||
"company": self.company
|
||||
"currency": self.currency
|
||||
}
|
||||
label = get_link_to_report('Account Balance', label=self.meta.get_label(root_type + "_year_to_date"), filters=filters)
|
||||
label = get_link_to_report('Profit and Loss Statement', label=self.meta.get_label(root_type + "_year_to_date"), filters=filters)
|
||||
|
||||
elif fieldname == 'expenses_booked':
|
||||
filters = {
|
||||
"root_type": "Expense",
|
||||
"report_date": self.future_to_date,
|
||||
"company": self.company
|
||||
"currency": self.currency
|
||||
}
|
||||
label = get_link_to_report('Account Balance', label=self.meta.get_label(root_type + "_year_to_date"), filters=filters)
|
||||
label = get_link_to_report('Profit and Loss Statement', label=self.meta.get_label(root_type + "_year_to_date"), filters=filters)
|
||||
|
||||
return {
|
||||
"label": label,
|
||||
@ -416,8 +412,8 @@ class EmailDigest(Document):
|
||||
report_type="Report Builder",
|
||||
doctype="Sales Order",
|
||||
filters = {
|
||||
"status": [['!=', "Closed"], ['!=', "Cancelled"], ['!=', "Completed"]],
|
||||
"billing_status": [['!=', "Fully Billed"]],
|
||||
"status": [['!=', "Closed"], ['!=', "Cancelled"]],
|
||||
"per_billed": [['<', 100]],
|
||||
"transaction_date": [['<=', self.future_to_date]],
|
||||
"company": self.company
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user