Merge pull request #72 from nabinhait/master

fixed error
This commit is contained in:
Nabin Hait 2011-09-05 01:52:40 -07:00
commit da073e94e7

View File

@ -580,6 +580,7 @@ class DocType(TransactionBase):
# Get Warehouse # Get Warehouse
def get_warehouse(self): def get_warehouse(self):
w = sql("select warehouse from `tabPOS Setting` where ifnull(user,'') = '%s' and company = '%s'" % (session['user'], self.doc.company)) w = sql("select warehouse from `tabPOS Setting` where ifnull(user,'') = '%s' and company = '%s'" % (session['user'], self.doc.company))
w = w and w[0][0] or ''
if not w: if not w:
ps = sql("select name, warehouse from `tabPOS Setting` where ifnull(user,'') = '' and company = '%s'" % self.doc.company) ps = sql("select name, warehouse from `tabPOS Setting` where ifnull(user,'') = '' and company = '%s'" % self.doc.company)
if not ps: if not ps: