report staff fee

conv_bal
watcha.h@almacom.co.th 2015-01-19 21:26:16 +07:00
parent 93fbd6c64b
commit 54738bce05
3 changed files with 21 additions and 8 deletions

View File

@ -73,10 +73,10 @@ class ReportStaffFeeDetail(Model):
if staff_type:
dom.append(['staff_id.type','=',staff_type])
staff_name=''
show_qty=False
if staff_id:
staff=get_model("clinic.staff").browse(staff_id)
staff_name=staff.name
dom.append(['staff_id','=',staff.id])
dom.append(['staff_id','=',staff_id])
show_qty=True
dlines=get_model('clinic.labor.cost.line').search_browse(dom)
# group by date
all_vals={}
@ -123,6 +123,11 @@ class ReportStaffFeeDetail(Model):
start=int(time_start[8:10])
stop=int(time_stop[8:10])
diff=stop-start
branch_name=''
if branch:
branch_name='(%s)'%branch.name or ''
if department:
branch_name='(%s)'%department.name or ''
data={
'company_name': company.name or "",
'parent_company_name': company.parent_id.name or "",
@ -135,6 +140,8 @@ class ReportStaffFeeDetail(Model):
'to': time_stop,
'is_duration': diff+1 < total_day,
'year': year,
'branch_name': branch_name,
'show_qty': show_qty,
}
return data

View File

@ -1,7 +1,7 @@
<center>
<h2>ผลตอบแทนดูแลผู้ป่วย</h2>
<h3>
{{parent_company_name}}&nbsp;{{company_name}}<br/>
{{parent_company_name}}&nbsp;{{company_name}}{{branch_name}}<br/>
</h3>
<h4>
{{staff_name}}
@ -51,9 +51,15 @@
{{/unless}}
<th></th>
<th></th>
<th></th>
<th style="text-align:right">รวม</th>
<th style="text-align:right">{{currency total_amount}}</th>
{{#if show_qty}}
<th style="text-align:right">รวม</th>
<th style="text-align:right">{{total_qty}}</th>
<th style="text-align:right">{{currency total_amount}}</th>
{{else}}
<th></th>
<th style="text-align:right">รวม</th>
<th style="text-align:right">{{currency total_amount}}</th>
{{/if}}
</tfoot>
</table>
{{else}}

View File

@ -1,5 +1,5 @@
<center>
<h2>ผลตอบแทนดูแลผู้ป่วย</h2>
<h2>รายละเอียดผลตอบแทนดูแลผู้ป่วย</h2>
<h3>
{{parent_company_name}}&nbsp;{{company_name}}<br/>
</h3>