Index: /main/waeup.kofa/trunk/CHANGES.txt
===================================================================
--- /main/waeup.kofa/trunk/CHANGES.txt	(revision 13885)
+++ /main/waeup.kofa/trunk/CHANGES.txt	(revision 13886)
@@ -4,4 +4,8 @@
 1.4.2.dev0 (unreleased)
 =======================
+
+* Remove application fee fallback option. Application fees can only
+  be set via applicants containers. Hide Payment Tickets section on
+  application pages if fee isn't set.
 
 * Add  `ApplicantOnlinePaymentProcessor`.
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py	(revision 13885)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py	(revision 13886)
@@ -557,4 +557,10 @@
 
     @property
+    def display_payments(self):
+        if self.context.special:
+            return True
+        return getattr(self.context.__parent__, 'application_fee', None)
+
+    @property
     def form_fields(self):
         if self.context.special:
@@ -887,4 +893,10 @@
     display_actions = [[_('Save'), _('Finally Submit')],
         [_('Add online payment ticket'),_('Remove selected tickets')]]
+
+    @property
+    def display_payments(self):
+        if self.context.special:
+            return True
+        return getattr(self.context.__parent__, 'application_fee', None)
 
     @property
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantdisplaypage.pt
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantdisplaypage.pt	(revision 13885)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantdisplaypage.pt	(revision 13886)
@@ -38,28 +38,30 @@
   </tbody>
 </table>
-<h3 i18n:domain="waeup.kofa" i18n:translate="">
-    Payment Tickets
-</h3>
-<table i18n:domain="waeup.kofa" class="table table-condensed">
-  <thead>
-    <tr>
-      <th i18n:translate="">Payment Id</th>
-      <th i18n:translate="">Creation Date</th>
-      <th i18n:translate="">Payment Date</th>
-      <th i18n:translate="">Category</th>
-      <th i18n:translate="">Item</th>
-      <th i18n:translate="">State</th>
-    </tr>
-  </thead>
-  <tbody>
-    <tr tal:repeat="value context/values">
-      <td> <a tal:attributes="href python:view.url(value)">
-      <span tal:content="value/p_id">PID</span></a></td>
-      <td tal:content="python: layout.formatDatetime(value.creation_date)">CREATION DATE</td>
-      <td tal:content="python: layout.formatDatetime(value.payment_date)">PAYMENT DATE</td>
-      <td tal:content ="value/category">CATEGORY</td>
-      <td tal:content ="value/display_item">ITEM</td>
-      <td tal:content ="value/p_state_title">STATE</td>
-    </tr>
-  </tbody>
-</table>
+<tal:payments condition="view/display_payments">
+  <h3 i18n:domain="waeup.kofa" i18n:translate="">
+      Payment Tickets
+  </h3>
+  <table i18n:domain="waeup.kofa" class="table table-condensed">
+    <thead>
+      <tr>
+        <th i18n:translate="">Payment Id</th>
+        <th i18n:translate="">Creation Date</th>
+        <th i18n:translate="">Payment Date</th>
+        <th i18n:translate="">Category</th>
+        <th i18n:translate="">Item</th>
+        <th i18n:translate="">State</th>
+      </tr>
+    </thead>
+    <tbody>
+      <tr tal:repeat="value context/values">
+        <td> <a tal:attributes="href python:view.url(value)">
+        <span tal:content="value/p_id">PID</span></a></td>
+        <td tal:content="python: layout.formatDatetime(value.creation_date)">CREATION DATE</td>
+        <td tal:content="python: layout.formatDatetime(value.payment_date)">PAYMENT DATE</td>
+        <td tal:content ="value/category">CATEGORY</td>
+        <td tal:content ="value/display_item">ITEM</td>
+        <td tal:content ="value/p_state_title">STATE</td>
+      </tr>
+    </tbody>
+  </table>
+</tal:payments>
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicanteditpage.pt
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicanteditpage.pt	(revision 13885)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicanteditpage.pt	(revision 13886)
@@ -87,52 +87,54 @@
   </div>
 
-  <br /><br />
-  <h3 i18n:translate="">
-      Payment Tickets
-  </h3>
+  <tal:payments condition="view/display_payments">
+    <br /><br />
+    <h3 i18n:translate="">
+        Payment Tickets
+    </h3>
 
-  <table i18n:domain="waeup.kofa" class="table table-condensed">
-    <thead>
-    <tr>
-      <th>&nbsp;</th>
-      <th i18n:translate="">Payment Id</th>
-      <th i18n:translate="">Creation Date</th>
-      <th i18n:translate="">Payment Date</th>
-      <th i18n:translate="">Category</th>
-      <th i18n:translate="">Item</th>
-      <th i18n:translate="">State</th>
-    </tr>
-    </thead>
-    <tbody>
-      <tr tal:repeat="cl context/values">
-         <td>
-          <input type="checkbox"
-    		 name="val_id"
-    		 tal:attributes="value cl/__name__"
-         tal:condition="python: not view.unremovable(cl)" />
-        </td>
-        <td> <a tal:attributes="href python:view.url(cl)">
-        <span tal:content="cl/p_id">PID</span></a></td>
-        <td tal:content="python: layout.formatDatetime(cl.creation_date)">CREATION DATE</td>
-        <td tal:content="python: layout.formatDatetime(cl.payment_date)">PAYMENT DATE</td>
-      <td tal:content ="cl/category">CATEGORY</td>
-      <td tal:content ="cl/display_item">ITEM</td>
-      <td tal:content ="cl/p_state_title">STATE</td>
+    <table i18n:domain="waeup.kofa" class="table table-condensed">
+      <thead>
+      <tr>
+        <th>&nbsp;</th>
+        <th i18n:translate="">Payment Id</th>
+        <th i18n:translate="">Creation Date</th>
+        <th i18n:translate="">Payment Date</th>
+        <th i18n:translate="">Category</th>
+        <th i18n:translate="">Item</th>
+        <th i18n:translate="">State</th>
       </tr>
