From e0533c20b2fc5e6e8f7fa66027ab5017241b63e3 Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Wed, 10 Dec 2014 00:39:51 +0700 Subject: [PATCH] hd case --- .../layouts/clinic_report_payment_matching.xml | 8 +++++--- netforce_clinic/models/hd_case.py | 6 +----- netforce_clinic/models/report_payment_matching.py | 3 +++ netforce_clinic/templates/report_payment_matching.hbs | 3 --- netforce_clinic/templates/report_staff_fee_detail.hbs | 4 ++-- netforce_clinic/todo.txt | 5 +++-- 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/netforce_clinic/layouts/clinic_report_payment_matching.xml b/netforce_clinic/layouts/clinic_report_payment_matching.xml index 0e34173..cc90bb2 100644 --- a/netforce_clinic/layouts/clinic_report_payment_matching.xml +++ b/netforce_clinic/layouts/clinic_report_payment_matching.xml @@ -1,5 +1,7 @@
- - - + + + + + diff --git a/netforce_clinic/models/hd_case.py b/netforce_clinic/models/hd_case.py index 99c4e4a..03c0987 100644 --- a/netforce_clinic/models/hd_case.py +++ b/netforce_clinic/models/hd_case.py @@ -949,14 +949,10 @@ class HDCase(Model): def write(self,ids,vals,**kw): patient_id=vals.get('patient_id') - # XXX importing problem - # when change patient - #vals=self.get_staff_fee(vals,patient_id) vals=self.get_invoice_policy(vals,patient_id) - # if not other expense request fee obj=self.browse(ids)[0] if not obj.amount: - vals['req_fee']=1 + vals['req_fee']=1 # to show button pay super().write(ids,vals,**kw) def approve(self,ids,context={}): diff --git a/netforce_clinic/models/report_payment_matching.py b/netforce_clinic/models/report_payment_matching.py index f976022..4de0a6a 100644 --- a/netforce_clinic/models/report_payment_matching.py +++ b/netforce_clinic/models/report_payment_matching.py @@ -14,6 +14,8 @@ class ReportPaymentMatching(Model): "date": fields.Date("Month", required=True), "date_from": fields.Date("From", required=True), "date_to": fields.Date("To", required=True), + 'state': fields.Selection([['draft','Draft'],['waiting_matching','Waiting Matching'],['match','Match'],['unmatch','Unmatch'],['approved','Approved']],'State'), + 'patient_id': fields.Many2One("clinic.patient","Patient"), } def _get_date_from(self,context={}): @@ -29,6 +31,7 @@ class ReportPaymentMatching(Model): 'date': lambda *a: time.strftime("%Y-%m-%d"), 'date_from': _get_date_from, 'date_to': _get_date_to, + 'state': 'match', } def get_report_data(self,ids,context={}): diff --git a/netforce_clinic/templates/report_payment_matching.hbs b/netforce_clinic/templates/report_payment_matching.hbs index 4930df6..6271ac1 100644 --- a/netforce_clinic/templates/report_payment_matching.hbs +++ b/netforce_clinic/templates/report_payment_matching.hbs @@ -1,8 +1,5 @@

Payment Matching

-

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

{{#if is_duration}} ระหว่างวันที่ {{from}} ถึง {{to}} diff --git a/netforce_clinic/templates/report_staff_fee_detail.hbs b/netforce_clinic/templates/report_staff_fee_detail.hbs index 5769a2b..d5bfdfb 100644 --- a/netforce_clinic/templates/report_staff_fee_detail.hbs +++ b/netforce_clinic/templates/report_staff_fee_detail.hbs @@ -43,8 +43,8 @@ {{/unless}} - รวม - {{total_qty}} + + รวม {{currency total_amount}} diff --git a/netforce_clinic/todo.txt b/netforce_clinic/todo.txt index 55b5e11..c1293cf 100644 --- a/netforce_clinic/todo.txt +++ b/netforce_clinic/todo.txt @@ -1,8 +1,9 @@ ============ - urgent + urgent still missing - report Matching Payment - - special cost + - special case -> how - labor cost in period + - computation of labor cost in period ============ -- tonight -