fix: formatting query args (#24627)

This commit is contained in:
Nabin Hait 2021-02-15 19:27:49 +05:30
parent 76f616565e
commit f2be0805f7

View File

@ -194,6 +194,8 @@ class update_entries_after(object):
self.process_sle(sle)
def get_sle_against_current_voucher(self):
self.args['time_format'] = '%H:%i:%s'
return frappe.db.sql("""
select
*, timestamp(posting_date, posting_time) as "timestamp"
@ -202,7 +204,7 @@ class update_entries_after(object):
where
item_code = %(item_code)s
and warehouse = %(warehouse)s
and timestamp(posting_date, time_format(posting_time, '%H:%i:%s')) = timestamp(%(posting_date)s, time_format(%(posting_time)s, '%H:%i:%s'))
and timestamp(posting_date, time_format(posting_time, %(time_format)s)) = timestamp(%(posting_date)s, time_format(%(posting_time)s, %(time_format)s))
order by
creation ASC
for update