Index: main/waeup.aaue/trunk/src/waeup/aaue/applicants/tests/test_browser.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/applicants/tests/test_browser.py	(revision 14306)
+++ main/waeup.aaue/trunk/src/waeup/aaue/applicants/tests/test_browser.py	(revision 14307)
@@ -24,4 +24,5 @@
 from zope.component import createObject, getUtility
 from waeup.kofa.configuration import SessionConfiguration
+from waeup.kofa.interfaces import IUserAccount
 from waeup.kofa.applicants.container import ApplicantsContainer
 from waeup.kofa.browser.tests.test_pdf import samples_dir
@@ -199,2 +200,50 @@
         self.assertEqual(self.browser.headers['Status'], '200 Ok')
         self.assertTrue("3rd Higher Education Record" in self.browser.contents)
+
+    def test_transcript_payment(self):
+        configuration = SessionConfiguration()
+        configuration.academic_session = session_1
+        self.app['configuration'].addSessionConfiguration(configuration)
+        # Add special application container
+        applicantscontainer = ApplicantsContainer()
+        applicantscontainer.year = session_1
+        applicantscontainer.application_fee = 200.0
+        applicantscontainer.code = u'trans1234'
+        applicantscontainer.prefix = 'trans'
+        applicantscontainer.title = u'This is a trans container'
+        applicantscontainer.application_category = 'no'
+        applicantscontainer.mode = 'create'
+        applicantscontainer.strict_deadline = True
+        delta = datetime.timedelta(days=10)
+        applicantscontainer.startdate = datetime.datetime.now(pytz.utc) - delta
+        applicantscontainer.enddate = datetime.datetime.now(pytz.utc) + delta
+        self.app['applicants']['trans1234'] = applicantscontainer
+        # Add an applicant
+        applicant = createObject('waeup.Applicant')
+        # reg_number is the only field which has to be preset here
+        # because managers are allowed to edit this required field
+        applicant.reg_number = u'12345'
+        self.app['applicants']['trans1234'].addApplicant(applicant)
+        IUserAccount(
+            self.app['applicants']['trans1234'][
+            applicant.application_number]).setPassword('apwd')
+        # Login
+        self.browser.open(self.login_path)
+        self.browser.getControl(
+            name="form.login").value = applicant.applicant_id
+        self.browser.getControl(name="form.password").value = 'apwd'
+        self.browser.getControl("Login").click()
+        self.browser.getLink("Edit").click()
+        self.browser.getControl(name="form.date_of_birth").value = '09/09/1988'
+        self.browser.getControl(name="form.email").value = 'xx@yy.zz'
+        self.browser.getControl(name="form.nationality").value = ['NG']
+        #self.browser.getControl(name="form.sex").value = ['f']
+        self.browser.getControl(name="form.firstname").value = 'Angela'
+        self.browser.getControl(name="form.lastname").value = 'Merkel'
+        self.browser.getControl(name="form.no_copies").value = ['3']
+        self.browser.getControl("Save").click()
+        self.browser.getControl("Add online payment ticket").click()
+        self.assertTrue('Payment ticket created' in self.browser.contents)
+        self.assertTrue('<span>600.0</span>' in self.browser.contents)
+        self.assertEqual(applicant.values()[0].amount_auth, 600.0)
+        return
Index: main/waeup.aaue/trunk/src/waeup/aaue/applicants/utils.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/applicants/utils.py	(revision 14306)
+++ main/waeup.aaue/trunk/src/waeup/aaue/applicants/utils.py	(revision 14307)
@@ -82,2 +82,12 @@
             title = "NA / %s (%s)" % (value.title, value.code)
         return title
+
+    def setPaymentDetails(self, container, payment, applicant):
+        msg = super(ApplicantsUtils, self).setPaymentDetails(
+            container, payment, applicant)
+        if msg:
+            return msg
+        if applicant.container_code.startswith('trans') or \
+            applicant.container_code.startswith('cert'):
+            payment.amount_auth = applicant.no_copies * container.application_fee
+        return
