mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 00:25:01 +00:00
fix: incorrect last sle for no batch wise valuation
(cherry picked from commit 93d3eb662f)
This commit is contained in:
committed by
Mergify
parent
76fe861281
commit
f2af2fe63b
@@ -284,6 +284,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