data1_global=frappe.db.sql('''SELECT name,format(max(version),2) as version,vehicle_id,language,release_description as description FROM `tabPublish` where vehicle='{}' and language='{}'
data1_global=frappe.db.sql('''SELECT name,format(version,2) as version,vehicle_id,language,release_description as description FROM `tabPublish` where vehicle='{}' and language='{}'
data=frappe.db.sql('''SELECT name,format(max(version),2) as version,vehicle_id,language,release_description as description FROM `tabPublish` where vehicle='{}' and language='{}'
data=frappe.db.sql('''SELECT name,format(version,2) as version,vehicle_id,language,release_description as description FROM `tabPublish` where vehicle='{}' and language='{}'
publish_dec=frappe.db.sql('''SELECT name,format(max(version),2) as version,vehicle_id,language,release_description as description FROM `tabPublish` where vehicle='{}' and language='{}'
data=frappe.db.sql('''SELECT name,format(max(version),2) as version,vehicle_id,language,release_description as description FROM `tabPublish` where vehicle='{}' and language='{}'
data=frappe.db.sql('''SELECT name,format(version,2) as version,vehicle_id,language,release_description as description FROM `tabPublish` where vehicle='{}' and language='{}'
publish_dec=frappe.db.sql('''SELECT name,format(max(version),2) as version,vehicle_id,language,release_description as description FROM `tabPublish` where vehicle='{}' and language='{}'
# and publish_status='Published' and publish_type='Internal' and vehicle_status='Active' and version = '{}' and publish_module='Automotive System'
publish_dec=frappe.db.sql('''SELECT name,format(version,2) as version,vehicle_id,language,release_description as description FROM `tabPublish` where vehicle='{}' and language='{}'
# and publish_status='Published' and vehicle_status='Active' and version = '{}' and publish_module='Automotive System'
# order by version ASC;'''.format(v_id, lang, data1_global[0]['version']), as_dict=1)
elifcurrent_version==float(data1[0]['version']):
ifcurrent_version<float(data1[0]['version']):
data=frappe.db.sql('''SELECT name,format(max(version),2) as version,vehicle_id,language,release_description as description FROM `tabPublish` where vehicle='{}' and
publish_dec=frappe.db.sql('''SELECT name,format(max(version),2) as version,vehicle_id,language,release_description as description FROM `tabPublish` where vehicle='{}' and language='{}'
publish_dec=frappe.db.sql('''SELECT name,format(version,2) as version,vehicle_id,language,release_description as description FROM `tabPublish` where vehicle='{}' and language='{}'