Ignore:
Timestamp:
26 Oct 2015, 17:36:32 (9 years ago)
Author:
Henrik Bettermann
Message:

Adjust bed coordinate system if there are more than 99 rooms per floor.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/hostel.py

    r13346 r13352  
    9393        all_beds = (beds_for_pre + beds_for_fresh +
    9494            beds_for_returning + beds_for_final + beds_for_all)
     95        floor_base = 100
     96        if self.rooms_per_floor > 99:
     97            floor_base = 1000
    9598        for block in all_blocks:
    9699            sex = 'male'
     
    100103                for room in range(1,int(self.rooms_per_floor)+1):
    101104                    for bed in all_beds:
    102                         room_nr = floor*100 + room
     105                        room_nr = floor*floor_base + room
    103106                        bt = 'all'
    104107                        if bed in beds_for_fresh:
Note: See TracChangeset for help on using the changeset viewer.