mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 15:39:20 +00:00
Merge pull request #52873 from frappe/mergify/bp/version-15-hotfix/pr-52871
fix: use stock qty instead of qty when updating transferred qty in WO (backport #52871)
This commit is contained in:
@@ -1173,6 +1173,7 @@ class WorkOrder(Document):
|
|||||||
"operation": item.operation or operation,
|
"operation": item.operation or operation,
|
||||||
"item_code": item.item_code,
|
"item_code": item.item_code,
|
||||||
"item_name": item.item_name,
|
"item_name": item.item_name,
|
||||||
|
"stock_uom": item.stock_uom,
|
||||||
"description": item.description,
|
"description": item.description,
|
||||||
"allow_alternative_item": item.allow_alternative_item,
|
"allow_alternative_item": item.allow_alternative_item,
|
||||||
"required_qty": item.qty,
|
"required_qty": item.qty,
|
||||||
@@ -1197,7 +1198,7 @@ class WorkOrder(Document):
|
|||||||
.select(
|
.select(
|
||||||
ste_child.item_code,
|
ste_child.item_code,
|
||||||
ste_child.original_item,
|
ste_child.original_item,
|
||||||
fn.Sum(ste_child.qty).as_("qty"),
|
fn.Sum(ste_child.transfer_qty).as_("qty"),
|
||||||
)
|
)
|
||||||
.where(
|
.where(
|
||||||
(ste.docstatus == 1)
|
(ste.docstatus == 1)
|
||||||
@@ -1227,7 +1228,7 @@ class WorkOrder(Document):
|
|||||||
.select(
|
.select(
|
||||||
ste_child.item_code,
|
ste_child.item_code,
|
||||||
ste_child.original_item,
|
ste_child.original_item,
|
||||||
fn.Sum(ste_child.qty).as_("qty"),
|
fn.Sum(ste_child.transfer_qty).as_("qty"),
|
||||||
)
|
)
|
||||||
.where(
|
.where(
|
||||||
(ste.docstatus == 1)
|
(ste.docstatus == 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user