Index: WAeUP_SRP/base/Widgets.py
===================================================================
--- WAeUP_SRP/base/Widgets.py	(revision 2592)
+++ WAeUP_SRP/base/Widgets.py	(revision 2593)
@@ -1139,7 +1139,11 @@
          {'id': 'reference', 'type': 'string', 'mode': 'w',
          'label': 'Reference Field'},
+         {'id': 're_use_pin', 'type': 'boolean', 'mode': 'w',
+         'label': 'Reuse Application Pin'},
         )
     prefix = ''
     reference = ''
+    re_use_pin = True
+    
     def prepare(self, datastructure, **kw): ###(
         """Prepare datastructure from datamodel."""
@@ -1211,4 +1215,11 @@
                 datastructure.setError(widget_id, 'PIN neither checked nor used.')
                 s_logger.info('%s/%s entered wrong data together with PIN %s' % (s_id,ref,pin_str))
+        if prefix == 'APP' and not self.re_use_pin:
+            res =  self.applicants_catalog(reg_no = ref)
+            if res and res[0].pin == pin_str:
+                do = 0
+                err = 'Application PIN cannot be reused'
+                s_logger.info('%s entered same PIN as for Application %s' % (s_id,pin_str))
+                
         while do:
             ok = pins.searchAndSetRecord(pin,ref,prefix)
