fix(stock): set incoming rate as zero for outward sle (backport #54514) (#54532)

fix(stock): set incoming rate as zero for outward sle

(cherry picked from commit ce37530e70)

Co-authored-by: Sudharsanan11 <sudharsananashok1975@gmail.com>
This commit is contained in:
mergify[bot]
2026-04-26 20:24:43 +05:30
committed by GitHub
parent 6df39aec54
commit 68d213a244

View File

@@ -947,6 +947,9 @@ class update_entries_after:
if not self.wh_data.qty_after_transaction: if not self.wh_data.qty_after_transaction:
self.wh_data.stock_value = 0.0 self.wh_data.stock_value = 0.0
if sle.actual_qty < 0:
sle.incoming_rate = 0
stock_value_difference = self.wh_data.stock_value - self.wh_data.prev_stock_value stock_value_difference = self.wh_data.stock_value - self.wh_data.prev_stock_value
self.wh_data.prev_stock_value = self.wh_data.stock_value self.wh_data.prev_stock_value = self.wh_data.stock_value