mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
Merge pull request #32986 from s-aga-r/fix/scr-return-rejected-qty
fix: hide rejected-fields in return SCR
This commit is contained in:
@@ -404,12 +404,17 @@ def make_return_doc(doctype: str, source_name: str, target_doc=None):
|
||||
returned_qty_map = get_returned_qty_map_for_row(
|
||||
source_parent.name, source_parent.supplier, source_doc.name, doctype
|
||||
)
|
||||
|
||||
if doctype == "Subcontracting Receipt":
|
||||
target_doc.received_qty = -1 * flt(source_doc.qty)
|
||||
else:
|
||||
target_doc.received_qty = -1 * flt(
|
||||
source_doc.received_qty - (returned_qty_map.get("received_qty") or 0)
|
||||
)
|
||||
target_doc.rejected_qty = -1 * flt(
|
||||
source_doc.rejected_qty - (returned_qty_map.get("rejected_qty") or 0)
|
||||
)
|
||||
|
||||
target_doc.qty = -1 * flt(source_doc.qty - (returned_qty_map.get("qty") or 0))
|
||||
|
||||
if hasattr(target_doc, "stock_qty"):
|
||||
|
||||
@@ -246,6 +246,7 @@
|
||||
"print_hide": 1
|
||||
},
|
||||
{
|
||||
"depends_on": "eval: !doc.is_return",
|
||||
"description": "Sets 'Rejected Warehouse' in each row of the Items table.",
|
||||
"fieldname": "rejected_warehouse",
|
||||
"fieldtype": "Link",
|
||||
@@ -628,7 +629,7 @@
|
||||
"in_create": 1,
|
||||
"is_submittable": 1,
|
||||
"links": [],
|
||||
"modified": "2022-08-26 21:02:26.353870",
|
||||
"modified": "2022-11-16 14:18:57.001239",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Subcontracting",
|
||||
"name": "Subcontracting Receipt",
|
||||
|
||||
@@ -147,6 +147,7 @@
|
||||
},
|
||||
{
|
||||
"columns": 1,
|
||||
"depends_on": "eval: !parent.is_return",
|
||||
"fieldname": "rejected_qty",
|
||||
"fieldtype": "Float",
|
||||
"in_list_view": 1,
|
||||
@@ -248,6 +249,7 @@
|
||||
"width": "100px"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval: !parent.is_return",
|
||||
"fieldname": "rejected_warehouse",
|
||||
"fieldtype": "Link",
|
||||
"label": "Rejected Warehouse",
|
||||
@@ -311,7 +313,7 @@
|
||||
"print_hide": 1
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:!doc.is_fixed_asset",
|
||||
"depends_on": "eval: !parent.is_return",
|
||||
"fieldname": "rejected_serial_no",
|
||||
"fieldtype": "Small Text",
|
||||
"label": "Rejected Serial No",
|
||||
@@ -474,7 +476,7 @@
|
||||
"idx": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2022-08-20 17:16:48.269164",
|
||||
"modified": "2022-11-16 14:21:26.125815",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Subcontracting",
|
||||
"name": "Subcontracting Receipt Item",
|
||||
|
||||
Reference in New Issue
Block a user