Index: main/waeup.aaue/trunk/src/waeup/aaue/locales/en/LC_MESSAGES/waeup.kofa.po
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/locales/en/LC_MESSAGES/waeup.kofa.po	(revision 13357)
+++ main/waeup.aaue/trunk/src/waeup/aaue/locales/en/LC_MESSAGES/waeup.kofa.po	(revision 13359)
@@ -76,2 +76,22 @@
 "Your application process in not complete, please login to complete and "
 "submit your application."
+
+#: waeup/kofa/interfaces.py:718
+msgid "Next Matriculation Number Integer"
+msgstr "Next PTP Matriculation Number Integer"
+
+#: waeup/kofa/interfaces.py:719
+msgid "Integer used for constructing the next matriculation number"
+msgstr ""
+"Integer used for constructing the next matriculation number of part-time "
+"students"
+
+#: waeup/kofa/interfaces.py:727
+msgid "Next Matriculation Number Integer 2"
+msgstr "Next Regular Matriculation Number Integer"
+
+#: waeup/kofa/interfaces.py:728
+msgid "2nd integer used for constructing the next matriculation number"
+msgstr ""
+"Integer used for constructing the next matriculation number of regular "
+"students"
Index: main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py	(revision 13357)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py	(revision 13359)
@@ -462,5 +462,5 @@
         self.assertEqual(self.browser.headers['Status'], '200 Ok')
         self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
-        path = os.path.join(samples_dir(), 'transcript.pdf')
+        path = os.path.join(samples_dir(), 'matric_number_slip.pdf')
         open(path, 'wb').write(self.browser.contents)
         print "Sample PDF matric_number_slip.pdf written to %s" % path
Index: main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_utils.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_utils.py	(revision 13357)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_utils.py	(revision 13359)
@@ -116,18 +116,25 @@
         utils = getUtility(IStudentsUtils)
         site['configuration'].next_matric_integer = 1
+        site['configuration'].next_matric_integer_2 = 1
         self.student.matric_number = None
-        # So far we don't set matric numbers of ft students.
+        # Regular ft students have a matric number without leading constant.
         msg, mnumber = utils.setMatricNumber(self.student)
-        self.assertEqual(msg, 'Matriculation number cannot be set.')
-        self.assertEqual(mnumber, None)
-        #self.assertEqual(msg, None)
-        #self.assertEqual(mnumber, 1)
-        #self.assertEqual(self.student.matric_number, 'fac1/dep1/04/00001')
-        #self.assertEqual(site['configuration'].next_matric_integer, 2)
-        # Part time have an extended matric number
+        self.assertEqual(self.student.matric_number, 'fac1/dep1/04/00001')
+        self.assertEqual(msg, None)
+        # Part time have an extended matric number with leading 'PTP'
+        # and a different counter which is next_matric_integer.
         self.student.matric_number = None
         self.student['studycourse'].certificate.study_mode = 'ug_pt'
         msg, mnumber = utils.setMatricNumber(self.student)
         self.assertEqual(self.student.matric_number, 'PTP/fac1/dep1/04/00001')
+        self.assertEqual(site['configuration'].next_matric_integer, 2)
+        # Students in faculty FBM an extended matric number with leading 'CMS'
+        # and the regular counter which is next_matric_integer_2.
+        self.app['faculties']['fac1'].code = 'FBM'
+        self.student['studycourse'].certificate.study_mode = 'ug_ft'
+        self.student.matric_number = None
+        msg, mnumber = utils.setMatricNumber(self.student)
+        self.assertEqual(self.student.matric_number, 'CMS/FBM/dep1/04/00002')
+        self.assertEqual(site['configuration'].next_matric_integer_2, 3)
         # Foundation programme students don't get matric number.
         self.student.matric_number = None
Index: main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py	(revision 13357)
+++ main/waeup.aaue/trunk/src/waeup/aaue/students/utils.py	(revision 13359)
@@ -40,29 +40,36 @@
                       (5, '1st Class Honours'))
 
+    def increaseMatricInteger(self, student):
+        """Increase counter for matric numbers.
+        This counter can be a centrally stored attribute or an attribute of
+        faculties, departments or certificates. In the base package the counter
+        is as an attribute of the site configuration container.
+        """
+        if student.current_mode in ('ug_pt', 'de_pt'):
+            grok.getSite()['configuration'].next_matric_integer += 1
+            return
+        grok.getSite()['configuration'].next_matric_integer_2 += 1
+        return
+
     def constructMatricNumber(self, student):
-        next_integer = grok.getSite()['configuration'].next_matric_integer
-        if next_integer == 0:
-            return None
         faccode = student.faccode
         depcode = student.depcode
         year = unicode(student.entry_session)[2:]
-        if student.current_mode in ('ug_pt', 'de_pt') \
-            and student.state in (PAID, ) \
-            and student.is_fresh:
+        if not student.state in (PAID, ) or not student.is_fresh or \
+            student.current_mode == 'found':
+            return _('Matriculation number cannot be set.'), None
+        if student.current_mode in ('ug_pt', 'de_pt'):
+            next_integer = grok.getSite()['configuration'].next_matric_integer
+            if next_integer == 0:
+                return _('Matriculation number cannot be set.'), None
             return None, "PTP/%s/%s/%s/%05d" % (
                 faccode, depcode, year, next_integer)
-
-        #if student.current_mode in ('pg_ft', 'pg_pt'):
-        #    return None, "SPS/%s/%s/%s/%05d" % (
-        #    faccode, depcode, year, next_integer)
-        #if student.current_mode in ('dp_ft', 'dp_pt'):
-        #    return None, "DIP/%s/%s/%s/%05d" % (
-        #    faccode, depcode, year, next_integer)
-        #if student.current_mode == 'found':
-        #    return _(
-        #    'Foundation programme students don\'t have matric number.'), None
-        #return None, "%s/%s/%s/%05d" % (faccode, depcode, year, next_integer)
-
-        return _('Matriculation number cannot be set.'), None
+        next_integer = grok.getSite()['configuration'].next_matric_integer_2
+        if next_integer == 0:
+            return _('Matriculation number cannot be set.'), None
+        if student.faccode in ('FBM', 'FCS'):
+            return None, "CMS/%s/%s/%s/%05d" % (
+                faccode, depcode, year, next_integer)
+        return None, "%s/%s/%s/%05d" % (faccode, depcode, year, next_integer)
 
     def getReturningData(self, student):
