Fix: Batch autocomplete was not working so Issue / Return was not working

This commit is contained in:
Amritanshu Agrawal 2021-09-11 13:25:05 +05:30
parent 074e45fe69
commit 20ce1a297e

View File

@ -21,7 +21,7 @@ def batch_term(
date = None if not d else datetime.datetime.strptime(d, "%d-%b-%Y")
list_ = []
with SessionFuture() as db:
for index, item in enumerate(Batch.list(q, include_nil=False, date=date, db=db)):
for index, item in enumerate(Batch.list(q, include_nil=False, date_=date, db=db)):
text = (
f"{item.product.name} ({item.product.units}) {item.quantity_remaining:.2f}@"
f"{item.rate:.2f} from {item.name.strftime('%d-%b-%Y')}"