Merge pull request #31871 from ruthra-kumar/fix_gross_profit_valuation_rate
fix: incorrect buying amount in Gross Profit rpt
This commit is contained in:
commit
72a7ed5b58
@ -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
|
previous_stock_value = len(my_sle) > i + 1 and flt(my_sle[i + 1].stock_value) or 0.0
|
||||||
|
|
||||||
if previous_stock_value:
|
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:
|
else:
|
||||||
return flt(row.qty) * self.get_average_buying_rate(row, item_code)
|
return flt(row.qty) * self.get_average_buying_rate(row, item_code)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user