fix: maintain PO and PO Item ref in SCR Item
This commit is contained in:
parent
a2ede7d6d5
commit
e1cea25781
@ -194,9 +194,11 @@ def make_subcontracting_receipt(source_name, target_doc=None):
|
||||
|
||||
|
||||
def get_mapped_subcontracting_receipt(source_name, target_doc=None):
|
||||
def update_item(obj, target, source_parent):
|
||||
target.qty = flt(obj.qty) - flt(obj.received_qty)
|
||||
target.amount = (flt(obj.qty) - flt(obj.received_qty)) * flt(obj.rate)
|
||||
def update_item(source, target, source_parent):
|
||||
target.purchase_order = source_parent.purchase_order
|
||||
target.purchase_order_item = source.purchase_order_item
|
||||
target.qty = flt(source.qty) - flt(source.received_qty)
|
||||
target.amount = (flt(source.qty) - flt(source.received_qty)) * flt(source.rate)
|
||||
|
||||
target_doc = get_mapped_doc(
|
||||
"Subcontracting Order",
|
||||
|
@ -63,7 +63,9 @@
|
||||
"dimension_col_break",
|
||||
"project",
|
||||
"section_break_80",
|
||||
"page_break"
|
||||
"page_break",
|
||||
"purchase_order",
|
||||
"purchase_order_item"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
@ -517,12 +519,31 @@
|
||||
"label": "Reference Name",
|
||||
"no_copy": 1,
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "purchase_order_item",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"label": "Purchase Order Item",
|
||||
"no_copy": 1,
|
||||
"read_only": 1,
|
||||
"search_index": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "purchase_order",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"label": "Purchase Order",
|
||||
"no_copy": 1,
|
||||
"options": "Purchase Order",
|
||||
"read_only": 1,
|
||||
"search_index": 1
|
||||
}
|
||||
],
|
||||
"idx": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2023-11-14 18:38:26.459669",
|
||||
"modified": "2023-11-23 17:38:55.134685",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Subcontracting",
|
||||
"name": "Subcontracting Receipt Item",
|
||||
|
Loading…
x
Reference in New Issue
Block a user