Index: /main/waeup.kofa/trunk/tools/fix_import_file.py
===================================================================
--- /main/waeup.kofa/trunk/tools/fix_import_file.py	(revision 8940)
+++ /main/waeup.kofa/trunk/tools/fix_import_file.py	(revision 8941)
@@ -100,4 +100,8 @@
     'fst_sit_type': 'sittype',
     'scd_sit_type': 'sittype',
+    'resp_pay_reference': 'no_int',
+    'type': 'company',
+    'date': 'date',
+    'p_category': 'p_category',
     }
 
@@ -110,4 +114,19 @@
     'birthday': 'date_of_birth',
     'clr_ac_pin': 'clr_code',
+    # clearance
+    'hq_grade': 'hq_degree',
+    'uniben': 'former_matric',
+    'hq_type2': 'hq2_type',
+    'hq_grade2': 'hq2_degree',
+    'hq_school2': 'hq2_school',
+    'hq_matric_no2': 'hq2_matric_no',
+    'hq_session2': 'hq2_session',
+    'hq_disc2': 'hq2_disc',
+    'emp': 'employer',
+    'emp2': 'employer2',
+    'emp_position2': 'emp2_position',
+    'emp_start2': 'emp2_start',
+    'emp_end2': 'emp2_end',
+    'emp_reason2': 'emp2_reason',
     # study course
     'study_course': 'certificate',
@@ -132,18 +151,5 @@
     'surcharge': 'surcharge_1',
     'session_id': 'p_session',
-    'hq_grade': 'hq_degree',
-    'uniben': 'former_matric',
-    'hq_type2': 'hq2_type',
-    'hq_grade2': 'hq2_degree',
-    'hq_school2': 'hq2_school',
-    'hq_matric_no2': 'hq2_matric_no',
-    'hq_session2': 'hq2_session',
-    'hq_disc2': 'hq2_disc',
-    'emp': 'employer',
-    'emp2': 'employer2',
-    'emp_position2': 'emp2_position',
-    'emp_start2': 'emp2_start',
-    'emp_end2': 'emp2_end',
-    'emp_reason2': 'emp2_reason',
+    'type': 'r_company',
     }
 
@@ -350,9 +356,15 @@
     @classmethod
     def no_int(self, value):
-        """ Add hash.
+        """ Add hash and skip numbers starting with 999999
         """
         # We add the hash symbol to avoid automatic number transformation
         # in Excel and Calc for further processing
-        value += '#'
+        try:
+            intvalue = int(value)
+            value += '#'
+        except:
+            pass
+        if value.startswith('999999'):
+            return
         return value
 
@@ -403,4 +415,16 @@
 
     @classmethod
+    def company(self, value):
+        if value == "online":
+            return "interswitch"
+        return value
+
+    @classmethod
+    def p_category(self, value):
+        if value == "acceptance":
+            return "clearance"
+        return value
+
+    @classmethod
     def email(self, value):
         return value.strip()
@@ -448,4 +472,7 @@
         if row.get('reg_state') == 'student_created':
             continue
+        if row.get('status') == 'started':
+            # We do not use started payments
+            continue
         for key, value in row.items():
             if not key in OPTIONS.keys():
