mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-19 10:14:59 +00:00
Merge pull request #31917 from frappe/mergify/bp/version-14-hotfix/pr-31871
fix: incorrect buying amount in Gross Profit rpt (backport #31871)
This commit is contained in:
@@ -616,7 +616,7 @@ class GrossProfitGenerator(object):
|
||||
previous_stock_value = len(my_sle) > i + 1 and flt(my_sle[i + 1].stock_value) or 0.0
|
||||
|
||||
if previous_stock_value:
|
||||
return (previous_stock_value - flt(sle.stock_value)) * flt(row.qty) / abs(flt(sle.qty))
|
||||
return abs(previous_stock_value - flt(sle.stock_value)) * flt(row.qty) / abs(flt(sle.qty))
|
||||
else:
|
||||
return flt(row.qty) * self.get_average_buying_rate(row, item_code)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user