Browse Source

Test kms

master
venkataakhil 1 year ago
parent
commit
c58ba17c68
  1. 5
      smart_service/apis/support.py

5
smart_service/apis/support.py

@ -437,10 +437,11 @@ def circular_api():
return api
@frappe.whitelist(allow_guest=1)
def get_kms_mapping(sub_system,variant):
def get_kms_mapping(sub_system,variant,language):
try:
varKMS = variant + "-" + language + "%"
data = frappe.db.sql(f'''SELECT kilometer as kilometer_name, idx as kilometer_IDX, applicable as kilometers_applicable
FROM `tabKilometer Mapping_Items` where sub_systems="{sub_system}" and parent LIKE "{variant}" order by kilometer_IDX;''',as_dict=1)
FROM `tabKilometer Mapping_Items` where sub_systems="{sub_system}" and parent LIKE "{varKMS}" order by kilometer_IDX;''',as_dict=1)
return data
except Exception as e:
return e
Loading…
Cancel
Save