saved
parent
7d4275959a
commit
15b91116cd
|
@ -277,7 +277,7 @@ class ReportCycleItem(Model):
|
|||
# if nurse more that cres, should show name of nurses
|
||||
nlines+=more_lines
|
||||
if no==count:
|
||||
epo_items=[{'name': k, 'qty': v} for k,v in epos.items() if k ]
|
||||
epo_items=sorted([{'name': k, 'qty': v} for k,v in epos.items() if k ], key=lambda a: a['name'])
|
||||
#sort item
|
||||
#clines=sorted(clines,key=lambda cl: cl[sort_by])
|
||||
no=1
|
||||
|
@ -322,13 +322,13 @@ class ReportCycleItem(Model):
|
|||
'fee': sub_fee,
|
||||
'mdc': sub_mdc,
|
||||
'epo_items': epo_items,
|
||||
'epo_txt': ', '.join(['%s = %s'%(k,v) for k,v in epos.items() if k])
|
||||
'epo_txt': ', '.join(['%s = %s'%(v['name'], v['qty']) for v in epo_items if v])
|
||||
})
|
||||
for epo_item in epo_items:
|
||||
if not total_epos.get(epo_item['name']):
|
||||
total_epos[epo_item['name']]=0
|
||||
total_epos[epo_item['name']]+=epo_item['qty'] or 0
|
||||
total_epo_items=[{'name': k, 'qty': v} for k,v in total_epos.items() if k ]
|
||||
total_epo_items=sorted([{'name': k, 'qty': v} for k,v in total_epos.items() if k ], key=lambda a: a['name'])
|
||||
vscl_lines=[]
|
||||
for k,v in vasculars.items():
|
||||
vscl_lines.append({
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue