diff --git a/aumms/aumms/doctype/design_analysis/design_analysis.js b/aumms/aumms/doctype/design_analysis/design_analysis.js index 8056bb15..74f114c0 100644 --- a/aumms/aumms/doctype/design_analysis/design_analysis.js +++ b/aumms/aumms/doctype/design_analysis/design_analysis.js @@ -18,6 +18,8 @@ frappe.ui.form.on('Design Analysis', { } }); }, + + design_request: function(frm) { // Clear existing rows in the "Design Details" table frm.clear_table('design_details'); @@ -48,6 +50,8 @@ frappe.ui.form.on('Design Analysis', { }); } }, + + refresh: function(frm){ create_custom_buttons(frm); if(frm.doc.status == 'Approved' && !frm.doc.bom_created){ @@ -109,7 +113,7 @@ let request_for_verification = function(frm){ } let request_for_approval = function(frm){ - if((frm.doc.status == "Request For Verification" ) || (frm.doc.dr_required_check == 0 && frm.doc.verified_item.length>0 && frm.doc.status != 'Request For Approval' && frm.doc.status != 'Approved')){ + if((frm.doc.status == "Request For Verification" ) || (frm.doc.dr_required_check == 0 && frm.doc.verified_item.length>0 && frm.doc.status != 'Request For Approval' && frm.doc.status != 'Approved' && frm.doc.status !='BOM Created')){ frm.add_custom_button('Request For Approval', () =>{ make_request_for_approval(frm); },'Actions'); diff --git a/aumms/aumms/doctype/design_analysis/design_analysis.json b/aumms/aumms/doctype/design_analysis/design_analysis.json index 4ee43a92..c86e02f8 100644 --- a/aumms/aumms/doctype/design_analysis/design_analysis.json +++ b/aumms/aumms/doctype/design_analysis/design_analysis.json @@ -17,7 +17,7 @@ "item_group", "customer_expected_weight", "purity", - "mobile_no", + "phone_no", "section_break_rgobr", "column_break_y3jbr", "section_break_qqgnh", @@ -32,7 +32,11 @@ "section_break_qpifr", "expected_weight", "assigned_person", - "bom_created" + "tolerance", + "bom_created", + "reference_tab", + "reference_image", + "image" ], "fields": [ { @@ -97,13 +101,6 @@ "options": "Purity", "reqd": 1 }, - { - "fetch_from": "customer_name.mobile_no", - "fetch_if_empty": 1, - "fieldname": "mobile_no", - "fieldtype": "Data", - "label": "Phone.No" - }, { "fieldname": "section_break_rgobr", "fieldtype": "Section Break" @@ -179,7 +176,8 @@ "fieldname": "status", "fieldtype": "Select", "label": "Status", - "options": "Draft\nRequest For Verification\nRequest For Approval\nApproved\nHold\nRejected\nBOM Created\nWorkorder Created" + "options": "Draft\nRequest For Verification\nRequest For Approval\nApproved\nHold\nRejected\nBOM Created\nWorkorder Created", + "read_only": 1 }, { "fieldname": "assigned_person", @@ -194,11 +192,39 @@ "fieldtype": "Check", "hidden": 1, "label": "BOM created" + }, + { + "fieldname": "reference_tab", + "fieldtype": "Tab Break", + "label": "Reference" + }, + { + "fetch_from": "design_request.attachment", + "fieldname": "reference_image", + "fieldtype": "Attach Image", + "label": "Reference Image" + }, + { + "fieldname": "image", + "fieldtype": "Image", + "label": "image", + "options": "reference_image" + }, + { + "fieldname": "tolerance", + "fieldtype": "Float", + "label": "Tolerance" + }, + { + "fetch_from": "design_request.mobile_no", + "fieldname": "phone_no", + "fieldtype": "Data", + "label": "Phone No" } ], "index_web_pages_for_search": 1, "links": [], - "modified": "2023-11-07 20:48:24.657689", + "modified": "2023-11-09 14:49:22.769235", "modified_by": "Administrator", "module": "AuMMS", "name": "Design Analysis",