Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/batching.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/batching.py	(revision 7625)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/batching.py	(revision 7626)
@@ -561,5 +561,4 @@
         elif 'reg_number' in row.keys() and row['reg_number']:
             reg_number = row['reg_number']
-            #import pdb; pdb.set_trace()
             cat = queryUtility(ICatalog, name='students_catalog')
             results = list(
@@ -586,19 +585,24 @@
         if payments is None:
             return None
-        if row['p_id'].startswith('p'):
-            entry = payments.get(row['p_id'])
+        # We can use the hash symbol at the end of p_id in import files
+        # to avoid annoying automatic number transformation
+        # by Excel or Calc
+        p_id = row['p_id'].strip('#')
+        if p_id.startswith('p'):
+            entry = payments.get(p_id)
         else:
             # For data migration from old SRP
-            entry = payments.get('p' + row['p_id'][6:])
+            entry = payments.get('p' + p_id[6:])
         return entry
 
     def addEntry(self, obj, row, site):
         parent = self.getParent(row, site)
-        if not row['p_id'].startswith('p'):
+        p_id = row['p_id'].strip('#')
+        if not p_id.startswith('p'):
             # For data migration from old SRP
-            obj.p_id = 'p' + row['p_id'][6:]
+            obj.p_id = 'p' + p_id[6:]
             parent[obj.p_id] = obj
         else:
-            parent[row['p_id']] = obj
+            parent[p_id] = obj
         return
 
@@ -610,10 +614,11 @@
             row, self.factory_name)
         # We have to check p_id.
-        if row['p_id'].startswith('p'):
-            if not len(row['p_id']) == 14:
+        p_id = row['p_id'].strip('#')
+        if p_id.startswith('p'):
+            if not len(p_id) == 14:
                 errs.append(('p_id','invalid length'))
                 return errs, inv_errs, conv_dict
         else:
-            if not len(row['p_id']) == 19:
+            if not len(p_id) == 19:
                 errs.append(('p_id','invalid length'))
                 return errs, inv_errs, conv_dict
Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/tests/sample_payment_data.csv
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/tests/sample_payment_data.csv	(revision 7625)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/tests/sample_payment_data.csv	(revision 7626)
@@ -1,4 +1,4 @@
 p_state,p_category,r_pay_reference,r_desc,p_id,reg_number,session_id,r_amount_approved,p_item,amount_auth,r_card_num,r_code,creation_date,type,surcharge_1
-paid,schoolfee,GTB|WEB|FUT|26-11-2010|002295,Approved Successful,3816951290797973744,1,2010,19500,BTECHBDT,19500,0942,00,2010/11/26 19:59:33.744 GMT+1,online,0
+paid,schoolfee,GTB|WEB|FUT|26-11-2010|002295,Approved Successful,3816951290797973744#,1,2010,19500,BTECHBDT,19500,0942,00,2010/11/26 19:59:33.744 GMT+1,online,0
 unpaid,schoolfee,GTB|WEB|FUT|25-11-2010|,Transaction status unconfirmed,3816951290712593757,2,2010,0,BTECHBDT,19500,0942,Z0,2010/11/25 20:16:33.757 GMT+1,online,0
 paid,schoolfee,UBA|WEB|FUT|15-02-2010|000517,Approved Successful,p1266236341955,3,2009,19500,BTECHBDT,19500,0615,00,2010/02/15 13:19:01.955 GMT+1,online,0
Index: /main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py	(revision 7625)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py	(revision 7626)
@@ -361,5 +361,5 @@
             'Y': 'No previous verdict',
             'X': 'New 300 level student',
-            'Z': 'Successful student (provisional)'
+            'Z': 'Successful student (provisional)',
             'A1': 'First Class',
             'A2': 'Second Class Upper',
