c2de9964 by Chris Boden

Added student fee checkbox for admin when registering for a course

1 parent 97582dde
...@@ -888,6 +888,31 @@ class Actions { ...@@ -888,6 +888,31 @@ class Actions {
888 , 'extras' => array() 888 , 'extras' => array()
889 )); 889 ));
890 890
891 if (isset($_POST['studentfee']) && $_POST['studentfee'] == 1) {
892 $fee = number_format(CBVOptions\GetOption('overseas-surcharge', 'fees'), 2, '.', '');
893 $taxes = $calc_tax($fee, $tax_rate);
894
895 $items_subtotal += $fee;
896 $items_taxes += $taxes;
897 $items_total += $fee + $taxes;
898
899 $items[] = Array(
900 'post_id' => 0
901 , 'cost' => $fee
902 , 'discount_label' => ''
903 , 'discount_amount' => ''
904 , 'tax_label' => 'Taxes'
905 , 'tax_rate' => $tax_rate
906 , 'tax_amount' => $taxes
907 , 'subtotal' => $fee
908 , 'total' => ($fee + $taxes)
909 , 'description' => 'Annual Registration Fee'
910 , 'extras' => Array()
911 );
912
913 $user->setMeta('fee_semester_paid', $course->semester_id);
914 }
915
891 // If the user paid for the casebook add to invoice and Casebook group 916 // If the user paid for the casebook add to invoice and Casebook group
892 if (isset($_POST['casebook']) && $_POST['casebook'] == 1) { 917 if (isset($_POST['casebook']) && $_POST['casebook'] == 1) {
893 $book = UAM\getGroup('Casebook'); 918 $book = UAM\getGroup('Casebook');
......
...@@ -85,6 +85,15 @@ ...@@ -85,6 +85,15 @@
85 </div> 85 </div>
86 </div> 86 </div>
87 87
88 <?php if ($user->isStudentFeeDue()): ?>
89 <div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
90 <div class="dashboard-section-title">
91 <input type="checkbox" name="studentfee" id="studentfee" value="1" checked />
92 <label for="studentfee">PAID ANNUAL REGISTRATION FEE?</label>
93 </div>
94 </div>
95 <?php endif; ?>
96
88 <?php if (!$user->isMemberOf('Casebook')): ?> 97 <?php if (!$user->isMemberOf('Casebook')): ?>
89 <div class="dashboard-section" style="margin-left:20px;margin-top:10px;"> 98 <div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
90 <div class="dashboard-section-title"> 99 <div class="dashboard-section-title">
......