Skip to content

Commit

Permalink
fix: typerror on multi warehouse in Packed Items
Browse files Browse the repository at this point in the history
DN(with bundled item with varying warehouses)-> Sales Invoice.

(cherry picked from commit e684eb3)
  • Loading branch information
ruthra-kumar authored and mergify[bot] committed Dec 21, 2022
1 parent 6ef7eaf commit 9b24940
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions erpnext/accounts/report/gross_profit/gross_profit.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ def calculate_buying_amount_from_sle(self, row, my_sle, parenttype, parent, item
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)
return 0.0

def get_buying_amount(self, row, item_code):
# IMP NOTE
Expand Down

0 comments on commit 9b24940

Please sign in to comment.