From 900ed5f68359649b89e18403da90cb796b3f59e0 Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Wed, 27 May 2015 17:03:31 +0700 Subject: [PATCH] clean --- .../models/report_hd_case_summary.py | 18 ++++++++++++------ .../reports/report_hd_case_summary.xlsx | Bin 5976 -> 5973 bytes 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/netforce_clinic/models/report_hd_case_summary.py b/netforce_clinic/models/report_hd_case_summary.py index ddb8dfe..0bc4396 100644 --- a/netforce_clinic/models/report_hd_case_summary.py +++ b/netforce_clinic/models/report_hd_case_summary.py @@ -105,6 +105,12 @@ class ReportHDCaseSummary(Model): dom=dom.replace("True","true") return dom.replace("'","\"") + def rzero(n): + if not n: + return '' + n="{0:,.0f}".format(n) + return n + def set_default(dom=[],topic='topic1'): dom_txt='' for f,op,v in dom: @@ -154,7 +160,7 @@ class ReportHDCaseSummary(Model): qty=get_model("clinic.report.hd.case.detail").get_report_data(ids=[],context=ctx)['total'] item_vals={ 'month': month_str, - 'qty': "{0:,.0f}".format(qty), + 'qty': rzero(qty), 'link': 'clinic_report_cycle_item&%s'%dom_txt, } if hdcase_type!='completed': @@ -169,7 +175,7 @@ class ReportHDCaseSummary(Model): qty=get_model("clinic.report.hd.case.detail").get_report_data(ids=[],context=ctx)['total'] items[topic]={ 'month': prev_month_str, - 'qty': "{0:,.0f}".format(qty), + 'qty': rzero(qty), 'link': 'clinic_report_hd_case_detail&%s'%dom_txt, } @@ -180,7 +186,7 @@ class ReportHDCaseSummary(Model): qty=get_model("clinic.report.hd.case.detail").get_report_data(ids=[],context=ctx)['total'] items[topic]={ 'month': month_str, - 'qty': "{0:,.0f}".format(qty), + 'qty': rzero(qty), 'action': 'clinic_patient', 'link': 'clinic_report_hd_case_detail&%s'%dom_txt, } @@ -192,7 +198,7 @@ class ReportHDCaseSummary(Model): resign_qty=get_model("clinic.report.hd.case.detail").get_report_data(ids=[],context=ctx)['total'] items[topic]={ 'month': month_str, - 'qty': "{0:,.0f}".format(resign_qty), + 'qty': rzero(resign_qty), 'action': 'clinic_patient', 'link': 'clinic_report_hd_case_detail&%s'%dom_txt, } @@ -203,7 +209,7 @@ class ReportHDCaseSummary(Model): total_qty=get_model("clinic.report.hd.case.detail").get_report_data(ids=[],context=ctx)['total'] items[topic]={ 'month': next_month_str, - 'qty': "{0:,.0f}".format(total_qty), + 'qty': rzero(total_qty), 'action': 'clinic_patient', 'link': 'clinic_report_hd_case_detail&%s'%dom_txt, } @@ -224,7 +230,7 @@ class ReportHDCaseSummary(Model): qty=get_model("clinic.report.hd.case.detail").get_report_data(ids=[],context=ctx)['total'] items[topic]={ 'month': '', - 'qty': "{0:,.0f}".format(qty), + 'qty': rzero(qty), 'action': 'clinic_patient', 'link': 'clinic_report_hd_case_detail&%s'%dom_txt, } diff --git a/netforce_clinic/reports/report_hd_case_summary.xlsx b/netforce_clinic/reports/report_hd_case_summary.xlsx index ff24b7a2fb3b2aeeee5794640dc3e0d597b9b367..2ef2990259183bc39a8faa064f4bc88a1e073090 100644 GIT binary patch delta 3468 zcmY*cc|6oz`yOM2vF|%$HzB(a%90q^5$XLQylI>xLW@Ig7EMpn6 zC&?C)CF?_k_tE=%e{b*k=X~z-xvz7bKknFJr@P| ziYY;yg8OVwy9|~ArhTz$%s^{v)LfxSpepOkt98_X{b%GS=bT*)--jI}Rr4e%Qou;- ziCAQ$%=g-XJ>4BMz-+4U<@TIE_$WyKJNAnw~`Wq}IE|w%{N&0VZ6}h&THV2SnNirOI{;eF`37 z5iy(pk(CQ1j=!lZr6r#xN;EmG*yyXy2|MC6lU=|C-()T`+x0E1CszkwS6zEsYPI&w zwMR=+%yA3CPN-f;XJ4KKzg4e^aSBX1qR!Fe2{ti#R28ArA3Z5}5cjqAob`d%HCDWf zScPy7ZM2J+Q4F>z;Ohx;*P+b1|mG^B|PUmyU^7z@=z`k)uPXT*xyQIWZoV z?b1B#fm7zAoan4u6VbLjUClU@1?3hEk19nKm-zMfw-E>@4Y3Ovk;86i(`B zi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