diff --git a/netforce_clinic/actions/clinic_hd_case_expense.xml b/netforce_clinic/actions/clinic_hd_case_expense.xml index f1cf931..bb3a0a3 100644 --- a/netforce_clinic/actions/clinic_hd_case_expense.xml +++ b/netforce_clinic/actions/clinic_hd_case_expense.xml @@ -3,6 +3,6 @@ multi_view clinic.hd.case.expense [["All",[]],["Draft",[["state","=","draft"]]],["Waiting Matching",[["state","=","waiting_matching"]]],["Match",[["state","=","match"]]],["Unmatch",[["state","=","unmatch"]]],["Approved",[["state","=","approved"]]]] - clinic_menu + account_menu 50 diff --git a/netforce_clinic/actions/clinic_report_nurse_fee_detail.xml b/netforce_clinic/actions/clinic_report_staff_fee_detail.xml similarity index 65% rename from netforce_clinic/actions/clinic_report_nurse_fee_detail.xml rename to netforce_clinic/actions/clinic_report_staff_fee_detail.xml index f61c684..98b2999 100644 --- a/netforce_clinic/actions/clinic_report_nurse_fee_detail.xml +++ b/netforce_clinic/actions/clinic_report_staff_fee_detail.xml @@ -1,8 +1,8 @@ - Report Nurse Fee Detail + Report Staff Fee Detail report - clinic.report.nurse.fee.detail - report_nurse_fee_detail - report_nurse_fee_detail + clinic.report.staff.fee.detail + report_staff_fee_detail + report_staff_fee_detail account_menu diff --git a/netforce_clinic/actions/clinic_report_nurse_fee_sum.xml b/netforce_clinic/actions/clinic_report_staff_fee_sum.xml similarity index 65% rename from netforce_clinic/actions/clinic_report_nurse_fee_sum.xml rename to netforce_clinic/actions/clinic_report_staff_fee_sum.xml index c3c44da..f113500 100644 --- a/netforce_clinic/actions/clinic_report_nurse_fee_sum.xml +++ b/netforce_clinic/actions/clinic_report_staff_fee_sum.xml @@ -1,8 +1,8 @@ - Report Nurse Fee Summary + Report Staff Fee Summary report - clinic.report.nurse.fee.sum - report_nurse_fee_sum - report_nurse_fee_sum + clinic.report.staff.fee.sum + report_staff_fee_sum + report_staff_fee_sum account_menu diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml index db283f2..e012c29 100644 --- a/netforce_clinic/layouts/clinic_menu.xml +++ b/netforce_clinic/layouts/clinic_menu.xml @@ -42,7 +42,6 @@ -
diff --git a/netforce_clinic/layouts/clinic_menu_inherit.xml b/netforce_clinic/layouts/clinic_menu_inherit.xml index 856bee3..4b3f76d 100644 --- a/netforce_clinic/layouts/clinic_menu_inherit.xml +++ b/netforce_clinic/layouts/clinic_menu_inherit.xml @@ -4,11 +4,12 @@ +
- - + + diff --git a/netforce_clinic/layouts/clinic_report_nurse_fee_detail.xml b/netforce_clinic/layouts/clinic_report_staff_fee_detail.xml similarity index 83% rename from netforce_clinic/layouts/clinic_report_nurse_fee_detail.xml rename to netforce_clinic/layouts/clinic_report_staff_fee_detail.xml index f55d7c8..674cbe3 100644 --- a/netforce_clinic/layouts/clinic_report_nurse_fee_detail.xml +++ b/netforce_clinic/layouts/clinic_report_staff_fee_detail.xml @@ -1,4 +1,4 @@ -
+ diff --git a/netforce_clinic/layouts/clinic_report_nurse_fee_sum.xml b/netforce_clinic/layouts/clinic_report_staff_fee_sum.xml similarity index 57% rename from netforce_clinic/layouts/clinic_report_nurse_fee_sum.xml rename to netforce_clinic/layouts/clinic_report_staff_fee_sum.xml index 9196150..65fdd90 100644 --- a/netforce_clinic/layouts/clinic_report_nurse_fee_sum.xml +++ b/netforce_clinic/layouts/clinic_report_staff_fee_sum.xml @@ -1,6 +1,7 @@ - + - + + diff --git a/netforce_clinic/models/__init__.py b/netforce_clinic/models/__init__.py index d50aff4..fa3466a 100644 --- a/netforce_clinic/models/__init__.py +++ b/netforce_clinic/models/__init__.py @@ -58,8 +58,8 @@ from . import report_hd_case_summary from . import report_medical_summary from . import report_recent_patient from . import report_discontinue_patient -from . import report_nurse_fee_sum -from . import report_nurse_fee_detail +from . import report_staff_fee_sum +from . import report_staff_fee_detail from . import branch from . import period from . import period_line diff --git a/netforce_clinic/models/report_nurse_fee_detail.py b/netforce_clinic/models/report_staff_fee_detail.py similarity index 95% rename from netforce_clinic/models/report_nurse_fee_detail.py rename to netforce_clinic/models/report_staff_fee_detail.py index 9b769c4..017a3d1 100644 --- a/netforce_clinic/models/report_nurse_fee_detail.py +++ b/netforce_clinic/models/report_staff_fee_detail.py @@ -6,9 +6,9 @@ from netforce.access import get_active_company from . import utils -class ReportNurseFeeDetail(Model): - _name="clinic.report.nurse.fee.detail" - _string="Report Nurse Fee Summary" +class ReportStaffFeeDetail(Model): + _name="clinic.report.staff.fee.detail" + _string="Report Staff Fee Summary" _transient=True _fields={ @@ -65,7 +65,7 @@ class ReportNurseFeeDetail(Model): staff=get_model("clinic.staff").browse(staff_id) staff_name=staff.name dom.append(['staff_id','=',staff.id]) - dlines=get_model('clinic.cycle.daily.line').search_browse(dom) + dlines=get_model('clinic.labor.cost.line').search_browse(dom) # group by date all_vals={} for dline in dlines: @@ -132,4 +132,4 @@ class ReportNurseFeeDetail(Model): data['date_to']="%s-%s-%s"%(year,month,total_day) return data -ReportNurseFeeDetail.register() +ReportStaffFeeDetail.register() diff --git a/netforce_clinic/models/report_nurse_fee_sum.py b/netforce_clinic/models/report_staff_fee_sum.py similarity index 81% rename from netforce_clinic/models/report_nurse_fee_sum.py rename to netforce_clinic/models/report_staff_fee_sum.py index ded5d2d..b1144a5 100644 --- a/netforce_clinic/models/report_nurse_fee_sum.py +++ b/netforce_clinic/models/report_staff_fee_sum.py @@ -8,16 +8,17 @@ from netforce.access import get_active_company from . import utils -class ReportNurseFeeSum(Model): - _name="clinic.report.nurse.fee.sum" - _string="Report Nurse Fee Summary" +class ReportStaffFeeSum(Model): + _name="clinic.report.staff.fee.sum" + _string="Report Staff Fee Summary" _transient=True _fields={ "date": fields.Date("Month"), "date_from": fields.Date("From", required=True), "date_to": fields.Date("To", required=True), - "nurse_id": fields.Many2One("clinic.staff","Nurse", domain=[['type','=','nurse']]), + "staff_id": fields.Many2One("clinic.staff","Staff"), + "type": fields.Selection([["doctor","Doctor"],["nurse","Nurse"],["staff","Staff"]],"Type"), } def _get_date_from(self,context={}): @@ -33,6 +34,7 @@ class ReportNurseFeeSum(Model): 'date': lambda *a: time.strftime("%Y-%m-%d"), 'date_from': _get_date_from, 'date_to': _get_date_to, + 'type': 'nurse', } def get_report_data(self,ids,context={}): @@ -48,10 +50,12 @@ class ReportNurseFeeSum(Model): year,month,day=defaults['date'].split("-") time_start='%s-%s-01'%(year,str(month).zfill(2)) time_stop='%s-%s-%s'%(year,str(month).zfill(2),total_day) - nurse_id=None + staff_id=None + staff_type="nurse" if ids: obj=self.browse(ids)[0] - nurse_id=obj.nurse_id.id + staff_type=obj.type + staff_id=obj.staff_id.id month=obj.date_from.split("-")[1] time_start=obj.date_from time_stop=obj.date_to @@ -74,16 +78,14 @@ class ReportNurseFeeSum(Model): total_all={} total_sum=0.0 dom=[] - dom.append(['type','=','nurse']) - for nurse in get_model("clinic.staff").search_browse(dom): - if nurse_id: - if nurse_id!=nurse.id: + dom.append(['type','=',staff_type]) + for staff in get_model("clinic.staff").search_browse(dom): + if staff_id: + if staff_id!=staff.id: continue - #level=nurse.level_id - #level_name=level and level.name or "" line={ - 'nurse_id': nurse.id, - 'nurse_name': '%s'%(nurse.name), + 'staff_id': staff.id, + 'staff_name': '%s'%(staff.name), 'sub_lines': [], } total_amt=0.0 @@ -92,16 +94,13 @@ class ReportNurseFeeSum(Model): total_all[date]=0.0 dom=[] dom.append(['date','=',date]) - dom.append(['staff_id','=',nurse.id]) + dom.append(['staff_id','=',staff.id]) amt=0 - results=get_model("clinic.cycle.daily.line").search_read(dom,['amount','cycle_daily_id']) - cycle_daily_id=None + results=get_model("clinic.labor.cost.line").search_read(dom,['amount']) if results: for result in results: amt+=result['amount'] or 0.0 - cycle_daily_id=result['cycle_daily_id'][0] line['sub_lines'].append({ - 'cycle_daily_id': cycle_daily_id, 'amt': amt, 'last': False, }) @@ -151,4 +150,4 @@ class ReportNurseFeeSum(Model): data['date_to']="%s-%s-%s"%(year,month,total_day) return data -ReportNurseFeeSum.register() +ReportStaffFeeSum.register() diff --git a/netforce_clinic/reports/report_nurse_fee_detail.xlsx b/netforce_clinic/reports/report_staff_fee_detail.xlsx similarity index 100% rename from netforce_clinic/reports/report_nurse_fee_detail.xlsx rename to netforce_clinic/reports/report_staff_fee_detail.xlsx diff --git a/netforce_clinic/reports/report_nurse_fee_sum.xlsx b/netforce_clinic/reports/report_staff_fee_sum.xlsx similarity index 100% rename from netforce_clinic/reports/report_nurse_fee_sum.xlsx rename to netforce_clinic/reports/report_staff_fee_sum.xlsx diff --git a/netforce_clinic/templates/old/report_hd_case_summary.hbs b/netforce_clinic/templates/old/report_hd_case_summary.hbs deleted file mode 100644 index 08e880f..0000000 --- a/netforce_clinic/templates/old/report_hd_case_summary.hbs +++ /dev/null @@ -1,93 +0,0 @@ -
-

- ใบสรุปการทำ Hemodialysis -

-

- {{parent_company_name}} {{company_name}}
-

-

- ประจำเดือน {{month}} {{year}} -

-
- - - - - - - - - - {{#each lines}} - - - - - {{#if link}} - - {{else}} - - {{/if}} - - - {{/each}} - -
{{topic}}{{month}}เท่ากับ{{amount}}{{amount}}{{unit}}
- - - - - - - - -
- - - - - - {{#each new_patient_lines}} - - - - {{/each}} - - - -

รายชื่อผู้ป่วยรับใหม่

{{no}}. {{name}} {{note}}
-
- - - - - - - - - - - - - - - - - -

รวมจำนวนยาที่ใช้ประจำเดือน

ปกส.ucซื้อรวม
-
- - - - - - {{#each resign_patient_lines}} - - - - {{/each}} - - - -

รายชื่อผู้ป่วยจำหน่าย

{{no}}. {{name}} {{note}}
-
diff --git a/netforce_clinic/templates/report_nurse_fee_detail.hbs b/netforce_clinic/templates/report_staff_fee_detail.hbs similarity index 100% rename from netforce_clinic/templates/report_nurse_fee_detail.hbs rename to netforce_clinic/templates/report_staff_fee_detail.hbs diff --git a/netforce_clinic/templates/report_nurse_fee_sum.hbs b/netforce_clinic/templates/report_staff_fee_sum.hbs similarity index 98% rename from netforce_clinic/templates/report_nurse_fee_sum.hbs rename to netforce_clinic/templates/report_staff_fee_sum.hbs index 8dd07c4..436a7e5 100644 --- a/netforce_clinic/templates/report_nurse_fee_sum.hbs +++ b/netforce_clinic/templates/report_staff_fee_sum.hbs @@ -23,7 +23,7 @@ {{#each lines}} - {{nurse_name}} + {{staff_name}} {{#each sub_lines}} {{#if last}} {{amt}}