fix: only add stock queue if FIFO (#29302)

This commit is contained in:
Ankush Menat 2022-01-16 13:02:23 +05:30 committed by GitHub
parent 3438e1f0c4
commit b0cf6195e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -449,8 +449,9 @@ class update_entries_after(object):
# assert
self.wh_data.valuation_rate = sle.valuation_rate
self.wh_data.qty_after_transaction = sle.qty_after_transaction
self.wh_data.stock_queue = [[self.wh_data.qty_after_transaction, self.wh_data.valuation_rate]]
self.wh_data.stock_value = flt(self.wh_data.qty_after_transaction) * flt(self.wh_data.valuation_rate)
if self.valuation_method != "Moving Average":
self.wh_data.stock_queue = [[self.wh_data.qty_after_transaction, self.wh_data.valuation_rate]]
else:
if self.valuation_method == "Moving Average":
self.get_moving_average_values(sle)