fix: not able to submit subcontracting pr (old flow) (#39622) (cherry picked from commit 5cf47ae5f991218ed74efeb2cce7f00a54475e6b) Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
parent
f71af209c0
commit
960443d268
@ -260,18 +260,22 @@ class SubcontractingController(StockController):
|
||||
return frappe.get_all(f"{doctype}", fields=fields, filters=filters)
|
||||
|
||||
def __get_consumed_items(self, doctype, receipt_items):
|
||||
fields = [
|
||||
"serial_no",
|
||||
"rm_item_code",
|
||||
"reference_name",
|
||||
"batch_no",
|
||||
"consumed_qty",
|
||||
"main_item_code",
|
||||
"parent as voucher_no",
|
||||
]
|
||||
|
||||
if self.subcontract_data.receipt_supplied_items_field != "Purchase Receipt Item Supplied":
|
||||
fields.append("serial_and_batch_bundle")
|
||||
|
||||
return frappe.get_all(
|
||||
self.subcontract_data.receipt_supplied_items_field,
|
||||
fields=[
|
||||
"serial_no",
|
||||
"rm_item_code",
|
||||
"reference_name",
|
||||
"serial_and_batch_bundle",
|
||||
"batch_no",
|
||||
"consumed_qty",
|
||||
"main_item_code",
|
||||
"parent as voucher_no",
|
||||
],
|
||||
fields=fields,
|
||||
filters={"docstatus": 1, "reference_name": ("in", list(receipt_items)), "parenttype": doctype},
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user