From c8a4791d9b8753fdb715ac8e164b036290229c92 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sat, 6 May 2023 20:09:15 +0530 Subject: [PATCH] fix: pick the in progress reposting entries first --- .../doctype/repost_item_valuation/repost_item_valuation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py index 50534605fe..d3bcab76ab 100644 --- a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py +++ b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py @@ -353,7 +353,7 @@ def get_repost_item_valuation_entries(): return frappe.db.sql( """ SELECT name from `tabRepost Item Valuation` WHERE status in ('Queued', 'In Progress') and creation <= %s and docstatus = 1 - ORDER BY timestamp(posting_date, posting_time) asc, creation asc + ORDER BY timestamp(posting_date, posting_time) asc, creation asc, status asc """, now(), as_dict=1,