fix(naming): Use creation instead of name to order SLEs

This commit is contained in:
Aditya Hase
2019-01-07 22:07:13 +05:30
parent 972f659fd5
commit 0c16424d7d
14 changed files with 17 additions and 17 deletions

View File

@@ -62,7 +62,7 @@ def get_stock_value_on(warehouse=None, posting_date=None, item_code=None):
SELECT item_code, stock_value, name, warehouse
FROM `tabStock Ledger Entry` sle
WHERE posting_date <= %s {0}
ORDER BY timestamp(posting_date, posting_time) DESC, name DESC
ORDER BY timestamp(posting_date, posting_time) DESC, creation DESC
""".format(condition), values, as_dict=1)
sle_map = {}