Merge pull request #48512 from rohitwaghchaure/fixed-support-43409

fix: incorrect last sle for no batch wise valuation
This commit is contained in:
rohitwaghchaure
2025-07-11 11:01:16 +05:30
committed by GitHub

View File

@@ -318,6 +318,12 @@ class DeprecatedBatchNoValuation:
if self.sle.name:
query = query.where(sle.name != self.sle.name)
if self.sle.serial_and_batch_bundle:
query = query.where(
(sle.serial_and_batch_bundle != self.sle.serial_and_batch_bundle)
| (sle.serial_and_batch_bundle.isnull())
)
data = query.run(as_dict=True)
return data[0] if data else frappe._dict()