875115ad by Chris Boden

Updated course semester calls to reflect changes in cbv lib

1 parent 50ef8121
......@@ -819,7 +819,7 @@ class Actions {
$order->addItem(new OrderItem($fee, $tax_rate, 'Annual Registration Fee'));
$user->setMeta('fee_semester_paid', $course->semester_id);
$user->setMeta('fee_semester_paid', $course->getSemester());
}
if (isset($_POST['casebook']) && $_POST['casebook'] == 1) {
......@@ -1354,7 +1354,11 @@ class Actions {
$items = $_POST['keys'];
foreach ($items as $index => $yes) {
$invoice->seek($index)->cancel();
if (1 /* checkbox on */) {
$fee = 0;
}
$invoice->seek($index)->cancel($fee);
}
$invoice->runRefund();
......
......@@ -113,7 +113,7 @@ use WP_Query;
<td><?php echo $course->post_title; ?></td>
<td><?php echo $course->course_type; ?></td>
<td><a href="#" id="edit_mark_<?php echo $course->ID; ?>" data-mark="editable" data-course-id="<?php echo $course->ID; ?>" data-mark-value="<?php echo $data['mark']; ?>"><?php echo $data['mark']; ?></a></td>
<td><?php echo $course->semester_id; ?></td>
<td><?php echo $course->getSemester(); ?></td>
<td><?php echo date('Y-m-d', $data['added']); ?></td>
</tr>
<?php endforeach; ?>
......
......@@ -46,9 +46,15 @@
color: #999;
font-size: 11px;
}
.part-wrapper {
display: block;
width: 750px;
margin-bottom: 0;
}
</style>
<div style="display:block; width:750px; margin-bottom:0px;">
<div class="part-wrapper">
<div class="title-link">Refund: <?php echo $invoice->getTitle(); ?></div>
<div style="padding:10px;">
......@@ -71,7 +77,7 @@
<td><label for="<?php echo $unq; ?>"><?php echo $item->getDescription(); ?></label></td>
<td>
<input type="checkbox" checked="checked" value="1" id="<?php echo $unq; ?>" name="<?php echo $unq; ?>" />
<label for="<?php echo $unq; ?>" class="amount">(-$<?php echo $item->getTotal();?>)</label>
<label for="<?php echo $unq; ?>" class="amount">(-$<?php echo $item->getTotal(true); ?>)</label>
</td>
<td>
<input type="checkbox" checked="checked" value="1" id="force_cancellation_fee" name="force_cancellation_fee" />
......@@ -81,7 +87,7 @@
<?php endforeach; ?>
</tbody></table>
<div style="padding-top:8px;margin-top:25px;">
<div style="padding-top:8px; margin-top:25px;">
<table cellpadding="0" cellspacing="0" width="100%" border="0">
<tr>
<td width="400" style="text-align:right;">
......