Skip to content

Commit a4d9411

Browse files
fix: skip incoming rate calc when serial no qty is zero (backport #57427) (#57957)
fix: skip incoming rate calc when serial no qty is zero (#57427) (cherry picked from commit a25decf) Co-authored-by: Shllokkk <140623894+Shllokkk@users.noreply.github.com>
1 parent 2287e34 commit a4d9411

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

erpnext/stock/serial_batch_bundle.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,9 @@ def is_rejected_entry(self):
787787
return is_rejected(self.sle.voucher_type, self.sle.voucher_detail_no, self.sle.warehouse)
788788

789789
def get_incoming_rate(self):
790+
if not self.sle.actual_qty and self.sle.voucher_type == "Stock Reconciliation":
791+
return 0.0
792+
790793
return abs(flt(self.stock_value_change) / flt(self.sle.actual_qty))
791794

792795
def get_incoming_rate_of_serial_no(self, serial_no):

0 commit comments

Comments
 (0)