From 8b4e69235a7218b25a9c1212561ce58be576b1b2 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 10:25:28 +0530 Subject: [PATCH] fix: use `flt` to ignore TypeError (backport #37481) (#37489) fix: use `flt` to ignore TypeError (#37481) (cherry picked from commit d2b22db5001ae6544e872234c6c3434f24c5a6b1) Co-authored-by: s-aga-r --- erpnext/stock/stock_ledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py index c8e75d5c43ce..e1d5081d7308 100644 --- a/erpnext/stock/stock_ledger.py +++ b/erpnext/stock/stock_ledger.py @@ -659,7 +659,7 @@ def get_incoming_outgoing_rate_from_transaction(self, sle): ) if self.valuation_method == "Moving Average": - rate = self.data[self.args.warehouse].previous_sle.valuation_rate + rate = flt(self.data[self.args.warehouse].previous_sle.valuation_rate) else: rate = get_rate_for_return( sle.voucher_type,