From 8d9936b9de4ff8e6aac5cfdbb1799f6db32113a0 Mon Sep 17 00:00:00 2001 From: "watcha.h@almacom.co.th" Date: Thu, 7 May 2015 14:13:55 +0700 Subject: [PATCH] can not summary amount --- netforce_clinic/models/report_labor_cost.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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