Index: /WAeUP_SRP/trunk/skins/waeup_utilities/fixPaymentPins.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_utilities/fixPaymentPins.py	(revision 1377)
+++ /WAeUP_SRP/trunk/skins/waeup_utilities/fixPaymentPins.py	(revision 1377)
@@ -0,0 +1,38 @@
+## Script (Python) "fixPins"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=REQUEST
+##title=
+##
+# $Id: fixScratchCardPayments.py 1371 2007-01-28 21:36:52Z henrik $
+"""
+
+"""
+
+request = REQUEST
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+roles = member.getRolesInContext(context)
+scat = context.students_catalog
+from Products.AdvancedQuery import Eq, Between, Le,In
+aq_students = context.students_catalog.evalAdvancedQuery
+students = context.portal_url.getPortalObject().campus.students
+payments = context.portal_catalog(portal_type='Payment')
+
+list = []
+for brain in payments:
+    d = {}
+    payment = brain.getObject()
+    pay_doc = payment.getContent()
+    if pay_doc.resp_code == 'SC':
+        old = pay_doc.type_code
+        pin = old.replace('-','')
+        d['type_code'] = pin[:3]+'-'+pin[3:4]+'-'+pin[4:]
+        pay_doc.edit(mapping=d)
+        list.append('%s changed to %s' % (old,d['type_code']))
+return '\n'.join(list)
+
