diff --git a/netforce_clinic/layouts/clinic_report_nurse_fee_detail.xml b/netforce_clinic/layouts/clinic_report_nurse_fee_detail.xml
index ee97439..24efed2 100644
--- a/netforce_clinic/layouts/clinic_report_nurse_fee_detail.xml
+++ b/netforce_clinic/layouts/clinic_report_nurse_fee_detail.xml
@@ -3,4 +3,5 @@
+
diff --git a/netforce_clinic/models/report_nurse_fee_detail.py b/netforce_clinic/models/report_nurse_fee_detail.py
index 042df6f..edc3f4a 100644
--- a/netforce_clinic/models/report_nurse_fee_detail.py
+++ b/netforce_clinic/models/report_nurse_fee_detail.py
@@ -16,6 +16,7 @@ class ReportNurseFeeDetail(Model):
"date_from": fields.Date("From", required=True),
"date_to": fields.Date("To", required=True),
'personal_id': fields.Many2One("clinic.personal","Personal"),
+ "type": fields.Selection([["doctor","Doctor"],["nurse","Nurse"],["personal","Personal"]],"Type"),
}
def _get_date_from(self,context={}):
@@ -47,12 +48,14 @@ class ReportNurseFeeDetail(Model):
time_start='%s-%s-01'%(year,str(month).zfill(2))
time_stop='%s-%s-%s'%(year,str(month).zfill(2),total_day)
personal_id=None
+ personal_type=None
if ids:
obj=self.browse(ids)[0]
month=obj.date_from.split("-")[1]
time_start=obj.date_from
time_stop=obj.date_to
personal_id=obj.personal_id.id
+ personal_type=obj.type
# new patient of this month
dom=[]
dom.append(['date','>=',time_start])
@@ -66,11 +69,11 @@ class ReportNurseFeeDetail(Model):
# group by date
all_vals={}
for record in records:
- #date=''
- #if record.date:
- #date=record.date[8:10]
date=record.date
personal=record.personal_id
+ if personal_type:
+ if personal_type!=personal.type:
+ continue
key=(date,personal.id)
if key not in all_vals.keys():
all_vals[key]={