fix: reposting has not changed valuation rate

(cherry picked from commit c0c693d8b0)

# Conflicts:
#	erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py
This commit is contained in:
Rohit Waghchaure
2023-07-01 11:30:46 +05:30
committed by Mergify
parent 3df0c5e32f
commit b77a808921
2 changed files with 123 additions and 0 deletions

View File

@@ -646,6 +646,7 @@ class update_entries_after(object):
def update_distinct_item_warehouses(self, dependant_sle):
key = (dependant_sle.item_code, dependant_sle.warehouse)
val = frappe._dict({"sle": dependant_sle})
if key not in self.distinct_item_warehouses:
self.distinct_item_warehouses[key] = val
self.new_items_found = True
@@ -657,6 +658,9 @@ class update_entries_after(object):
val.sle_changed = True
self.distinct_item_warehouses[key] = val
self.new_items_found = True
elif self.distinct_item_warehouses[key].get("reposting_status"):
self.distinct_item_warehouses[key] = val
self.new_items_found = True
def process_sle(self, sle):
# previous sle data for this warehouse
@@ -1362,6 +1366,8 @@ def get_sle_by_voucher_detail_no(voucher_detail_no, excluded_sle=None):
[
"item_code",
"warehouse",
"actual_qty",
"qty_after_transaction",
"posting_date",
"posting_time",
"timestamp(posting_date, posting_time) as timestamp",