Merge pull request #16319 from SaiFi0102/Gross-Profit-Exclude-Opening-Invoice
fix: Exclude Opening Invoice from Gross Profit Report and Company Dashboard Chart
This commit is contained in:
commit
187bdf08a6
@ -200,7 +200,7 @@ class GrossProfitGenerator(object):
|
|||||||
|
|
||||||
def skip_row(self, row, product_bundles):
|
def skip_row(self, row, product_bundles):
|
||||||
if self.filters.get("group_by") != "Invoice":
|
if self.filters.get("group_by") != "Invoice":
|
||||||
if not row.get(scrub(self.filters.get("group_by"))):
|
if not row.get(scrub(self.filters.get("group_by", ""))):
|
||||||
return True
|
return True
|
||||||
elif row.get("is_return") == 1:
|
elif row.get("is_return") == 1:
|
||||||
return True
|
return True
|
||||||
@ -316,7 +316,7 @@ class GrossProfitGenerator(object):
|
|||||||
on `tabSales Invoice Item`.parent = `tabSales Invoice`.name
|
on `tabSales Invoice Item`.parent = `tabSales Invoice`.name
|
||||||
{sales_team_table}
|
{sales_team_table}
|
||||||
where
|
where
|
||||||
`tabSales Invoice`.docstatus=1 {conditions} {match_cond}
|
`tabSales Invoice`.docstatus=1 and `tabSales Invoice`.is_opening!='Yes' {conditions} {match_cond}
|
||||||
order by
|
order by
|
||||||
`tabSales Invoice`.posting_date desc, `tabSales Invoice`.posting_time desc"""
|
`tabSales Invoice`.posting_date desc, `tabSales Invoice`.posting_time desc"""
|
||||||
.format(conditions=conditions, sales_person_cols=sales_person_cols,
|
.format(conditions=conditions, sales_person_cols=sales_person_cols,
|
||||||
|
|||||||
@ -13,7 +13,7 @@ def get_data():
|
|||||||
'goal_doctype_link': 'company',
|
'goal_doctype_link': 'company',
|
||||||
'goal_field': 'base_grand_total',
|
'goal_field': 'base_grand_total',
|
||||||
'date_field': 'posting_date',
|
'date_field': 'posting_date',
|
||||||
'filter_str': 'docstatus = 1',
|
'filter_str': "docstatus = 1 and is_opening != 'Yes'",
|
||||||
'aggregation': 'sum'
|
'aggregation': 'sum'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user