-    </tbody>
-  </table>
+      </thead>
+      <tbody>
+        <tr tal:repeat="cl context/values">
+           <td>
+            <input type="checkbox"
+      		 name="val_id"
+      		 tal:attributes="value cl/__name__"
+           tal:condition="python: not view.unremovable(cl)" />
+          </td>
+          <td> <a tal:attributes="href python:view.url(cl)">
+          <span tal:content="cl/p_id">PID</span></a></td>
+          <td tal:content="python: layout.formatDatetime(cl.creation_date)">CREATION DATE</td>
+          <td tal:content="python: layout.formatDatetime(cl.payment_date)">PAYMENT DATE</td>
+        <td tal:content ="cl/category">CATEGORY</td>
+        <td tal:content ="cl/display_item">ITEM</td>
+        <td tal:content ="cl/p_state_title">STATE</td>
+        </tr>
+      </tbody>
+    </table>
 
-  <div tal:condition="view/availableActions">
-    <span tal:repeat="action view/actions"
-          tal:omit-tag="">
-      <input tal:condition="python:action.label in view.display_actions[1]"
-             tal:replace="structure action/render"/>
-    </span>
-  </div>
-  <br />
-  <p i18n:translate="" tal:condition="context/special">
-    <strong>Notice:</strong> If you need to pay for another service,
-    select the corresponding special application category above,
-    click 'Save' and then 'Add online payment ticket' again.
-  </p>
+    <div tal:condition="view/availableActions">
+      <span tal:repeat="action view/actions"
+            tal:omit-tag="">
+        <input tal:condition="python:action.label in view.display_actions[1]"
+               tal:replace="structure action/render"/>
+      </span>
+    </div>
+    <br />
+    <p i18n:translate="" tal:condition="context/special">
+      <strong>Notice:</strong> If you need to pay for another service,
+      select the corresponding special application category above,
+      click 'Save' and then 'Add online payment ticket' again.
+    </p>
+  </tal:payments>
 </form>
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py	(revision 13885)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py	(revision 13886)
@@ -887,7 +887,4 @@
         self.login()
         self.browser.open(self.edit_path)
-        # Payment tickets can't be created before the form has been validated
-        self.browser.getControl("Add online payment ticket").click()
-        self.assertTrue('Required input is missing' in self.browser.contents)
         self.fill_correct_values()
         # We have to save the form otherwise the filled fields will be cleared
@@ -895,4 +892,9 @@
         # requires a filled form but does not save it
         self.browser.getControl("Save").click()
+        # Payment section does not appear if application fee isn't set
+        self.assertFalse('Payment Tickets' in self.browser.contents)
+        self.assertFalse('Add online payment' in self.browser.contents)
+        self.applicantscontainer.application_fee = 200.0
+        self.browser.open(self.edit_path)
         self.browser.getControl("Add online payment ticket").click()
         # Session object missing
@@ -902,5 +904,4 @@
         configuration = SessionConfiguration()
         configuration.academic_session = session_1
-        configuration.application_fee = 200.0
         self.app['configuration'].addSessionConfiguration(configuration)
         self.browser.open(self.edit_path)
@@ -910,4 +911,6 @@
         self.assertMatches('...Activation Code...',
                            self.browser.contents)
+        self.assertTrue(
+            '<span>200.0</span>' in self.browser.contents)
         # Payment ticket can be removed if they haven't received a
         # valid callback
@@ -1008,28 +1011,4 @@
         return
 
-    def test_pay_container_application_fee(self):
-        self.login()
-        self.browser.open(self.edit_path)
-        self.fill_correct_values()
-        self.browser.getControl("Save").click()
-        configuration = SessionConfiguration()
-        configuration.academic_session = session_1
-        self.applicantscontainer.application_fee = 120.0
-        configuration.application_fee = 9999.9
-        self.app['configuration'].addSessionConfiguration(configuration)
-        self.browser.open(self.edit_path)
-        self.browser.getControl("Add online payment ticket").click()
-        self.assertMatches('...Payment ticket created...',
-                           self.browser.contents)
-        self.assertMatches('...Payment ticket created...',
-                           self.browser.contents)
-        self.assertFalse(
-            '<span>9999.9</span>' in self.browser.contents)
-        self.assertTrue(
-            '<span>120.0</span>' in self.browser.contents)
-        self.assertTrue(
-            '<span>Application Fee</span>' in self.browser.contents)
-        return
-
     def prepare_special_container(self):
         # Add special application container
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py	(revision 13885)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py	(revision 13886)
@@ -73,10 +73,7 @@
         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):
+        if not container_fee:
             return _('Amount could not be determined.')
+        payment.amount_auth = container_fee
         return
 
Index: /main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py	(revision 13885)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py	(revision 13886)
@@ -807,10 +807,4 @@
         )
 
-    application_fee = schema.Float(
-        title = _(u'Application Fee'),
-        default = 0.0,
-        required = False,
-        )
-
     clearance_fee = schema.Float(
         title = _(u'Acceptance Fee'),
