Ignore:
Timestamp:
15 May 2012, 20:29:34 (13 years ago)
Author:
Henrik Bettermann
Message:

Applicants must not trigger the the approve transition which lead to wrong history message.

Distinguish between payment approval and regular payment in log files too.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py

    r8422 r8453  
    515515        """
    516516
     517    def doAfterStudentPaymentApproval():
     518        """Process student after payment was approved.
     519
     520        """
     521
    517522    def approveStudentPayment():
    518523        """Approve payment and process student.
  • main/waeup.kofa/trunk/src/waeup/kofa/students/payments.py

    r8428 r8453  
    8989        return True, msg, log
    9090
     91    def doAfterStudentPaymentApproval(self):
     92        """Process student after payment was approved.
     93        """
     94        student = self.getStudent()
     95        if self.p_category == 'clearance':
     96            # Create CLR access code
     97            pin, error = create_accesscode(
     98                'CLR',0,self.amount_auth,student.student_id)
     99            if error:
     100                return False, error, error
     101            self.ac = pin
     102        elif self.p_category == 'schoolfee':
     103            # Create SFE access code
     104            pin, error = create_accesscode(
     105                'SFE',0,self.amount_auth,student.student_id)
     106            if error:
     107                return False, error, error
     108            self.ac = pin
     109        elif self.p_category == 'bed_allocation':
     110            # Create HOS access code
     111            pin, error = create_accesscode(
     112                'HOS',0,self.amount_auth,student.student_id)
     113            if error:
     114                return False, error, error
     115            self.ac = pin
     116        log = 'payment approved: %s' % self.p_id
     117        msg = _('Payment approved')
     118        return True, msg, log
     119
    91120    def approveStudentPayment(self):
    92121        """Approve payment and process student.
Note: See TracChangeset for help on using the changeset viewer.