print total epo
parent
820ec298e7
commit
50d2930461
|
@ -247,12 +247,14 @@ class ReportCycleItem(Model):
|
|||
epo_items=[{'name': k, 'qty': v} for k,v in epos.items() if k ]
|
||||
nlines.append({
|
||||
'sub': 'show',
|
||||
'is_sub': True,
|
||||
'sub_txt': 'รวม',
|
||||
'row_color': '#dfdfdf',
|
||||
'no': count,
|
||||
'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])
|
||||
})
|
||||
for epo_item in epo_items:
|
||||
if not total_epos.get(epo_item['name']):
|
||||
|
@ -285,6 +287,9 @@ class ReportCycleItem(Model):
|
|||
})
|
||||
index+=1
|
||||
vscl_txt=' '.join(['%s = %s'%(x['description'],x['qty']) for x in vscl_lines])
|
||||
total_epo_txt=''
|
||||
for t_epo in total_epo_items:
|
||||
total_epo_txt+='%s = %s '%(t_epo['name'], t_epo['qty'])
|
||||
data={
|
||||
'company_name': company_name or "",
|
||||
'lines': nlines,
|
||||
|
@ -301,6 +306,7 @@ class ReportCycleItem(Model):
|
|||
'total_pt': total_pt,
|
||||
'total_epo': sum([x['qty'] for x in total_epo_items]),
|
||||
'total_epo_items': total_epo_items,
|
||||
'total_epo_txt': total_epo_txt,
|
||||
}
|
||||
return data
|
||||
|
||||
|
|
Binary file not shown.
|
@ -44,12 +44,12 @@
|
|||
<td><a href="/ui#name=clinic_cycle_item&active_id={{ctid}}&mode=form">{{nfirst_name}}</a></td>
|
||||
{{else}}
|
||||
{{#ifeq sub "show"}}
|
||||
<td>ผู้ป่วย | ยาฉีด</td>
|
||||
<td>รวม</td>
|
||||
<td></td>
|
||||
<td style="text-align:center">{{no}}</td>
|
||||
<td colspan="9">
|
||||
{{#each epo_items}}
|
||||
{{name}} : {{qty}}
|
||||
{{name}} = {{qty}}
|
||||
{{/each}}
|
||||
</td>
|
||||
{{else}}
|
||||
|
@ -87,7 +87,7 @@
|
|||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="active">ยาฉีดทั้งหมด</th>
|
||||
<th class="active">ยาทั้งหมด</th>
|
||||
<th class="active"></th>
|
||||
<th class="active">{{total_epo}}</th>
|
||||
<th colspan="9" class="active">
|
||||
|
|
Loading…
Reference in New Issue