xxx
parent
030ad8fcd5
commit
8de9d3c23f
|
@ -207,8 +207,8 @@ class ReportLaborCost(Model):
|
||||||
})
|
})
|
||||||
for dt_name,vals in ddata.items():
|
for dt_name,vals in ddata.items():
|
||||||
qty=vals['qty'] or 0
|
qty=vals['qty'] or 0
|
||||||
department_id=vals['department_id']
|
dpt_id=vals['department_id']
|
||||||
branch_id=vals['branch_id']
|
brch_id=vals['branch_id']
|
||||||
walkin_qty=vals['walkin_qty']
|
walkin_qty=vals['walkin_qty']
|
||||||
cost=(walkin_qty+qty)*cost_per_case
|
cost=(walkin_qty+qty)*cost_per_case
|
||||||
dlines.append({
|
dlines.append({
|
||||||
|
@ -218,8 +218,8 @@ class ReportLaborCost(Model):
|
||||||
'total_qty': walkin_qty+qty,
|
'total_qty': walkin_qty+qty,
|
||||||
'cost': cost,
|
'cost': cost,
|
||||||
'total': 0,
|
'total': 0,
|
||||||
'department_id': department_id,
|
'department_id': dpt_id,
|
||||||
'branch_id': branch_id,
|
'branch_id': brch_id,
|
||||||
'staff_type': 'doctor',
|
'staff_type': 'doctor',
|
||||||
})
|
})
|
||||||
dlines=[{
|
dlines=[{
|
||||||
|
@ -261,15 +261,15 @@ class ReportLaborCost(Model):
|
||||||
})
|
})
|
||||||
for dt_name, vals in ndata.items():
|
for dt_name, vals in ndata.items():
|
||||||
hdcases=vals['hdcases']
|
hdcases=vals['hdcases']
|
||||||
department_id=vals['department_id']
|
dpt_id=vals['department_id']
|
||||||
branch_id=vals['branch_id']
|
brch_id=vals['branch_id']
|
||||||
total_hdcase=len(hdcases)
|
total_hdcase=len(hdcases)
|
||||||
nlines.append({
|
nlines.append({
|
||||||
'name': dt_name,
|
'name': dt_name,
|
||||||
'qty': total_hdcase,
|
'qty': total_hdcase,
|
||||||
'cost': total_hdcase*vark,
|
'cost': total_hdcase*vark,
|
||||||
'department_id': department_id,
|
'department_id': dpt_id,
|
||||||
'branch_id': branch_id,
|
'branch_id': brch_id,
|
||||||
'total': 0,
|
'total': 0,
|
||||||
'staff_type': 'nurse',
|
'staff_type': 'nurse',
|
||||||
})
|
})
|
||||||
|
|
|
@ -64,6 +64,7 @@ class ReportLaborCostSummary(Model):
|
||||||
'categ_id': categ_id,
|
'categ_id': categ_id,
|
||||||
'level_id': level_id,
|
'level_id': level_id,
|
||||||
}
|
}
|
||||||
|
print('res ', res)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def get_report_data(self,ids,context={}):
|
def get_report_data(self,ids,context={}):
|
||||||
|
@ -83,7 +84,7 @@ class ReportLaborCostSummary(Model):
|
||||||
date_from=obj.date_from
|
date_from=obj.date_from
|
||||||
date_to=obj.date_to
|
date_to=obj.date_to
|
||||||
staff_id=obj.staff_id.id
|
staff_id=obj.staff_id.id
|
||||||
staff_type=obj.staff_type
|
staff_type=obj.staff_type or "doctor"
|
||||||
level_id=obj.level_id.id
|
level_id=obj.level_id.id
|
||||||
categ_id=obj.categ_id.id
|
categ_id=obj.categ_id.id
|
||||||
branch_id=obj.branch_id.id
|
branch_id=obj.branch_id.id
|
||||||
|
|
|
@ -147,7 +147,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th style="text-align:left;width:14%">{{name}}</th>
|
<th style="text-align:left;width:14%">{{name}}</th>
|
||||||
<td style="text-align:right">
|
<td style="text-align:right">
|
||||||
<a href="#name=clinic_report_labor_cost_summary&defaults.categ_id={{categ_id}}&defaults.date={{../../date}}&defaults.date_from={{../../date_from}}&defaults.date_to={{../../date_to}}&defaults.branch_id={{branch_id}}&defaults.department_id={{department_id}}&defaults.staff_type={{staff_type}}">{{currency amount}}</a>
|
<a href="#name=clinic_report_labor_cost_summary&defaults.categ_id={{categ_id}}&defaults.date={{../../date}}&defaults.date_from={{../../date_from}}&defaults.date_to={{../../date_to}}&defaults.branch_id={{branch_id}}&defaults.department_id={{department_id}}&defaults.staff_type=nurse">{{currency amount}}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
Loading…
Reference in New Issue