Changeset 8941
- Timestamp:
- 8 Jul 2012, 08:58:45 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/tools/fix_import_file.py
r8939 r8941 100 100 'fst_sit_type': 'sittype', 101 101 'scd_sit_type': 'sittype', 102 'resp_pay_reference': 'no_int', 103 'type': 'company', 104 'date': 'date', 105 'p_category': 'p_category', 102 106 } 103 107 … … 110 114 'birthday': 'date_of_birth', 111 115 'clr_ac_pin': 'clr_code', 116 # clearance 117 'hq_grade': 'hq_degree', 118 'uniben': 'former_matric', 119 'hq_type2': 'hq2_type', 120 'hq_grade2': 'hq2_degree', 121 'hq_school2': 'hq2_school', 122 'hq_matric_no2': 'hq2_matric_no', 123 'hq_session2': 'hq2_session', 124 'hq_disc2': 'hq2_disc', 125 'emp': 'employer', 126 'emp2': 'employer2', 127 'emp_position2': 'emp2_position', 128 'emp_start2': 'emp2_start', 129 'emp_end2': 'emp2_end', 130 'emp_reason2': 'emp2_reason', 112 131 # study course 113 132 'study_course': 'certificate', … … 132 151 'surcharge': 'surcharge_1', 133 152 'session_id': 'p_session', 134 'hq_grade': 'hq_degree', 135 'uniben': 'former_matric', 136 'hq_type2': 'hq2_type', 137 'hq_grade2': 'hq2_degree', 138 'hq_school2': 'hq2_school', 139 'hq_matric_no2': 'hq2_matric_no', 140 'hq_session2': 'hq2_session', 141 'hq_disc2': 'hq2_disc', 142 'emp': 'employer', 143 'emp2': 'employer2', 144 'emp_position2': 'emp2_position', 145 'emp_start2': 'emp2_start', 146 'emp_end2': 'emp2_end', 147 'emp_reason2': 'emp2_reason', 153 'type': 'r_company', 148 154 } 149 155 … … 350 356 @classmethod 351 357 def no_int(self, value): 352 """ Add hash .358 """ Add hash and skip numbers starting with 999999 353 359 """ 354 360 # We add the hash symbol to avoid automatic number transformation 355 361 # in Excel and Calc for further processing 356 value += '#' 362 try: 363 intvalue = int(value) 364 value += '#' 365 except: 366 pass 367 if value.startswith('999999'): 368 return 357 369 return value 358 370 … … 403 415 404 416 @classmethod 417 def company(self, value): 418 if value == "online": 419 return "interswitch" 420 return value 421 422 @classmethod 423 def p_category(self, value): 424 if value == "acceptance": 425 return "clearance" 426 return value 427 428 @classmethod 405 429 def email(self, value): 406 430 return value.strip() … … 448 472 if row.get('reg_state') == 'student_created': 449 473 continue 474 if row.get('status') == 'started': 475 # We do not use started payments 476 continue 450 477 for key, value in row.items(): 451 478 if not key in OPTIONS.keys():
Note: See TracChangeset for help on using the changeset viewer.