diff --git a/smart_service/transactions/doctype/kilometer_mapping/kilometer_mapping.py b/smart_service/transactions/doctype/kilometer_mapping/kilometer_mapping.py index 2ddd432..67d84a0 100644 --- a/smart_service/transactions/doctype/kilometer_mapping/kilometer_mapping.py +++ b/smart_service/transactions/doctype/kilometer_mapping/kilometer_mapping.py @@ -5,7 +5,6 @@ import frappe from frappe.model.document import Document import sys from frappe import _ -<<<<<<< HEAD sys.tracebacklimit = 0 @@ -32,7 +31,6 @@ def get_system(doc): return system -======= sys.tracebacklimit=0 current_db_name = frappe.conf.get("db_name") class KilometerMapping(Document): @@ -53,7 +51,6 @@ def get_system(doc): system = frappe.db.sql("""select sub_systems,mat from {0}.`tabSystem Mapping_Sub System` where parent = '{1}' and procedure_is_published = '0'""".format(current_db_name,s.name),as_dict=True) return system ->>>>>>> bb4600bece5c8a0a27d7e8515d386801fc23a646 @frappe.whitelist() def get_subsystem(doc): current_db_name = frappe.conf.get("db_name") @@ -86,7 +83,6 @@ def update_duplicate_km(doc, kilometer): @frappe.whitelist() -<<<<<<< HEAD def get_config_kilometer(doc, docname): res = frappe.db.sql( f"""select kilometer,mat,sub_systems,applicable,row_name from `tabKilometer Mapping_Items` where parent='{doc}'""", as_dict=1) @@ -98,7 +94,7 @@ def get_config_kilometer(doc, docname): ress.save() frappe.db.commit() return {"status": "success"} -======= + def get_config_kilometer(doc,docname): res = frappe.db.sql(f"""select kilometer,mat,sub_systems,applicable,row_name from `tabKilometer Mapping_Items` where parent='{doc}'""",as_dict=1) ress = frappe.get_doc("Kilometer Mapping",docname) @@ -123,4 +119,3 @@ def get_config_kilometer(doc,docname): # km_filters =frappe.db.sql(f"""select * from `tabKilometer Mapping_Items` where parent ="{parent}" and kilometer ="{km}" order by length(kilometer),kilometer """,as_dict = 1) # return km_filters ->>>>>>> bb4600bece5c8a0a27d7e8515d386801fc23a646