improve
parent
4b51b8be9d
commit
d508062f48
|
@ -196,17 +196,6 @@ class ReportLaborCost(Model):
|
|||
'name': 'รวม',
|
||||
'amount': total_amount,
|
||||
})
|
||||
dlines.append({
|
||||
'name': 'แพทย์',
|
||||
'qty': 'จำนวนครั้ง',
|
||||
'qty2': 'ไม่จ่ายแพทย์',
|
||||
'total_qty': 'รวมจำนวนครั้ง',
|
||||
'cost': 'เป็นยอดเงินรวม',
|
||||
'desc': True,
|
||||
'department_id': None,
|
||||
'branch_id':None,
|
||||
'staff_type': 'doctor',
|
||||
})
|
||||
for dt_name,vals in ddata.items():
|
||||
qty=vals['qty'] or 0
|
||||
department_id=vals['department_id']
|
||||
|
@ -224,6 +213,17 @@ class ReportLaborCost(Model):
|
|||
'branch_id': branch_id,
|
||||
'staff_type': 'doctor',
|
||||
})
|
||||
dlines=[{
|
||||
'name': 'แพทย์',
|
||||
'qty': 'จำนวนครั้ง',
|
||||
'qty2': 'ไม่จ่ายแพทย์',
|
||||
'total_qty': 'รวมจำนวนครั้ง',
|
||||
'cost': 'เป็นยอดเงินรวม',
|
||||
'desc': True,
|
||||
'department_id': None,
|
||||
'branch_id':None,
|
||||
'staff_type': 'doctor',
|
||||
}]+sorted(dlines,key=lambda x: x['name'])
|
||||
dlines.append({
|
||||
'name': 'รวม',
|
||||
'qty': 0,
|
||||
|
@ -264,6 +264,7 @@ class ReportLaborCost(Model):
|
|||
'total': 0,
|
||||
'staff_type': 'nurse',
|
||||
})
|
||||
nlines=sorted(nlines, key=lambda x: x['name'])
|
||||
nlines.append({
|
||||
'name': 'รวม',
|
||||
'qty': 0,
|
||||
|
|
Loading…
Reference in New Issue