fixed error in receivable voucher (fetching pos warehosue)

This commit is contained in:
Nabin Hait 2011-09-05 14:21:46 +05:30
parent 0275149074
commit e91fa64e58

View File

@ -580,6 +580,7 @@ class DocType(TransactionBase):
# Get Warehouse
def get_warehouse(self):
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:
ps = sql("select name, warehouse from `tabPOS Setting` where ifnull(user,'') = '' and company = '%s'" % self.doc.company)
if not ps: