fix: intercompany SO throws exception
(cherry picked from commit af0a353b79)
This commit is contained in:
@@ -2103,13 +2103,13 @@ def make_inter_company_transaction(doctype, source_name, target_doc=None):
|
|||||||
target_detail_field = "sales_invoice_item" if doctype == "Sales Invoice" else "sales_order_item"
|
target_detail_field = "sales_invoice_item" if doctype == "Sales Invoice" else "sales_order_item"
|
||||||
source_document_warehouse_field = "target_warehouse"
|
source_document_warehouse_field = "target_warehouse"
|
||||||
target_document_warehouse_field = "from_warehouse"
|
target_document_warehouse_field = "from_warehouse"
|
||||||
|
received_items = get_received_items(source_name, target_doctype, target_detail_field)
|
||||||
else:
|
else:
|
||||||
source_doc = frappe.get_doc(doctype, source_name)
|
source_doc = frappe.get_doc(doctype, source_name)
|
||||||
target_doctype = "Sales Invoice" if doctype == "Purchase Invoice" else "Sales Order"
|
target_doctype = "Sales Invoice" if doctype == "Purchase Invoice" else "Sales Order"
|
||||||
source_document_warehouse_field = "from_warehouse"
|
source_document_warehouse_field = "from_warehouse"
|
||||||
target_document_warehouse_field = "target_warehouse"
|
target_document_warehouse_field = "target_warehouse"
|
||||||
|
received_items = {}
|
||||||
received_items = get_received_items(source_name, target_doctype, target_detail_field)
|
|
||||||
|
|
||||||
validate_inter_company_transaction(source_doc, doctype)
|
validate_inter_company_transaction(source_doc, doctype)
|
||||||
details = get_inter_company_details(source_doc, doctype)
|
details = get_inter_company_details(source_doc, doctype)
|
||||||
|
|||||||
Reference in New Issue
Block a user