From f02e6b463188a35b0798cdd6174f374b24bbc81b Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Mon, 3 Jan 2022 14:28:34 +0530 Subject: [PATCH] fix: incorrect posting time fetching incorrect qty (#29103) --- erpnext/stock/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/utils.py b/erpnext/stock/utils.py index 3b1ae3b43c..3c70b41eda 100644 --- a/erpnext/stock/utils.py +++ b/erpnext/stock/utils.py @@ -86,8 +86,8 @@ def get_stock_balance(item_code, warehouse, posting_date=None, posting_time=None from erpnext.stock.stock_ledger import get_previous_sle - if not posting_date: posting_date = nowdate() - if not posting_time: posting_time = nowtime() + if posting_date is None: posting_date = nowdate() + if posting_time is None: posting_time = nowtime() args = { "item_code": item_code,