diff --git a/erpnext/stock/serial_batch_bundle.py b/erpnext/stock/serial_batch_bundle.py index dd459bb30bc4..05b3536c57ba 100644 --- a/erpnext/stock/serial_batch_bundle.py +++ b/erpnext/stock/serial_batch_bundle.py @@ -508,7 +508,7 @@ def calculate_stock_value_change(self): serial_nos = self.get_serial_nos() for serial_no in serial_nos: incoming_rate = self.get_incoming_rate_from_bundle(serial_no) - if not incoming_rate: + if incoming_rate is None: continue self.stock_value_change += incoming_rate @@ -553,7 +553,7 @@ def get_incoming_rate_from_bundle(self, serial_no) -> float: query = query.where(timestamp_condition) incoming_rate = query.run() - return flt(incoming_rate[0][0]) if incoming_rate else 0.0 + return flt(incoming_rate[0][0]) if incoming_rate else None def get_serial_nos(self): if self.sle.get("serial_nos"):