c2de9964 by Chris Boden

Added student fee checkbox for admin when registering for a course

1 parent 97582dde
......@@ -888,6 +888,31 @@ class Actions {
, 'extras' => array()
));
if (isset($_POST['studentfee']) && $_POST['studentfee'] == 1) {
$fee = number_format(CBVOptions\GetOption('overseas-surcharge', 'fees'), 2, '.', '');
$taxes = $calc_tax($fee, $tax_rate);
$items_subtotal += $fee;
$items_taxes += $taxes;
$items_total += $fee + $taxes;
$items[] = Array(
'post_id' => 0
, 'cost' => $fee
, 'discount_label' => ''
, 'discount_amount' => ''
, 'tax_label' => 'Taxes'
, 'tax_rate' => $tax_rate
, 'tax_amount' => $taxes
, 'subtotal' => $fee
, 'total' => ($fee + $taxes)
, 'description' => 'Annual Registration Fee'
, 'extras' => Array()
);
$user->setMeta('fee_semester_paid', $course->semester_id);
}
// If the user paid for the casebook add to invoice and Casebook group
if (isset($_POST['casebook']) && $_POST['casebook'] == 1) {
$book = UAM\getGroup('Casebook');
......
......@@ -85,6 +85,15 @@
</div>
</div>
<?php if ($user->isStudentFeeDue()): ?>
<div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
<div class="dashboard-section-title">
<input type="checkbox" name="studentfee" id="studentfee" value="1" checked />
<label for="studentfee">PAID ANNUAL REGISTRATION FEE?</label>
</div>
</div>
<?php endif; ?>
<?php if (!$user->isMemberOf('Casebook')): ?>
<div class="dashboard-section" style="margin-left:20px;margin-top:10px;">
<div class="dashboard-section-title">
......