improve report cycle item
							parent
							
								
									fdb109df0d
								
							
						
					
					
						commit
						9716398d93
					
				| 
						 | 
				
			
			@ -225,12 +225,15 @@ class ReportCycleItem(Model):
 | 
			
		|||
            })
 | 
			
		||||
        ptype_lines=[]
 | 
			
		||||
        total_pt=0
 | 
			
		||||
        for pname,qty in ptypes.items():
 | 
			
		||||
        pkeys=list(ptypes.keys())
 | 
			
		||||
        for pname in sorted(pkeys):
 | 
			
		||||
            qty=ptypes[pname]
 | 
			
		||||
            ptype_lines.append({
 | 
			
		||||
                'name': pname,
 | 
			
		||||
                'qty': qty,
 | 
			
		||||
            })
 | 
			
		||||
            total_pt+=qty
 | 
			
		||||
        ptype_txt=' '.join(['%s: %s'%(x['name'],x['qty']) for x in ptype_lines])
 | 
			
		||||
        vscl_lines2=[{}]
 | 
			
		||||
        index=1
 | 
			
		||||
        for vscl_line in vscl_lines:
 | 
			
		||||
| 
						 | 
				
			
			@ -239,14 +242,13 @@ class ReportCycleItem(Model):
 | 
			
		|||
                'v%s_1'%index: vscl_line['qty'],
 | 
			
		||||
            })
 | 
			
		||||
            index+=1
 | 
			
		||||
        #for nline in nlines:
 | 
			
		||||
            #print(nline.get('date'), nline.get('nfirst_name'))
 | 
			
		||||
        data={
 | 
			
		||||
            'company_name': company_name or "",
 | 
			
		||||
            'lines': nlines,
 | 
			
		||||
            'vscl_lines': vscl_lines,
 | 
			
		||||
            'vscl_lines2': vscl_lines2,
 | 
			
		||||
            'ptype_lines': ptype_lines,
 | 
			
		||||
            'ptype_txt': ptype_txt,
 | 
			
		||||
            'month': month_str,
 | 
			
		||||
            'date_from': date_from,
 | 
			
		||||
            'date_to': date_to,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -71,19 +71,14 @@
 | 
			
		|||
        <th class="active">รวมผู้ป่วยทั้งหมด</th>
 | 
			
		||||
        <th class="active"></th>
 | 
			
		||||
        <th class="active">{{total_pt}}</th>
 | 
			
		||||
        <th class="active"></th>
 | 
			
		||||
        <th class="active"></th>
 | 
			
		||||
        <th class="active"></th>
 | 
			
		||||
        <!--
 | 
			
		||||
        <th class="active" style="text-align:right">{{currency total_fee zero=""}}</th>
 | 
			
		||||
        -->
 | 
			
		||||
        <th class="active" style="text-align:left"></th>
 | 
			
		||||
        <th class="active"></th>
 | 
			
		||||
        <th class="active"></th>
 | 
			
		||||
        <th class="active"></th>
 | 
			
		||||
        <th colspan="7" class="active">
 | 
			
		||||
            {{#each ptype_lines}}
 | 
			
		||||
                {{name}} : {{qty}}    
 | 
			
		||||
            {{/each}}
 | 
			
		||||
        </th>
 | 
			
		||||
    </tfoot>
 | 
			
		||||
</table>
 | 
			
		||||
<table class="table table-condensed table-striped">
 | 
			
		||||
<table class="table table-condensed table-striped" style="margin-bottom:0px;">
 | 
			
		||||
    <tbody>
 | 
			
		||||
        <tr>
 | 
			
		||||
            {{#each vscl_lines}}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue