Index: main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py	(revision 12981)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py	(revision 12996)
@@ -781,5 +781,5 @@
             return None
         p_id = row.get('p_id', None)
-        if p_id is None:
+        if p_id in (None, IGNORE_MARKER):
             return None
         # We can use the hash symbol at the end of p_id in import files
@@ -846,25 +846,28 @@
         # We have to check p_id.
         p_id = row.get('p_id', None)
-        if not p_id:
+        if mode == 'create' and p_id in (None, IGNORE_MARKER):
             timestamp = ("%d" % int(time()*10000))[1:]
             p_id = "p%s" % timestamp
             conv_dict['p_id'] = p_id
             return errs, inv_errs, conv_dict
+        elif p_id in (None, IGNORE_MARKER):
+            errs.append(('p_id','missing'))
+            return errs, inv_errs, conv_dict
         else:
             p_id = 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
-        elif len(p_id.split('-')) == 3:
-            # The SRP used either pins as keys ...
-            if len(p_id.split('-')[2]) not in (9, 10):
-                errs.append(('p_id','invalid pin'))
-                return errs, inv_errs, conv_dict
-        else:
-            # ... or order_ids.
-            if not len(p_id) == 19:
-                errs.append(('p_id','invalid format'))
-                return errs, inv_errs, conv_dict
+            if p_id.startswith('p'):
+                if not len(p_id) == 14:
+                    errs.append(('p_id','invalid length'))
+                    return errs, inv_errs, conv_dict
+            elif len(p_id.split('-')) == 3:
+                # The SRP used either pins as keys ...
+                if len(p_id.split('-')[2]) not in (9, 10):
+                    errs.append(('p_id','invalid pin'))
+                    return errs, inv_errs, conv_dict
+            else:
+                # ... or order_ids.
+                if not len(p_id) == 19:
+                    errs.append(('p_id','invalid format'))
+                    return errs, inv_errs, conv_dict
         # Requirement added on 24/01/2015: p_id must be portal-wide unique.
         if mode == 'create':
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_payment_data.csv
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_payment_data.csv	(revision 12981)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/sample_payment_data.csv	(revision 12996)
@@ -4,2 +4,3 @@
 ,paid,schoolfee,p1266236341955,3,2009,19500,BTECHBDT,19500,0615,00,2010/02/15 13:19:01#,online,1
 ,paid,schoolfee,ABC-11-1234567890,3,2011,19500,BTECHBDT,19500.6,,SC,2010/02/15 13:19:01#,sc,1
+,paid,schoolfee,<IGNORE>,3,2012,20500,BTECHBDT,20500,0615,00,2020/02/15 13:19:01#,online,1
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py	(revision 12981)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py	(revision 12996)
@@ -1064,4 +1064,11 @@
     def test_checkConversion(self):
         errs, inv_errs, conv_dict = self.processor.checkConversion(
+            dict(p_id='<IGNORE>'), mode='create')
+        self.assertEqual(len(errs),0)
+        errs, inv_errs, conv_dict = self.processor.checkConversion(
+            dict(p_id='<IGNORE>'), mode='update')
+        self.assertEqual(len(errs),1)
+        self.assertEqual(errs[0], ('p_id', u'missing'))
+        errs, inv_errs, conv_dict = self.processor.checkConversion(
             dict(p_id='3816951266236341955'))
         self.assertEqual(len(errs),0)
@@ -1075,4 +1082,5 @@
             dict(p_id='nonsense'))
         self.assertEqual(len(errs),1)
+        self.assertEqual(errs[0], ('p_id', u'invalid format'))
         timestamp = ("%d" % int(time()*10000))[1:]
         p_id = "p%s" % timestamp
@@ -1142,5 +1150,5 @@
         # We perform the same import twice,
         # the second time in update mode. The number
-        # of warnings must be the same.
+        # of warnings increases becaus one p_id is missing.
         num, num_warns, fin_file, fail_file = self.processor.doImport(
             self.csv_file, PAYMENT_HEADER_FIELDS,'create')
@@ -1148,11 +1156,13 @@
         num, num_warns, fin_file, fail_file = self.processor.doImport(
             self.csv_file, PAYMENT_HEADER_FIELDS,'update')
-        self.assertEqual(num_warns,0)
-        shutil.rmtree(os.path.dirname(fin_file))
+        self.assertEqual(num_warns,1)
+        content = open(fail_file).read()
+        shutil.rmtree(os.path.dirname(fin_file))
+        self.assertTrue('p_id: missing' in content)
 
     def test_import_remove(self):
         # We perform the same import twice,
         # the second time in remove mode. The number
-        # of warnings must be the same.
+        # of warnings increases becaus one p_id is missing.
         num, num_warns, fin_file, fail_file = self.processor.doImport(
             self.csv_file, PAYMENT_HEADER_FIELDS,'create')
@@ -1160,5 +1170,7 @@
         num, num_warns, fin_file, fail_file = self.processor.doImport(
             self.csv_file, PAYMENT_HEADER_FIELDS,'remove')
-        self.assertEqual(num_warns,0)
+        self.assertEqual(num_warns,1)
+        content = open(fail_file).read()
+        self.assertTrue('p_id: missing' in content)
         shutil.rmtree(os.path.dirname(fin_file))
         logcontent = open(self.logfile).read()
@@ -1167,5 +1179,5 @@
             in logcontent)
 
-    def test_import_wo_pid(self):
+    def test_import_same_payment_exists(self):
         num, num_warns, fin_file, fail_file = self.processor.doImport(
             self.csv_file2, PAYMENT_CREATE_HEADER_FIELDS,'create')
