Skip to content

Commit

Permalink
fix: allow zero valuation rate (backport #44902) (backport #44910) (#…
Browse files Browse the repository at this point in the history
…44913)

fix: allow zero valuation rate (backport #44902) (#44910)

fix: allow zero valuation rate (#44902)

(cherry picked from commit 614a8f1)

Co-authored-by: rohitwaghchaure <[email protected]>
(cherry picked from commit 9060e4c)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
mergify[bot] authored Dec 26, 2024
1 parent 139a56b commit 763951a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/stock/stock_ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ def get_serialized_values(self, sle):
# else it remains the same as that of previous entry
self.wh_data.valuation_rate = new_stock_value / new_stock_qty

if not self.wh_data.valuation_rate and sle.voucher_detail_no:
if self.wh_data.valuation_rate is None and sle.voucher_detail_no:
allow_zero_rate = self.check_if_allow_zero_valuation_rate(sle.voucher_type, sle.voucher_detail_no)
if not allow_zero_rate:
self.wh_data.valuation_rate = self.get_fallback_rate(sle)
Expand Down

0 comments on commit 763951a

Please sign in to comment.