From 5387c9029e39ae312f598b396ba39ea58ae510bb Mon Sep 17 00:00:00 2001 From: "watcha.h@almacom.co.th" Date: Thu, 2 Apr 2015 13:39:34 +0700 Subject: [PATCH] change layout --- .../clinic_report_account_hd_case_summary.xml | 2 +- .../actions/clinic_report_account_shop.xml | 2 +- netforce_clinic/actions/clinic_report_claim.xml | 2 +- netforce_clinic/actions/clinic_report_shop.xml | 2 +- netforce_clinic/layouts/clinic_account_menu.xml | 4 ++-- netforce_clinic/layouts/clinic_menu.xml | 4 ++-- netforce_clinic/models/report_hd_case_summary.py | 10 +++++++++- .../templates/report_hd_case_summary.hbs | 6 +++--- netforce_clinic/templates/report_shop.hbs | 14 +++++++++----- 9 files changed, 29 insertions(+), 17 deletions(-) diff --git a/netforce_clinic/actions/clinic_report_account_hd_case_summary.xml b/netforce_clinic/actions/clinic_report_account_hd_case_summary.xml index 67fa412..875e713 100644 --- a/netforce_clinic/actions/clinic_report_account_hd_case_summary.xml +++ b/netforce_clinic/actions/clinic_report_account_hd_case_summary.xml @@ -1,5 +1,5 @@ - Report Claim Expense + HD Case Expense report clinic.report.account.hd.case.summary report_account_hd_case_summary diff --git a/netforce_clinic/actions/clinic_report_account_shop.xml b/netforce_clinic/actions/clinic_report_account_shop.xml index dd48fe1..0cb0268 100644 --- a/netforce_clinic/actions/clinic_report_account_shop.xml +++ b/netforce_clinic/actions/clinic_report_account_shop.xml @@ -1,5 +1,5 @@ - Report Shop + RD Shop Expense report clinic.report.shop report_shop diff --git a/netforce_clinic/actions/clinic_report_claim.xml b/netforce_clinic/actions/clinic_report_claim.xml index be5c742..2d01001 100644 --- a/netforce_clinic/actions/clinic_report_claim.xml +++ b/netforce_clinic/actions/clinic_report_claim.xml @@ -1,5 +1,5 @@ - Report Claim Expense + HD Case Expense report clinic.report.account.hd.case.summary report_account_hd_case_summary diff --git a/netforce_clinic/actions/clinic_report_shop.xml b/netforce_clinic/actions/clinic_report_shop.xml index f831b6a..883ffcb 100644 --- a/netforce_clinic/actions/clinic_report_shop.xml +++ b/netforce_clinic/actions/clinic_report_shop.xml @@ -1,5 +1,5 @@ - Report Shop + RD Shop Expense report clinic.report.shop report_shop diff --git a/netforce_clinic/layouts/clinic_account_menu.xml b/netforce_clinic/layouts/clinic_account_menu.xml index f6558c2..ed7f59e 100644 --- a/netforce_clinic/layouts/clinic_account_menu.xml +++ b/netforce_clinic/layouts/clinic_account_menu.xml @@ -7,8 +7,8 @@
- - + + diff --git a/netforce_clinic/layouts/clinic_menu.xml b/netforce_clinic/layouts/clinic_menu.xml index 3486a56..fa4e6cc 100644 --- a/netforce_clinic/layouts/clinic_menu.xml +++ b/netforce_clinic/layouts/clinic_menu.xml @@ -45,8 +45,8 @@ - - + + diff --git a/netforce_clinic/models/report_hd_case_summary.py b/netforce_clinic/models/report_hd_case_summary.py index 1e0bdeb..ff10fa3 100644 --- a/netforce_clinic/models/report_hd_case_summary.py +++ b/netforce_clinic/models/report_hd_case_summary.py @@ -60,6 +60,8 @@ class ReportHDCaseSummary(Model): crr_month=int(date[5:7]) weekday, crr_total_day=monthrange(year, crr_month) defaults=self.default_get(context=context) + date_from=defaults.get('date_from',date) + date_to=defaults.get('date_to',date) branch_id=defaults.get("branch_id",None) if branch_id: branch_id=branch_id[0] @@ -77,6 +79,8 @@ class ReportHDCaseSummary(Model): time_start='%s 00:00:00'%obj.date_from time_stop='%s 23:59:59'%obj.date_to year=int(date[0:4]) + date_from=obj.date_from + date_to=obj.date_to prev_year=year next_year=year @@ -262,9 +266,10 @@ class ReportHDCaseSummary(Model): line['unit']=unit lines.append(line) index+=1 - context['defaults']={ 'date': date, + 'date_from': date_from, + 'date_to': date_to, 'branch_id': branch_id, 'department_id': department_id, } @@ -278,9 +283,12 @@ class ReportHDCaseSummary(Model): elif branch_id: branch=get_model("clinic.branch").browse(branch_id) sub_name="(%s)" % branch.name or "" + print('>> ', context.get('defaults')) data={ 'branch_id': branch_id, 'department_id': department_id, + 'date_from': date_from, + 'date_to': date_to, 'date': date, 'month': month_str, 'year': year, diff --git a/netforce_clinic/templates/report_hd_case_summary.hbs b/netforce_clinic/templates/report_hd_case_summary.hbs index 91e8513..eb1b76e 100644 --- a/netforce_clinic/templates/report_hd_case_summary.hbs +++ b/netforce_clinic/templates/report_hd_case_summary.hbs @@ -42,14 +42,14 @@
- + รายชื่อผู้ป่วยรับใหม่
- + รายชื่อผู้ป่วยจำหน่าย
@@ -122,7 +122,7 @@
- รวมจำนวนยาที่ใช้ประจำเดือน + รวมจำนวนยาที่ใช้ประจำเดือน
diff --git a/netforce_clinic/templates/report_shop.hbs b/netforce_clinic/templates/report_shop.hbs index 2aab40e..2c6f28a 100644 --- a/netforce_clinic/templates/report_shop.hbs +++ b/netforce_clinic/templates/report_shop.hbs @@ -19,7 +19,9 @@ Lab Misc. Dlz + Picking# @@ -40,9 +42,11 @@ {{currency lab zero=""}} {{currency misc zero=""}} {{currency dlz zero=""}} + {{#if pick_id}} {{view "link" string=pick_ref action="pick_out" action_options="mode=form" active_id=pick_id}} @@ -59,11 +63,11 @@ - {{currency total_fee zero=""}} - {{currency total_mdc zero=""}} - {{currency total_lab zero=""}} - {{currency total_misc zero=""}} - {{currency total_dlz zero=""}} + {{currency total_fee}} + {{currency total_mdc}} + {{currency total_lab}} + {{currency total_misc}} + {{currency total_dlz}}