iro/controller/viewinterface.py
changeset 309 7fa1d4713a4f
parent 295 dc3cc61c7f6f
child 311 81916344c63b
equal deleted inserted replaced
308:a891fdd0c1a9 309:7fa1d4713a4f
   190         user=session.merge(user)
   190         user=session.merge(user)
   191         for route in user.rights:
   191         for route in user.rights:
   192             n=route.offer_name
   192             n=route.offer_name
   193             ret[n]={'price':0, 'anz':0, 'info':{}}
   193             ret[n]={'price':0, 'anz':0, 'info':{}}
   194             for bill in route.bill:
   194             for bill in route.bill:
   195                 ret[n]['info'][bill.info]={'price':float(bill.price),'anz':bill.anz}
   195                 ret[n][bill.info]={'price':float(bill.price),'anz':bill.anz}
   196                 ret[n]['price'] += bill.price
   196                 ret[n]['price'] += bill.price
   197                 ret[n]['anz'] += bill.anz
   197                 ret[n]['anz'] += bill.anz
   198             ret['total']['price'] += ret[n]['price'] 
   198             ret['total']['price'] += ret[n]['price'] 
   199             ret['total']['anz'] += ret[n]['anz'] 
   199             ret['total']['anz'] += ret[n]['anz'] 
   200             ret[n]['price'] = float(ret[n]['price'])
   200             ret[n]['price'] = float(ret[n]['price'])