mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 16:45:02 +00:00
Merge pull request #48512 from rohitwaghchaure/fixed-support-43409
fix: incorrect last sle for no batch wise valuation
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user