From 0a04faccf639fe505edf42d2a930ebe93dd6b1a4 Mon Sep 17 00:00:00 2001 From: "chayut.s" Date: Mon, 27 Oct 2014 10:30:35 +0700 Subject: [PATCH] clean --- .../actions/clinic_report_hd_madical.xml | 8 - .../layouts/clinic_report_hd_madical.xml | 3 - netforce_clinic/models/report_hd_madical.py | 177 ------------------ .../reports/report_hd_madical.xlsx | Bin 7156 -> 0 bytes .../templates/report_hd_madical.hbs | 29 --- 5 files changed, 217 deletions(-) delete mode 100644 netforce_clinic/actions/clinic_report_hd_madical.xml delete mode 100644 netforce_clinic/layouts/clinic_report_hd_madical.xml delete mode 100644 netforce_clinic/models/report_hd_madical.py delete mode 100644 netforce_clinic/reports/report_hd_madical.xlsx delete mode 100644 netforce_clinic/templates/report_hd_madical.hbs diff --git a/netforce_clinic/actions/clinic_report_hd_madical.xml b/netforce_clinic/actions/clinic_report_hd_madical.xml deleted file mode 100644 index 4101bef..0000000 --- a/netforce_clinic/actions/clinic_report_hd_madical.xml +++ /dev/null @@ -1,8 +0,0 @@ - - Medical Report Summary - report - clinic.report.hd.madical - report_hd_madical - report_hd_madical - clinic_menu - diff --git a/netforce_clinic/layouts/clinic_report_hd_madical.xml b/netforce_clinic/layouts/clinic_report_hd_madical.xml deleted file mode 100644 index fcd40ac..0000000 --- a/netforce_clinic/layouts/clinic_report_hd_madical.xml +++ /dev/null @@ -1,3 +0,0 @@ -
- - diff --git a/netforce_clinic/models/report_hd_madical.py b/netforce_clinic/models/report_hd_madical.py deleted file mode 100644 index d75d294..0000000 --- a/netforce_clinic/models/report_hd_madical.py +++ /dev/null @@ -1,177 +0,0 @@ -import time - -from datetime import datetime -from calendar import monthrange -from netforce.model import Model,fields,get_model - -class ReportHDMadical(Model): - _name="clinic.report.hd.madical" - _string="Hemodialysis Report Madical Summary" - _transient=True - - _fields={ - "date": fields.Date("Month", required=True), - } - - _defaults={ - 'date': lambda *a: time.strftime("%Y-%m-%d"), - } - - def get_report_data(self,ids,context={}): - - for item in get_model("company").search_browse([]): - company_name=item.name - - date=datetime.now().strftime("%Y-%m-%d") - #datemonth=datetime.now().strftime("%m") - if ids: - obj=self.browse(ids)[0] - date=obj.date - year=int(date[0:4]) - month=int(date[5:7]) - month_str=datetime.strptime(date,'%Y-%m-%d').strftime("%B") - - next_month = str(month + 1) - if next_month == 13: - next_month = 12 - #next_month_str=datetime.strptime(next_month,'%m').strftime("%B") - previous_month = str(month - 1) - if previous_month == 0: - previous_month = 12 - #previous_month_str=datetime.strptime(previous_month,'%m').strftime("%B") - - #madical=get_model("clinic.hd.case.gm.line").search_browse() - #patients_mg=get_model("clinic.patient").search_browse(['type','=','mg']) - - weekday, total_day=monthrange(year, month) - time_start='2014-%s-01 00:00:00'%(month) - time_stop='2014-%s-%s 23:59:59'%(month,total_day) - - dom=[] - dom.append(['state','=','completed']) - dom.append(['time_start','>=',time_start]) - dom.append(['time_stop','<=',time_stop]) - - for product in get_model("clinic.hd.case.gm.line").search_browse([]): - product_id=product.product_id - print(product_id) - if product_id: - product_name=product.description or "" - product_id=product.product_id or "" - - lines=[ - { - 'product_id' : 'MD-XXXX', - 'madical' : product_name, - 'sc': '437', - 'uc': '', - 'buy' : '4', - 'total' : '441', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'H2', - 'sc': '', - 'uc': '', - 'buy' : '', - 'total' : '', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epr4', - 'sc': '216', - 'uc': '', - 'buy' : '', - 'total' : '216', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epr2', - 'sc': '', - 'uc': '', - 'buy' : '', - 'total' : '', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epk4', - 'sc': '70', - 'uc': '', - 'buy' : '', - 'total' : '70', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epk2', - 'sc': '', - 'uc': '', - 'buy' : '', - 'total' : '', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epg4', - 'sc': '98', - 'uc': '', - 'buy' : '', - 'total' : '98', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epg2', - 'sc': '', - 'uc': '', - 'buy' : '', - 'total' : '', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Rng4', - 'sc': '34', - 'uc': '', - 'buy' : '9', - 'total' : '43', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Rng2', - 'sc': '', - 'uc': '', - 'buy' : '', - 'total' : '', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epi4', - 'sc': '264', - 'uc': '', - 'buy' : '9', - 'total' : '43', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Epi2', - 'sc': '', - 'uc': '', - 'buy' : '', - 'total' : '', - }, - { - 'product_id' : 'MD-XXXX', - 'madical' : 'Vnf', - 'sc': '', - 'uc': '', - 'buy' : '', - 'total' : '', - }, - ] - - data={ - 'month': month_str, - 'year': year, - 'lines': lines, - 'company_name': company_name, - } - return data - -ReportHDMadical.register() diff --git a/netforce_clinic/reports/report_hd_madical.xlsx b/netforce_clinic/reports/report_hd_madical.xlsx deleted file mode 100644 index 65c30fd0c562c10b8976a3c068892cca2ee73bb1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7156 zcmdT}XIPV4whjo=lu$x1k*1*-Ksr)X1O=o71f@$8kluSQ;V4Z&I#NPM!~`kQtAI4= zAT?C!C3FZ}ICIa)Ju`Fe%+Fb0o+LZjdw*H)DtXu1s)|?eKmbBQLI5G9hAiNcket6a za4@xU*vA17B=c%DcA|IWzw`U-sc78TN zq`VKNOGGAVg5u@w>y$^Y|3c5X!5 z;Gh`zMs#6~&-KM;USu1875!+IMjQ=i`3`4E^~GH!I%1 zVdHA+U}Y_^yR)V5#KxTjU9h!$fPs?iXVZaK6H3zBda;50#$z zKpAw1O;^9id>_WtKHgmx3||gymbrGdAQLaRp~Z!;#vi-BhNjc(%AA}w=ZO3SrYNkY z9Py)(=hZI3h-yKN8l&#&Wwk3P=MT462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6=%E#10xsLLzEJlaCGJmM({kAE2@2cP$ zcPssBTVmzYTXqlBu9L}=8b*(_8e$zRglLNm?#6*YWU+Le2h?e&p3CXlED5cl5~kvg z*A1$HKU;0^%x?P|_j0c6?XuWti+WzU+F#eklY#)U(>dN@^w6Z|bAO>&Zw@rEjI@*R z+Fy=2x@G_L8yb;Nd*uT0t@NBg{&TdS;a&JL4lW4r>wxC+3B|<$&Ht54$2EUmc)5Xp zae(nl=+1BTua7hSywBwl>7w2LO9am8;Q2oPwE6$%T`m^|7v -

- Summary of the Madical -

-

- [{{company_name}}]
- As at {{month}} {{year}} -

- - - - - - - - - - - {{#each lines}} - - - - - - - - {{/each}} - -
MadicalSocial SecurityucBuyTotal
{{madical}}{{sc}}{{uc}}{{buy}}{{total}}