Index: /main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests/test_browser.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests/test_browser.py	(revision 13815)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests/test_browser.py	(revision 13816)
@@ -30,4 +30,7 @@
 from waeup.uniben.configuration import CustomSessionConfiguration
 from waeup.kofa.applicants.tests.test_browser import ApplicantsFullSetup, PH_LEN
+
+session_1 = datetime.now().year - 2
+SAMPLE_IMAGE = os.path.join(os.path.dirname(__file__), 'test_image.jpg')
 
 class CustomApplicantUITests(ApplicantsFullSetup):
@@ -227,5 +230,5 @@
         print "Sample nils_application_slip.pdf written to %s" % path
 
-    def test_ictwk_application_slip(self):
+    def test_ictwk_application(self):
 
         # Remove required FieldProperty attribute first ...
@@ -243,6 +246,19 @@
         #self.browser.getControl(name="form.sex").value = ['m']
         self.browser.getControl(name="form.email").value = 'xx@yy.zz'
+        image = open(SAMPLE_IMAGE, 'rb')
+        ctrl = self.browser.getControl(name='form.passport')
+        file_ctrl = ctrl.mech_control
+        file_ctrl.add_file(image, filename='myphoto.jpg')
         self.browser.getControl("Save").click()
         self.applicant.registration_cats = ['group', 'corporate']
+        IWorkflowState(self.applicant).setState('started')
+        configuration = CustomSessionConfiguration()
+        configuration.academic_session = session_1
+        configuration.application_fee = 0.0
+        self.app['configuration'].addSessionConfiguration(configuration)
+        self.browser.getControl("Add online payment ticket").click()
+        self.assertMatches('...Payment ticket created...',
+                           self.browser.contents)
+        self.assertEqual(self.applicant.values()[0].amount_auth, 450000)
         IWorkflowState(self.applicant).setState('submitted')
         self.browser.open(self.view_path)
Index: /main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py	(revision 13815)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py	(revision 13816)
@@ -19,10 +19,11 @@
 """
 
+import grok
+from time import time
 from kofacustom.nigeria.applicants.utils import NigeriaApplicantsUtils
 from waeup.kofa.applicants.workflow import (INITIALIZED,
     STARTED, PAID, ADMITTED, NOT_ADMITTED, SUBMITTED, CREATED)
+from waeup.uniben.applicants.interfaces import REGISTRATION_CATS
 from waeup.uniben.interfaces import MessageFactory as _
-
-
 
 class CustomApplicantsUtils(NigeriaApplicantsUtils):
@@ -90,16 +91,18 @@
                 fee_name = applicant.special_application + '_fee'
                 payment.amount_auth = getattr(session_config, fee_name, None)
-                if payment.amount_auth in (0.0, None):
-                    return _('Amount could not be determined.')
                 payment.p_category = applicant.special_application
             return
-        payment.p_category = 'application'
-        container_fee = container.application_fee
-        if container_fee:
-            payment.amount_auth = container_fee
-            return
-        payment.amount_auth = session_config.application_fee
+        elif applicant.__parent__.prefix == 'ictwk':
+            payment.p_category = 'registration'
+            for cat in applicant.registration_cats:
+                payment.amount_auth += REGISTRATION_CATS[cat][1]
+        else:
+            payment.p_category = 'application'
+            container_fee = container.application_fee
+            if container_fee:
+                payment.amount_auth = container_fee
+                return
+            payment.amount_auth = session_config.application_fee
         if payment.amount_auth in (0.0, None):
             return _('Amount could not be determined.')
         return
-
Index: /main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py	(revision 13815)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/utils/utils.py	(revision 13816)
@@ -82,4 +82,5 @@
         'admission_checking': 'Admission Checking Fee',
         'jupeb': 'JUPEB Examination Fee',
+        'registration': 'Registration Fee'
         }
 
