Changeset 7069 for WAeUP_SRP


Ignore:
Timestamp:
11 Nov 2011, 06:12:45 (13 years ago)
Author:
Henrik Bettermann
Message:

Enable payment approval by officers also for acceptance fee payments.

Location:
WAeUP_SRP/trunk/skins
Files:
2 edited

Legend:

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

    r5594 r7069  
    6363        wftool.doActionFor(student,next_transition)
    6464
     65elif doc.category == 'acceptance':
     66    if context.getStudentReviewState() in ('admitted', 'objection_raised'):
     67        logger.info('%s paid acceptance fee' % (student_id))
     68        current = DateTime.DateTime()
     69        wf = context.portal_workflow
     70        info = context.getClearanceInfo()
     71        wftool.doActionFor(student,'enter_clearance_pin')
     72        context.waeup_tool.changeWorkflowState(info['clear'], 'opened')
     73        context.waeup_tool.changeWorkflowState(info['app'], 'closed')
     74        dc = {}
     75        app_doc = info['app_doc']
     76        #dc['clr_ac_pin'] = pay_doc.order_id
     77        dc['clr_ac_date'] = current
     78        dc['entry_date'] = current
     79        info['clear_doc'].edit(mapping = dc)
     80        if info['penalty']:
     81            logger.info('%s started late clearance' % (info['id']))
     82
    6583logger.info('%s approves epayment for %s' % (member,student_id))
    6684review_state = wftool.getInfoFor(context,'review_state',None)
  • WAeUP_SRP/trunk/skins/waeup_futminna/getPaymentsFolderInfo.py

    r6982 r7069  
    108108    url = row['url'] = "%s/p%s" % (payments_path,oid[start_pos:])
    109109    row['is_requeryable'] = "%s_%s" % (payment.category,payment.session_id) not in paid_fees and payment.type == 'online' or str(member) in ('admin',)
    110     row['is_approvable'] = is_so and row['is_requeryable'] and payment.category == 'schoolfee' # does not make sense for maitenance
     110
     111    if review_state == 'objection_raised' and payment.category == 'acceptance':
     112        row['is_requeryable'] = True
     113
     114    row['is_approvable'] = is_so and row['is_requeryable'] and \
     115        payment.category in ('schoolfee', 'acceptance')
    111116    if payment.resp_desc:
    112117        row['resp_desc'] = payment.resp_desc
Note: See TracChangeset for help on using the changeset viewer.