From 6accb8470625f75e19f8480456caaf3bc7da4ac8 Mon Sep 17 00:00:00 2001 From: venkataakhil Date: Wed, 21 Jun 2023 19:49:44 +0530 Subject: [PATCH] Procedure status update --- smart_service/apis/support.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/smart_service/apis/support.py b/smart_service/apis/support.py index a6100e8..fcaced2 100644 --- a/smart_service/apis/support.py +++ b/smart_service/apis/support.py @@ -396,4 +396,10 @@ def procedure_do(variant,language,system): data = frappe.db.sql(f'''SELECT min(tmss.idx) as systemdisplayorder,ts.system_name,ts.icon_file,ts.myid,ts.active_status,concat(variant,'-',ts.system_name) FROM `tabSystem Mapping_Sub System` as tmss inner join `tabSystems` as ts on tmss.systems = ts.system_name where tmss.parent LIKE "{variant}" and substring(tmss.parent,-5,2) = "{language}" and tmss.systems ="{system}";''',as_dict=1) - return data \ No newline at end of file + return data + +@frappe.whitelist() +def set_procedure_false(): + frappe.db.sql('''update `tabSystem Mapping_Sub System` set procedure_is_published=0; + ''') + frappe.db.commit() \ No newline at end of file