From 3633b10d77a0bf82f5959db98630bbb1d7fe6beb Mon Sep 17 00:00:00 2001 From: "watcha.h" Date: Wed, 26 Nov 2014 22:15:06 +0700 Subject: [PATCH] prevent to show all level after click compute on cycle item --- netforce_clinic/models/cycle_item.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/netforce_clinic/models/cycle_item.py b/netforce_clinic/models/cycle_item.py index 9abaa74..2710ee3 100644 --- a/netforce_clinic/models/cycle_item.py +++ b/netforce_clinic/models/cycle_item.py @@ -268,9 +268,7 @@ class CycleItem(Model): 'op': line.op or "", 'formular': line.formular or "", } - lines=[] - print("="*20) total_a,total_b=0,0 for level_id, value in levels.items(): qty=value['total'] @@ -293,6 +291,9 @@ class CycleItem(Model): b=(qty*var_b)*sign b_str=(str(b) if b else "") total_b+=b + else: + # XXX prevent to show all level if not configuration from setting + continue fml=''.join([a_str, op_str, b_str]) lines.append(('create',{