fix: reposting has not changed valuation rate

This commit is contained in:
Rohit Waghchaure
2023-07-01 11:30:46 +05:30
parent 7d010adcd4
commit c0c693d8b0
2 changed files with 121 additions and 0 deletions

View File

@@ -513,6 +513,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
@@ -524,6 +525,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):
from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos
@@ -1255,6 +1259,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",