mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-13 22:51:49 +00:00
fix: skip incoming rate calc when serial no qty is zero (#57427)
(cherry picked from commit a25decfa50)
Co-authored-by: Shllokkk <140623894+Shllokkk@users.noreply.github.com>
This commit is contained in:
@@ -774,6 +774,9 @@ class SerialNoValuation(DeprecatedSerialNoValuation):
|
|||||||
return is_rejected(self.sle.voucher_type, self.sle.voucher_detail_no, self.sle.warehouse)
|
return is_rejected(self.sle.voucher_type, self.sle.voucher_detail_no, self.sle.warehouse)
|
||||||
|
|
||||||
def get_incoming_rate(self):
|
def get_incoming_rate(self):
|
||||||
|
if not self.sle.actual_qty and self.sle.voucher_type == "Stock Reconciliation":
|
||||||
|
return 0.0
|
||||||
|
|
||||||
return abs(flt(self.stock_value_change) / flt(self.sle.actual_qty))
|
return abs(flt(self.stock_value_change) / flt(self.sle.actual_qty))
|
||||||
|
|
||||||
def get_incoming_rate_of_serial_no(self, serial_no):
|
def get_incoming_rate_of_serial_no(self, serial_no):
|
||||||
|
|||||||
Reference in New Issue
Block a user