diff --git a/netforce_clinic/models/report_labor_cost.py b/netforce_clinic/models/report_labor_cost.py index 3c257d2..53eda76 100644 --- a/netforce_clinic/models/report_labor_cost.py +++ b/netforce_clinic/models/report_labor_cost.py @@ -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