Ignore:
Timestamp:
30 Sep 2012, 13:05:04 (12 years ago)
Author:
Henrik Bettermann
Message:

Export payments with student_state to sort out if payments do not correspond with states set manually by officers.

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

Legend:

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

    r9253 r9258  
    248248    fields = tuple(
    249249        sorted(iface_names(
    250             IStudentOnlinePayment, exclude_attribs=False))) + ('student_id',)
     250            IStudentOnlinePayment, exclude_attribs=False))) + (
     251                'student_id','student_state')
    251252
    252253    #: The title under which this exporter will be displayed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/payments.py

    r9148 r9258  
    6363        try:
    6464            return self.__parent__.__parent__
     65        except AttributeError:
     66            return None
     67
     68    @property
     69    def student_state(self):
     70        try:
     71            return self.student.state
    6572        except AttributeError:
    6673            return None
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py

    r9253 r9258  
    377377            'ac,amount_auth,creation_date,p_category,p_current,p_id,'
    378378            'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
    379             'r_code,r_desc,student_id\r\n'
    380 
    381             ',0.0,2012-04-01 13:12:01,schoolfee,1,,,,,unpaid,,0.0,,,\r\n'
     379            'r_code,r_desc,student_id,student_state\r\n'
     380
     381            ',0.0,2012-04-01 13:12:01,schoolfee,1,,,,,unpaid,,0.0,,,,\r\n'
    382382            )
    383383        return
     
    395395            'ac,amount_auth,creation_date,p_category,p_current,p_id,'
    396396            'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
    397             'r_code,r_desc,student_id\r\n'
     397            'r_code,r_desc,student_id,student_state\r\n'
    398398
    399399            '666,0.0,2012-04-01 13:12:01,schoolfee,1,my-id,'
    400400            'p-item,100,2012,unpaid,2012-04-01 14:12:01,12.12,'
    401             'r-code,,A111111\r\n'
     401            'r-code,,A111111,created\r\n'
    402402            )
    403403        return
     
    414414            'ac,amount_auth,creation_date,p_category,p_current,p_id,'
    415415            'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
    416             'r_code,r_desc,student_id\r\n'
     416            'r_code,r_desc,student_id,student_state\r\n'
    417417
    418418            '666,0.0,2012-04-01 13:12:01,schoolfee,1,my-id,'
    419419            'p-item,100,2012,unpaid,2012-04-01 14:12:01,12.12,'
    420             'r-code,,A111111\r\n'
     420            'r-code,,A111111,created\r\n'
    421421            )
    422422        return
     
    433433            'ac,amount_auth,creation_date,p_category,p_current,p_id,'
    434434            'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,'
    435             'r_code,r_desc,student_id\r\n'
     435            'r_code,r_desc,student_id,student_state\r\n'
    436436
    437437            '666,0.0,2012-04-01 13:12:01,schoolfee,1,my-id,'
    438438            'p-item,100,2012,unpaid,2012-04-01 14:12:01,12.12,'
    439             'r-code,,A111111\r\n'
    440             )
    441         return
     439            'r-code,,A111111,created\r\n'
     440            )
     441        return
Note: See TracChangeset for help on using the changeset viewer.