mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 17:15:04 +00:00
committed by
Mergify
parent
442fede0fe
commit
ad75754ca6
@@ -141,6 +141,7 @@ class DeprecatedBatchNoValuation:
|
||||
& (sle.batch_no.isnotnull())
|
||||
& (sle.is_cancelled == 0)
|
||||
)
|
||||
.for_update()
|
||||
.groupby(sle.batch_no)
|
||||
)
|
||||
|
||||
@@ -232,6 +233,7 @@ class DeprecatedBatchNoValuation:
|
||||
& (sle.is_cancelled == 0)
|
||||
& (sle.batch_no.isin(self.non_batchwise_valuation_batches))
|
||||
)
|
||||
.for_update()
|
||||
.where(timestamp_condition)
|
||||
.groupby(sle.batch_no)
|
||||
)
|
||||
@@ -278,6 +280,7 @@ class DeprecatedBatchNoValuation:
|
||||
.where(timestamp_condition)
|
||||
.orderby(sle.posting_datetime, order=Order.desc)
|
||||
.orderby(sle.creation, order=Order.desc)
|
||||
.for_update()
|
||||
.limit(1)
|
||||
)
|
||||
|
||||
@@ -330,6 +333,7 @@ class DeprecatedBatchNoValuation:
|
||||
& (bundle.type_of_transaction.isin(["Inward", "Outward"]))
|
||||
& (bundle_child.batch_no.isin(self.non_batchwise_valuation_batches))
|
||||
)
|
||||
.for_update()
|
||||
.where(timestamp_condition)
|
||||
.groupby(bundle_child.batch_no)
|
||||
)
|
||||
|
||||
@@ -723,6 +723,7 @@ class BatchNoValuation(DeprecatedBatchNoValuation):
|
||||
& (parent.is_cancelled == 0)
|
||||
& (parent.type_of_transaction.isin(["Inward", "Outward"]))
|
||||
)
|
||||
.for_update()
|
||||
.groupby(child.batch_no)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user