Invalid date value comparison, fixes for mariadb 10.2.3+

This commit is contained in:
Nabin Hait
2018-01-31 15:30:03 +05:30
parent e37e5d6134
commit 7918b92d95
5 changed files with 6 additions and 7 deletions

View File

@@ -257,7 +257,7 @@ def get_delivery_notes_to_be_billed(doctype, txt, searchfield, start, page_len,
def get_batch_no(doctype, txt, searchfield, start, page_len, filters):
cond = ""
if filters.get("posting_date"):
cond = "and (ifnull(batch.expiry_date, '')='' or batch.expiry_date >= %(posting_date)s)"
cond = "and (batch.expiry_date is null or batch.expiry_date >= %(posting_date)s)"
batch_nos = None
args = {