Index: main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py	(revision 15386)
+++ main/waeup.aaue/trunk/src/waeup/aaue/interswitch/browser.py	(revision 15387)
@@ -59,5 +59,5 @@
 
 def contr_agreement_applicant(applicant):
-    if applicant.__parent__.code[:2] in ('fp', 'pt'):
+    if applicant.__parent__.code[:2] in ('fp', 'pt', 'ds'):
         return 'first'
     return 'second'
@@ -65,5 +65,11 @@
 def contr_agreement_student(student):
     if student.current_mode in (
-        'found', 'bridge', 'ug_dsh', 'de_dsh') or student.current_mode.endswith('_pt'):
+        'found',
+        'bridge',
+        'ug_dsh',
+        'de_dsh',
+        'ug_pt',
+        'de_pt',
+        'dp_pt'):
         return 'first'
     return 'second'
@@ -226,6 +232,6 @@
                 # First agreement
                 provider_amt = 1900.0
-                joint_venture_amt = 1100.0
-                aaue_share_amt = 1000.0
+                joint_venture_amt = 0.0
+                aaue_share_amt = 0.0
                 student_union_due_amt = gateway_net_amt(
                     academic_session.union_fee)
@@ -310,10 +316,16 @@
 <item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" />
 <item_detail item_id="2" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" />
