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