conv_bal
watcha.h@almacom.co.th 2015-06-12 11:32:37 +07:00
parent 593ffd6248
commit e86640ea42
1 changed files with 8 additions and 4 deletions

View File

@ -128,7 +128,6 @@ class ReportCycleSetting(Model):
pts[key]['sun_cycle_id']=cycle.name
lines=[]
no=1
for k, vals in pts.items():
pt_id, dpt_id=k
if pt_id:
@ -138,12 +137,17 @@ class ReportCycleSetting(Model):
dpt_id=pt.department_id.id
if dpt_id:
vals['department_id']=dpt_id
vals['no']=no
lines.append(vals)
no=1
nlines=[]
for line in sorted(lines,key=lambda x:x['patient_name']):
line['no']=no
nlines.append(line)
no+=1
data={
'lines': lines,
'lines': nlines,
'department_id': department_id,
}
return data