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

fix: allow zero valuation rate (#44902)

(cherry picked from commit 614a8f106d)

Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
mergify[bot]
2024-12-26 11:03:13 +05:30
committed by GitHub
parent 9c6832a622
commit 9060e4ce57

View File

@@ -937,7 +937,7 @@ class update_entries_after:
# 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)