improve
parent
4b51b8be9d
commit
d508062f48
|
@ -196,17 +196,6 @@ class ReportLaborCost(Model):
|
||||||
'name': 'รวม',
|
'name': 'รวม',
|
||||||
'amount': total_amount,
|
'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():
|
for dt_name,vals in ddata.items():
|
||||||
qty=vals['qty'] or 0
|
qty=vals['qty'] or 0
|
||||||
department_id=vals['department_id']
|
department_id=vals['department_id']
|
||||||
|
@ -224,6 +213,17 @@ class ReportLaborCost(Model):
|
||||||
'branch_id': branch_id,
|
'branch_id': branch_id,
|
||||||
'staff_type': 'doctor',
|
'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({
|
dlines.append({
|
||||||
'name': 'รวม',
|
'name': 'รวม',
|
||||||
'qty': 0,
|
'qty': 0,
|
||||||
|
@ -264,6 +264,7 @@ class ReportLaborCost(Model):
|
||||||
'total': 0,
|
'total': 0,
|
||||||
'staff_type': 'nurse',
|
'staff_type': 'nurse',
|
||||||
})
|
})
|
||||||
|
nlines=sorted(nlines, key=lambda x: x['name'])
|
||||||
nlines.append({
|
nlines.append({
|
||||||
'name': 'รวม',
|
'name': 'รวม',
|
||||||
'qty': 0,
|
'qty': 0,
|
||||||
|
|
Loading…
Reference in New Issue