Ignore:
Timestamp:
11 Jan 2010, 18:56:31 (15 years ago)
Author:
Henrik Bettermann
Message:

prepare foreign student payments (see #651)
change certificate catalogue base

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_epayment/getSchoolFeePrefix.py

    r3329 r4788  
    2626student_id = context.getStudentId()
    2727student_record = context.students_catalog(id=student_id)[0]
    28 res = context.portal_catalog(portal_type="Certificate",
    29                                      id = student_record.course)
    3028
     29# still to be configured properly (see ticket 651)
     30#if student_record.lga == 'foreigner':
     31#    if student_record.faculty in ('ART','LAW','SSC','MGS'):
     32#         prefix == 'FRNART'
     33#    elif student_record.faculty in ('MED'):
     34#         prefix == 'FRNSCI'
     35#    else:
     36#        logger.info('%s, foreign student faculty %s not found' % (student_id,student_record.faculty))
     37#        prefix = "--"       
     38#        return prefix 
     39#    if student_record.review_state == 'cleared_and_validated':
     40#        prefix = prefix + 'NEW'   
     41#    return prefix     
    3142
     43res = context.certificates_catalog(code = student_record.course)
    3244if not res:
    33     logger.info('%s, certificate %s not found' % (student_id,course))
     45    logger.info('%s, certificate %s not found' % (student_id,student_record.course))
    3446    prefix = "--"
    3547else:
    36     prefix = res[0].getObject().getContent().school_fee_code
     48    prefix = res[0].school_fee_code
    3749    if not prefix or prefix == 'none':
    38         prefix = res[0].getPath().split('/')[-4]
     50        prefix = res[0].faculty
    3951    if student_record.review_state == 'cleared_and_validated':
    4052        prefix = prefix + 'NEW'
Note: See TracChangeset for help on using the changeset viewer.