Updated course semester calls to reflect changes in cbv lib
Showing
3 changed files
with
16 additions
and
6 deletions
| ... | @@ -819,7 +819,7 @@ class Actions { | ... | @@ -819,7 +819,7 @@ class Actions { |
| 819 | 819 | ||
| 820 | $order->addItem(new OrderItem($fee, $tax_rate, 'Annual Registration Fee')); | 820 | $order->addItem(new OrderItem($fee, $tax_rate, 'Annual Registration Fee')); |
| 821 | 821 | ||
| 822 | $user->setMeta('fee_semester_paid', $course->semester_id); | 822 | $user->setMeta('fee_semester_paid', $course->getSemester()); |
| 823 | } | 823 | } |
| 824 | 824 | ||
| 825 | if (isset($_POST['casebook']) && $_POST['casebook'] == 1) { | 825 | if (isset($_POST['casebook']) && $_POST['casebook'] == 1) { |
| ... | @@ -1354,7 +1354,11 @@ class Actions { | ... | @@ -1354,7 +1354,11 @@ class Actions { |
| 1354 | $items = $_POST['keys']; | 1354 | $items = $_POST['keys']; |
| 1355 | 1355 | ||
| 1356 | foreach ($items as $index => $yes) { | 1356 | foreach ($items as $index => $yes) { |
| 1357 | $invoice->seek($index)->cancel(); | 1357 | if (1 /* checkbox on */) { |
| 1358 | $fee = 0; | ||
| 1359 | } | ||
| 1360 | |||
| 1361 | $invoice->seek($index)->cancel($fee); | ||
| 1358 | } | 1362 | } |
| 1359 | 1363 | ||
| 1360 | $invoice->runRefund(); | 1364 | $invoice->runRefund(); | ... | ... |
| ... | @@ -113,7 +113,7 @@ use WP_Query; | ... | @@ -113,7 +113,7 @@ use WP_Query; |
| 113 | <td><?php echo $course->post_title; ?></td> | 113 | <td><?php echo $course->post_title; ?></td> |
| 114 | <td><?php echo $course->course_type; ?></td> | 114 | <td><?php echo $course->course_type; ?></td> |
| 115 | <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> | 115 | <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> |
| 116 | <td><?php echo $course->semester_id; ?></td> | 116 | <td><?php echo $course->getSemester(); ?></td> |
| 117 | <td><?php echo date('Y-m-d', $data['added']); ?></td> | 117 | <td><?php echo date('Y-m-d', $data['added']); ?></td> |
| 118 | </tr> | 118 | </tr> |
| 119 | <?php endforeach; ?> | 119 | <?php endforeach; ?> | ... | ... |
| ... | @@ -46,9 +46,15 @@ | ... | @@ -46,9 +46,15 @@ |
| 46 | color: #999; | 46 | color: #999; |
| 47 | font-size: 11px; | 47 | font-size: 11px; |
| 48 | } | 48 | } |
| 49 | |||
| 50 | .part-wrapper { | ||
| 51 | display: block; | ||
| 52 | width: 750px; | ||
| 53 | margin-bottom: 0; | ||
| 54 | } | ||
| 49 | </style> | 55 | </style> |
| 50 | 56 | ||
| 51 | <div style="display:block; width:750px; margin-bottom:0px;"> | 57 | <div class="part-wrapper"> |
| 52 | <div class="title-link">Refund: <?php echo $invoice->getTitle(); ?></div> | 58 | <div class="title-link">Refund: <?php echo $invoice->getTitle(); ?></div> |
| 53 | <div style="padding:10px;"> | 59 | <div style="padding:10px;"> |
| 54 | 60 | ||
| ... | @@ -71,7 +77,7 @@ | ... | @@ -71,7 +77,7 @@ |
| 71 | <td><label for="<?php echo $unq; ?>"><?php echo $item->getDescription(); ?></label></td> | 77 | <td><label for="<?php echo $unq; ?>"><?php echo $item->getDescription(); ?></label></td> |
| 72 | <td> | 78 | <td> |
| 73 | <input type="checkbox" checked="checked" value="1" id="<?php echo $unq; ?>" name="<?php echo $unq; ?>" /> | 79 | <input type="checkbox" checked="checked" value="1" id="<?php echo $unq; ?>" name="<?php echo $unq; ?>" /> |
| 74 | <label for="<?php echo $unq; ?>" class="amount">(-$<?php echo $item->getTotal();?>)</label> | 80 | <label for="<?php echo $unq; ?>" class="amount">(-$<?php echo $item->getTotal(true); ?>)</label> |
| 75 | </td> | 81 | </td> |
| 76 | <td> | 82 | <td> |
| 77 | <input type="checkbox" checked="checked" value="1" id="force_cancellation_fee" name="force_cancellation_fee" /> | 83 | <input type="checkbox" checked="checked" value="1" id="force_cancellation_fee" name="force_cancellation_fee" /> |
| ... | @@ -81,7 +87,7 @@ | ... | @@ -81,7 +87,7 @@ |
| 81 | <?php endforeach; ?> | 87 | <?php endforeach; ?> |
| 82 | </tbody></table> | 88 | </tbody></table> |
| 83 | 89 | ||
| 84 | <div style="padding-top:8px;margin-top:25px;"> | 90 | <div style="padding-top:8px; margin-top:25px;"> |
| 85 | <table cellpadding="0" cellspacing="0" width="100%" border="0"> | 91 | <table cellpadding="0" cellspacing="0" width="100%" border="0"> |
| 86 | <tr> | 92 | <tr> |
| 87 | <td width="400" style="text-align:right;"> | 93 | <td width="400" style="text-align:right;"> | ... | ... |
-
Please register or sign in to post a comment