diff --git a/netforce_clinic/models/report_cycle_item.py b/netforce_clinic/models/report_cycle_item.py index a2793f3..7cb0cc1 100644 --- a/netforce_clinic/models/report_cycle_item.py +++ b/netforce_clinic/models/report_cycle_item.py @@ -111,6 +111,8 @@ class ReportCycleItem(Model): 'first_name': nurse.first_name or "", }) for hdcase in citem.hd_cases: + if hdcase.state not in ('paid', 'waiting_payment'): + continue patient=hdcase.patient_id vascular=patient.vascular_acc if vascular: @@ -124,9 +126,6 @@ class ReportCycleItem(Model): dpt=hdcase.department_id dlz_use=hdcase.dlz_use or 0 dlz_drop=False - #if dlz_use==hdcase.dlz_max: - #dlz_use="%sทิ้ง"%dlz_use - #dlz_drop=True for dlz_line in hdcase.dialyzers: dlz=dlz_line.dialyzer_id if dlz.state in ('drop','expire'): @@ -134,11 +133,6 @@ class ReportCycleItem(Model): dlz_drop=True cancel=False row_color='' - if hdcase.state not in ('paid', 'waiting_payment'): - continue - #if hdcase.state=='cancelled': - #cancel=True - #row_color='#b6b6b6' lines.append({ 'dlz_drop': dlz_drop, 'cancel': cancel, diff --git a/netforce_clinic/reports/report_cycle_item.xlsx b/netforce_clinic/reports/report_cycle_item.xlsx index dedff2d..9b6dd22 100644 Binary files a/netforce_clinic/reports/report_cycle_item.xlsx and b/netforce_clinic/reports/report_cycle_item.xlsx differ