Merge pull request #16677 from nabinhait/total-qty-patch-fix
fix: Consider parenttype while updating total qty in transactions
This commit is contained in:
commit
b1cbe221b7
@ -19,9 +19,10 @@ def execute():
|
||||
SELECT
|
||||
parent, SUM(qty) as qty
|
||||
FROM
|
||||
`tab%s Item`
|
||||
`tab{0} Item`
|
||||
where parenttype = '{0}'
|
||||
GROUP BY parent
|
||||
''' % (doctype), as_dict = True)
|
||||
'''.format(doctype), as_dict = True)
|
||||
|
||||
# Query to update total_qty might become too big, Update in batches
|
||||
# batch_size is chosen arbitrarily, Don't try too hard to reason about it
|
||||
|
Loading…
Reference in New Issue
Block a user