From b3730ba22fd1b36b5aa3aef60f3c6984e209f5c7 Mon Sep 17 00:00:00 2001 From: abhijith Date: Tue, 24 Oct 2017 17:10:39 +0530 Subject: [PATCH] Checked dcinvtnflag while checking flag when DC is present --- gkcore/views/api_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gkcore/views/api_invoice.py b/gkcore/views/api_invoice.py index abaddc6..2ae6ea1 100644 --- a/gkcore/views/api_invoice.py +++ b/gkcore/views/api_invoice.py @@ -302,7 +302,7 @@ There will be an icFlag which will determine if it's an incrementing or decreme delchalData = dc.fetchone() inv["dcid"]=dcid["dcid"] inv["dcno"]=delchalData["dcno"] - inOut = self.con.execute(select([stock.c.inout]).where(stock.c.dcinvtnid==dcid["dcid"])) + inOut = self.con.execute(select([stock.c.inout]).where(and_(stock.c.dcinvtnid==dcid["dcid"], stock.c.dcinvtnflag==4))) inOutData = inOut.fetchone() if inOutData != None: inv["inoutflag"] = int(inOutData["inout"]) -- GitLab