mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-16 16:08:39 +00:00
Merge pull request #56236 from mihir-kandoi/pg-test-stock-entry-timestamp
test(stock): order get_sle by posting_datetime, not MySQL timestamp()
This commit is contained in:
@@ -47,8 +47,9 @@ def get_sle(**args):
|
||||
values.append(value)
|
||||
|
||||
return frappe.db.sql(
|
||||
# posting_datetime is the precomputed date+time column; MySQL-only timestamp(date,time) errors on Postgres
|
||||
"""select * from `tabStock Ledger Entry` %s
|
||||
order by timestamp(posting_date, posting_time) desc, creation desc limit 1"""
|
||||
order by posting_datetime desc, creation desc limit 1"""
|
||||
% condition,
|
||||
values,
|
||||
as_dict=1,
|
||||
|
||||
Reference in New Issue
Block a user