can not summary amount

conv_bal
watcha.h@almacom.co.th 2015-05-07 14:13:55 +07:00
parent d7743fb6fc
commit 8d9936b9de
1 changed files with 3 additions and 3 deletions

View File

@ -295,11 +295,11 @@ class ReportLaborCost(Model):
'option_qty2': 'mode=list&search_domain=%s&tab_no=0'%replace_quote('%s'%(dom5)),
})
for dline in dlines[1:-1]:
dlines[-1]['qty']+=float(dline['qty']) or 0
dlines[-1]['qty2']+=float(dline['qty2']) or 0
dlines[-1]['qty']+=float((dline['qty'] or "").replace(",","")) or 0
dlines[-1]['qty2']+=float((dline['qty2'] or "").replace(",","")) or 0
dlines[-1]['total_qty']+=dline['total_qty'] or 0
dlines[-1]['cost']+=dline['cost'] or 0
dlines[-1]['walkin_qty']+=float(dline['qty2']) or 0
dlines[-1]['walkin_qty']+=float((dline['qty2'] or "").replace(",","")) or 0
dlines[-1]['qty']="{0:,.2f}".format(round(dlines[-1]['qty'],2)) #total
dlines[-1]['qty2']="{0:,.2f}".format(round(dlines[-1]['qty2'],2)) #total