Changeset 2913 for WAeUP_SRP


Ignore:
Timestamp:
10 Dec 2007, 21:50:04 (17 years ago)
Author:
Henrik Bettermann
Message:

calculate correct session_id and layout changes

Location:
WAeUP_SRP
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r2872 r2913  
    947947                break
    948948        if batch_doc is None:
    949             info['maintenance_fee'] = None
     949            info['maintenance_fee'] = ''
    950950        else:
    951951            info['maintenance_fee'] = batch_doc.cost
  • WAeUP_SRP/base/skins/waeup_student/accommodation_view.pt

    r2887 r2913  
    2626              layout_id='student_accommodation_fe')"
    2727              />
    28       <table>
    29         <tr>
    30           <td width="220px">Level:</td><td tal:content="info/level" />
    31         </tr>
    32       </table>
    3328    </span>
    3429  </metal:main>
  • WAeUP_SRP/fceokene/profiles/default/layouts/student_accommodation.xml

    r2857 r2913  
    3939 </widget>
    4040 <widget name="acco_maint_fee" meta_type="String Widget">
    41   <property name="title">Maintenance Payment Fee</property>
     41  <property name="title">Maintenance Fee</property>
    4242  <property name="fields">
    4343   <element value="acco_maint_fee"/>
    4444  </property>
    45   <property name="label">Maintenance Payment Fee</property>
    46   <property name="label_edit">Maintenance Payment Fee</property>
     45  <property name="label">Maintenance Fee</property>
     46  <property name="label_edit">Maintenance Fee</property>
    4747  <property name="readonly_layout_modes">
    4848   <element value="edit"/>
     
    5454 </widget>
    5555 <widget name="acco_maint_sc_pin" meta_type="Scratchcard Pin Widget">
    56   <property name="title">Access Code</property>
     56  <property name="title">Hostel Maintenance PIN</property>
    5757  <property name="fields">
    5858   <element value="acco_maint_sc_pin"/>
    5959  </property>
    60   <property name="label">Access Code</property>
    61   <property name="label_edit">Access Code</property>
     60  <property name="label">Hostel Maintenance PIN</property>
     61  <property name="label_edit">Hostel Maintenance PIN</property>
    6262  <property name="readonly_layout_modes">
    6363   <element value="edit"/>
     
    180180  <row>
    181181   <cell name="acco_maint_sc_pin"/>
    182   </row>
     182  </row>   
     183  <row>
     184   <cell name="acco_maint_pay_id"/>
     185  </row> 
    183186  <row>
    184187   <cell name="acco_maint_date"/>
    185188  </row>
     189
    186190 </table>
    187191</object>
  • WAeUP_SRP/fceokene/profiles/default/layouts/student_accommodation_fe.xml

    r2895 r2913  
    2121  </property>
    2222  <property name="view_format">%d/%m/%Y</property>
    23   <property name="time_setting">False</property> 
     23  <property name="time_setting">False</property>
    2424  <property name="hidden_readonly_layout_modes"/>
    2525 </widget>
     
    3838  <property name="prefix">HOM</property>
    3939 </widget>
     40 <widget name="acco_maint_fee" meta_type="String Widget">
     41  <property name="title">Maintenance Fee</property>
     42  <property name="fields">
     43   <element value="acco_maint_fee"/>
     44  </property>
     45  <property name="label">Maintenance Fee</property>
     46  <property name="label_edit">Maintenance Fee</property>
     47  <property name="readonly_layout_modes">
     48   <element value="edit"/>
     49  </property>
     50  <property name="hidden_layout_modes">
     51   <element value="create"/>
     52   <element value="edit"/>
     53  </property>
     54  <property name="hidden_readonly_layout_modes"/>
     55 </widget>
    4056 <widget name="acco_maint_pay_id" meta_type="String Widget">
    4157  <property name="title">Online Payment Id</property>
     
    131147   <cell name="acco_maint_date"/>
    132148  </row>
     149  <row>
     150   <cell name="acco_maint_fee"/>
     151  </row> 
    133152 </table>
    134153</object>
  • WAeUP_SRP/fceokene/waeup_custom/getAccommodationInfo.py

    r2902 r2913  
    5252review_state = info['review_state'] = s_brain.review_state
    5353
    54 info['session'] = current_session = context.getSessionId()[0]
     54
     55info['session'] = session = context.getSessionId()
    5556
    5657students_object = context.portal_url.getPortalObject().campus.students
     
    6061
    6162booking_allowed = False
    62 if review_state in ('school_fee_paid','courses_registered', 'courses_validated',) and s_brain.session == current_session:
     63if review_state in ('school_fee_paid','courses_registered', 'courses_validated',) and s_brain.session == session[0]:
    6364    booking_allowed = True
    6465
     
    7273    info['acco'] = None
    7374    return info
    74 acco_id = 'accommodation_' + str(current_session)
     75acco_id = 'accommodation_' + session[0]
    7576acco = getattr(student,acco_id,None)
    7677info['acco'] = acco
     
    9192    bt = 'pr'
    9293else:
    93     if s_brain.end_level and s_brain.end_level:
    94         certlevel = int(certificate.end_level)
    95     else:
    96         info["error"] = '"no level information provided","%s"' % c_brain.getId
    97         return info
    98     if s_brain.end_level >= s_brain.end_level:
    99         bt = "fi"
     94    res = context.portal_catalog(portal_type = "Certificate", id = s_brain.course)
     95    if res:
     96        c_brain = res[0]
     97        certificate = c_brain.getObject().getContent()
     98        try:
     99            certlevel = int(certificate.end_level)
     100        except:
     101            info["error"] = '"no end_level for","%s"' % c_brain.getId
     102            return info
     103        try:
     104            studentlevel = int(s_brain.level)
     105        except:
     106            info["error"] = '"no level for","%s"' % s_brain.getId
     107            return info
     108        if studentlevel >= certlevel:
     109            bt = "fi"
    100110d['sex'] = 'male'
    101111if s_brain.sex:
  • WAeUP_SRP/fceokene/waeup_custom/getSchoolFee.py

    r2836 r2913  
    4040next_info = context.getNextInfo(brain)
    4141next_session_str = next_info['next_session_str']
     42d['next_session_id'] = next_info['next_session_id']
    4243d['description'] = "School Fee for Session %s" % next_session_str
    4344
  • WAeUP_SRP/fceokene/waeup_custom/layout_student_acco_view_slip.pt

    r2857 r2913  
    88                              'acco_res_date',
    99                                 'acco_maint_pay_id',
     10                                 'acco_maint_fee',
    1011                                 'acco_maint_date',
    1112                                 )"
  • WAeUP_SRP/fceokene/waeup_custom/pay_interswitch.py

    r2891 r2913  
    6161info['type'] = 'online'
    6262info['status'] = 'started'
    63 info['session_id'] = student_record.session
     63info['session_id'] = fee_dict['next_session_id']
    6464info['item'] = student_record.course
    6565info['category'] = 'schoolfee'
Note: See TracChangeset for help on using the changeset viewer.