prevent to show all level after click compute on cycle item

conv_bal
watcha.h 2014-11-26 22:15:06 +07:00
parent 304d54ccc6
commit 3633b10d77
1 changed files with 3 additions and 2 deletions

View File

@ -268,9 +268,7 @@ class CycleItem(Model):
'op': line.op or "", 'op': line.op or "",
'formular': line.formular or "", 'formular': line.formular or "",
} }
lines=[] lines=[]
print("="*20)
total_a,total_b=0,0 total_a,total_b=0,0
for level_id, value in levels.items(): for level_id, value in levels.items():
qty=value['total'] qty=value['total']
@ -293,6 +291,9 @@ class CycleItem(Model):
b=(qty*var_b)*sign b=(qty*var_b)*sign
b_str=(str(b) if b else "") b_str=(str(b) if b else "")
total_b+=b total_b+=b
else:
# XXX prevent to show all level if not configuration from setting
continue
fml=''.join([a_str, op_str, b_str]) fml=''.join([a_str, op_str, b_str])
lines.append(('create',{ lines.append(('create',{