- Timestamp:
- 23 Dec 2006, 12:37:21 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_accommodation/getAccoFolderInfo.py
r913 r1138 38 38 bt_names = context.getBedTypeNames() 39 39 reserved = pa.uniqueValuesFor('student') 40 sum_total = 0 41 sum_free = 0 40 42 for bt in bed_types: 41 43 total = len(pa(bed_type=bt)) 44 sum_total += total 42 45 free = len(pa.searchResults({'bed_type': bt,'student':reserved})) 46 sum_free += free 43 47 bt_list.append({'name': bt_names[bt], 44 48 'total': total, 45 49 'reserved': free, 46 50 }) 51 bt_list.append({'name': "Total", 52 'total': sum_total, 53 'reserved': sum_free, 54 }) 47 55 info['bed_types'] = bt_list 48 56 reserved = pa.uniqueValuesFor('student')
Note: See TracChangeset for help on using the changeset viewer.