-<item_detail item_id="3" item_name="Joint Venture" item_amt="%(joint_venture_amt)d" bank_id="%(joint_venture_bank_id)s" acct_num="%(joint_venture_acct)s" />
-<item_detail item_id="4" item_name="AAUE Share" item_amt="%(aaue_share_amt)d" bank_id="%(aaue_share_bank_id)s" acct_num="%(aaue_share_acct)s" />
-<item_detail item_id="5" item_name="Student Union" item_amt="%(student_union_due_amt)d" bank_id="%(student_union_bank_id)s" acct_num="%(student_union_acct)s" />
-<item_detail item_id="6" item_name="Student Welfare Assurance" item_amt="%(student_welfare_assurance_amt)d" bank_id="123" acct_num="1006407792" />
-<item_detail item_id="7" item_name="Sports Development Fee" item_amt="%(sports_amt)d" bank_id="123" acct_num="1006407792" />
-<item_detail item_id="8" item_name="Library Development Fee" item_amt="%(library_amt)d" bank_id="8" acct_num="2000122995" />
+<item_detail item_id="3" item_name="Student Union" item_amt="%(student_union_due_amt)d" bank_id="%(student_union_bank_id)s" acct_num="%(student_union_acct)s" />
+<item_detail item_id="4" item_name="Student Welfare Assurance" item_amt="%(student_welfare_assurance_amt)d" bank_id="123" acct_num="1006407792" />
+<item_detail item_id="5" item_name="Sports Development Fee" item_amt="%(sports_amt)d" bank_id="123" acct_num="1006407792" />
+<item_detail item_id="6" item_name="Library Development Fee" item_amt="%(library_amt)d" bank_id="8" acct_num="2000122995" />""" % xmldict
+                    if contr_agreement_student(student) == 'second':
+                        xmltext += """"
+<item_detail item_id="7" item_name="Joint Venture" item_amt="%(joint_venture_amt)d" bank_id="%(joint_venture_bank_id)s" acct_num="%(joint_venture_acct)s" />
+<item_detail item_id="8" item_name="AAUE Share" item_amt="%(aaue_share_amt)d" bank_id="%(aaue_share_bank_id)s" acct_num="%(aaue_share_acct)s" />
+</item_details>
+</payment_item_detail>""" % xmldict
+                    else:
+                        xmltext += """"
 </item_details>
 </payment_item_detail>""" % xmldict
@@ -330,23 +342,17 @@
 <item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" />
 <item_detail item_id="2" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" />
-<item_detail item_id="3" item_name="Joint Venture" item_amt="%(joint_venture_amt)d" bank_id="%(joint_venture_bank_id)s" acct_num="%(joint_venture_acct)s" />
-<item_detail item_id="4" item_name="AAUE Share" item_amt="%(aaue_share_amt)d" bank_id="%(aaue_share_bank_id)s" acct_num="%(aaue_share_acct)s" />
-<item_detail item_id="5" item_name="Student Union" item_amt="%(student_union_due_amt)d" bank_id="%(student_union_bank_id)s" acct_num="%(student_union_acct)s" />
-<item_detail item_id="6" item_name="Student Welfare Assurance" item_amt="%(student_welfare_assurance_amt)d" bank_id="123" acct_num="1006407792" />
-</item_details>
-</payment_item_detail>""" % xmldict
-
-            elif student.current_mode == 'bridge':
-                # Bridge school fee without any additional fee
-                xmldict['institution_amt'] = 100 * (
-                    gateway_net_amt(self.context.amount_auth)
-                    - provider_amt)
-                xmltext = """<payment_item_detail>
-<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
-<item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" />
-<item_detail item_id="2" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" />
-</item_details>
-</payment_item_detail>""" % xmldict
-            else:
+<item_detail item_id="3" item_name="Student Union" item_amt="%(student_union_due_amt)d" bank_id="%(student_union_bank_id)s" acct_num="%(student_union_acct)s" />
+<item_detail item_id="4" item_name="Student Welfare Assurance" item_amt="%(student_welfare_assurance_amt)d" bank_id="123" acct_num="1006407792" />""" % xmldict
+                    if contr_agreement_student(student) == 'second':
+                        xmltext += """"
+<item_detail item_id="5" item_name="Joint Venture" item_amt="%(joint_venture_amt)d" bank_id="%(joint_venture_bank_id)s" acct_num="%(joint_venture_acct)s" />
+<item_detail item_id="6" item_name="AAUE Share" item_amt="%(aaue_share_amt)d" bank_id="%(aaue_share_bank_id)s" acct_num="%(aaue_share_acct)s" />
+</item_details>
+</payment_item_detail>""" % xmldict
+                    else:
+                        xmltext += """"
+</item_details>
+</payment_item_detail>""" % xmldict
+            elif contr_agreement_student(student) == 'second':
                 # Schoolfee without Student Union Fee ands Student Welfare Assurance
                 xmldict['institution_amt'] = 100 * (
@@ -361,4 +367,14 @@
 <item_detail item_id="3" item_name="Joint Venture" item_amt="%(joint_venture_amt)d" bank_id="%(joint_venture_bank_id)s" acct_num="%(joint_venture_acct)s" />
 <item_detail item_id="4" item_name="AAUE Share" item_amt="%(aaue_share_amt)d" bank_id="%(aaue_share_bank_id)s" acct_num="%(aaue_share_acct)s" />
+</item_details>
+</payment_item_detail>""" % xmldict
+            else:
+                xmldict['institution_amt'] = 100 * (
+                    gateway_net_amt(self.context.amount_auth)
+                    - provider_amt)
+                xmltext = """<payment_item_detail>
+<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
+<item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" />
+<item_detail item_id="2" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" />
 </item_details>
 </payment_item_detail>""" % xmldict
Index: main/waeup.aaue/trunk/src/waeup/aaue/interswitch/tests.py
===================================================================
--- main/waeup.aaue/trunk/src/waeup/aaue/interswitch/tests.py	(revision 15386)
+++ main/waeup.aaue/trunk/src/waeup/aaue/interswitch/tests.py	(revision 15387)
@@ -236,5 +236,5 @@
         self.assertTrue(
             'item_name="School Fee Plus" '
-            'item_amt="4600000" bank_id="7" '
+            'item_amt="4810000" bank_id="7" '
             'acct_num="1014847058"' in self.browser.contents)
 
@@ -279,5 +279,4 @@
             'item_name="School Fee Plus" item_amt="4750000" bank_id="117" '
             'acct_num="1010827641"' in self.browser.contents)
-
 
     def test_interswitch_form_pt_acceptance_fees(self):
