595 lines
22 KiB
PHP
595 lines
22 KiB
PHP
<?php
|
|
require_once("include/globals.php");
|
|
|
|
if (SessionActive() != 1 || ! UserLoggedIn()) {
|
|
header("Location: /");
|
|
exit();
|
|
}
|
|
|
|
|
|
// Start the template and output buffering
|
|
startTemplate();
|
|
$headerArgs = "";
|
|
|
|
|
|
// Ensure that only valid user types have access to this module
|
|
$AllowedUserTypes = array('SuperUser','System Administrator','Application Administrator','Application Volunteer','Schedule Volunteer','Administration Team','Schedule Team','Financial Team');
|
|
if (checkPermission($AllowedUserTypes) != 1) {
|
|
$error_message = getLanguageText('ERRORMSG-ACCESS-DENIED');
|
|
$action = '';
|
|
$naction = '';
|
|
header("Location: /?action=$action&naction=$naction$headerArgs&form_message=" . urlencode($form_message) . "&error_message=" . urlencode($error_message));
|
|
exit();
|
|
}
|
|
|
|
|
|
$moduleName = "hotlunch.order_deletion.php";
|
|
// startLog($moduleName);
|
|
|
|
|
|
//
|
|
// Process all actions to list and edit records
|
|
//
|
|
$naction = "";
|
|
|
|
if (array_key_exists('schedule_num',$_GET)) $schedule_num = intval($_GET['schedule_num']);
|
|
if (array_key_exists('schedule_num',$_POST)) $schedule_num = intval($_POST['schedule_num']);
|
|
|
|
if (array_key_exists('menu_num',$_GET)) $menu_num = intval($_GET['menu_num']);
|
|
if (array_key_exists('menu_num',$_POST)) $menu_num = intval($_POST['menu_num']);
|
|
$selected_menu_num = $menu_num;
|
|
|
|
if (array_key_exists('naction',$_GET)) $naction = $_GET['naction'];
|
|
if (array_key_exists('naction',$_POST)) $naction = $_POST['naction'];
|
|
|
|
|
|
writeLog($action);
|
|
writeLog($naction);
|
|
|
|
$headerArgs = "&schedule_num=$schedule_num&menu_num=$menu_num&naction=$naction";
|
|
|
|
|
|
if (!isset($schedule_num)) {
|
|
$error_message = getLanguageText('ERRORMSG-MISSING-DATA');
|
|
$action = 'schedule-reports';
|
|
$naction = '';
|
|
header("Location: /?action=$action&naction=$naction$headerArgs&form_message=" . urlencode($form_message) . "&error_message=" . urlencode($error_message));
|
|
exit();
|
|
}
|
|
|
|
|
|
if (!isset($menu_num)) {
|
|
$error_message = getLanguageText('ERRORMSG-MISSING-DATA');
|
|
$action = 'schedule-reports';
|
|
$naction = '';
|
|
header("Location: /?action=$action&naction=$naction$headerArgs&form_message=" . urlencode($form_message) . "&error_message=" . urlencode($error_message));
|
|
exit();
|
|
}
|
|
|
|
|
|
// Check if this is a valid schedule
|
|
$query = "select * from hotlunch_schedules " .
|
|
"where school_num = $school_num " .
|
|
"and record_num = $schedule_num";
|
|
$results = db_query($query);
|
|
|
|
if (db_num_rows($results) == 0) {
|
|
$error_message = getLanguageText('ERRORMSG-INVALID-SCHEDULE-NUM');
|
|
$action = 'schedule-reports';
|
|
$naction = '';
|
|
header("Location: /?action=$action&naction=$naction$headerArgs&form_message=" . urlencode($form_message) . "&error_message=" . urlencode($error_message));
|
|
exit();
|
|
}
|
|
|
|
$hotlunch_schedule = db_fetch_array($results);
|
|
$schedule_name = $hotlunch_schedule['schedule_name'];
|
|
|
|
|
|
// If this is a ScheduleTeam user check if they have permission to access this schedule
|
|
if (in_array($_SESSION['UserInfo']['type'],array('Schedule Team','Schedule Volunteer'))) {
|
|
$userNum = intval($_SESSION['UserInfo']['record_num']);
|
|
$access = db_getVal("SELECT count(*) FROM hotlunch_schedules_people WHERE school_num = $school_num AND schedule_num = $schedule_num AND user_num = $userNum");
|
|
|
|
if (!$access || $access == 0) {
|
|
$error_message = getLanguageText('ERRORMSG-NO-SCHEDULE-ACCESS');
|
|
$action = 'schedule-reports';
|
|
$naction = '';
|
|
header("Location: /?action=$action&naction=$naction$headerArgs&form_message=" . urlencode($form_message) . "&error_message=" . urlencode($error_message));
|
|
exit();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Check if this is a valid menu
|
|
$query = "select * from hotlunch_menu_dates " .
|
|
"where school_num = $school_num " .
|
|
"and schedule_num = $schedule_num " .
|
|
"and record_num = $menu_num";
|
|
$results = db_query($query);
|
|
|
|
if (db_num_rows($results) == 0) {
|
|
$error_message = getLanguageText('ERRORMSG-INVALID-MENU');
|
|
$action = 'schedule-reports';
|
|
$naction = '';
|
|
header("Location: /?action=$action&naction=$naction$headerArgs&form_message=" . urlencode($form_message) . "&error_message=" . urlencode($error_message));
|
|
exit();
|
|
}
|
|
|
|
$hotlunch_menu_date = db_fetch_array($results);
|
|
$menu_date = $hotlunch_menu_date['menu_date'];
|
|
$curr_mtitle = $hotlunch_menu_date['menu_title'];
|
|
$curr_mdate = dateString('default',strtotime($menu_date));
|
|
|
|
if ($hotlunch_schedule['display_menu_date'] == 'Y') $curr_mtitle .= " - $curr_mdate";
|
|
$templatePageTitle = getLanguageText('TEXT-ORDER-DELETION') . "<br>\n$schedule_name - $curr_mtitle";
|
|
|
|
include "hotlunch_reports.menu.php";
|
|
echo("<br>\n");
|
|
|
|
|
|
if (array_key_exists('naction',$_GET)) $naction = $_GET['naction'];
|
|
if (array_key_exists('naction',$_POST)) $naction = $_POST['naction'];
|
|
|
|
$school_num = $school_record['record_num'];
|
|
|
|
include "form.messages.php";
|
|
|
|
|
|
//
|
|
// If classes have been selected then display the students from those classes
|
|
//
|
|
if (isset($naction) && $naction == 'verify') {
|
|
?>
|
|
<form method='post' id='deleteorderform' action='/'>
|
|
<table width='650' class='content-table'>
|
|
<tr>
|
|
<td align='center'><b><?php echo("$schedule_name - $curr_mtitle"); ?></b></td>
|
|
</tr>
|
|
<tr class='heading'>
|
|
<td colspan='2' align='center'><?php displayLanguageText('TEXT-SELECT-STUDENTS'); ?></td>
|
|
</tr>
|
|
<tr class='data-odd'>
|
|
<td align='left'><b><?php displayLanguageText('TEXT-CHECK-UNCHECK-ALL-PEOPLE'); ?></b> :: </td>
|
|
<td align='center'><input type='checkbox' name='select_all_people' id='select_all_people' value='Y' checked='checked'></td>
|
|
</tr>
|
|
<?php
|
|
// Display the students from the selected classes
|
|
$query = "select * from classes " .
|
|
"where school_num = $base_school_num " .
|
|
"order by sequence";
|
|
$results = db_query($query);
|
|
|
|
$classes = array();
|
|
while ($row = db_fetch_array($results)) {
|
|
$class_num = $row['record_num'];
|
|
if (array_key_exists("class_$class_num", $_POST) && $_POST["class_$class_num"] == 'Y') $classes[] = $class_num;
|
|
}
|
|
// $classes[] = 0;
|
|
// $classes[] = 1;
|
|
|
|
writeLog("Classes: ".count($classes));
|
|
|
|
$count = 0;
|
|
for ($i = 0; $i < count($classes); $i++) {
|
|
$class_num = $classes[$i];
|
|
$class_info = getClassInfo($class_num);
|
|
$fname = "class_$class_num";
|
|
if (array_key_exists($fname, $_POST) && $_POST[$fname] != 'Y') continue;
|
|
|
|
if (!isset($order_status)) $order_status = array();
|
|
if (!is_array($order_status)) $order_status = array($order_status);
|
|
$orders = getClassOrders($class_num,$schedule_num,$order_status);
|
|
$numOrders = db_num_rows($orders);
|
|
writeLog("Class $class_num - Orders: $numOrders");
|
|
if (db_num_rows($orders)) {
|
|
?>
|
|
<tr class='header'>
|
|
<td colspan='2' align='left'><?php echo($class_info) ?></td>
|
|
</tr>
|
|
<?php
|
|
|
|
$count = 0;
|
|
while ($row = db_fetch_array($orders)) {
|
|
$name = $row['first_name'] . ' ' . $row['last_name'];
|
|
$order_num = $row['record_num'];
|
|
$status = $row['status'];
|
|
$user_num = $row['user_num'];
|
|
$type = $row['ordered_by_type'];
|
|
|
|
$balance = db_getVal("select sum(transaction_amount) as balance from user_account where school_num = $school_num and user_num = $user_num AND (deleted != 'Y' OR deleted IS NULL)");
|
|
if ($balance < 0) $balance = "-" . $currencySymbol . number_format(abs($balance),2);
|
|
else $balance = $currencySymbol . number_format($balance,2);
|
|
|
|
$class = 'data-odd';
|
|
if ($count % 2) $class = 'data-even';
|
|
$count++;
|
|
|
|
?>
|
|
<tr class='<?php echo($class) ?>'>
|
|
<td align='left'> <?php echo("$name ($balance - $type - $status)") ?></td>
|
|
<td align='center'><input type='checkbox' name='selected_orders[]' value='<?php echo($order_num) ?>' checked='checked' class='name-checkbox'></td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
}
|
|
}
|
|
?>
|
|
<tr>
|
|
<td align='left'> </td>
|
|
</tr>
|
|
<tr class='header'>
|
|
<td colspan='2' align='left'><?php displayLanguageText('TEXT-SELECTED-MENU-ITEMS'); ?></td>
|
|
</tr>
|
|
<?php
|
|
$items = db_query("SELECT * FROM hotlunch_menu_items WHERE school_num = $school_num AND menu_num = $menu_num ORDER BY sequence");
|
|
$count = 0;
|
|
while ($row = db_fetch_assoc($items)) {
|
|
$title = $row['item_title'];
|
|
$description = '';
|
|
if (array_key_exists('description', $row)) $description = $row['description'];
|
|
$item_num = $row['record_num'];
|
|
$item_type = $row['item_type'];
|
|
|
|
$class = 'data-odd';
|
|
if ($count % 2) $class = 'data-even';
|
|
|
|
if ($item_type == 'Item') {
|
|
$count++;
|
|
?>
|
|
<tr class='<?php echo($class) ?>'>
|
|
<td align='left'> <?php echo("$title") ?></td>
|
|
<td align='center'><input type='checkbox' name='selected_items[]' value='<?php echo($item_num) ?>' checked='checked'></td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
else {
|
|
?>
|
|
<tr class='heading'>
|
|
<td colspan='2' align='left'> <?php echo("$title") ?></td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
}
|
|
?>
|
|
<tr>
|
|
<td align='left'> </td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
<input type='hidden' name='action' value='order-deletion'>
|
|
<input type='hidden' name='naction' value='deletion-verified'>
|
|
<input type='hidden' name='schedule_num' value='<?php echo($schedule_num) ?>'>
|
|
<input type='hidden' name='menu_num' value='<?php echo($menu_num) ?>'>
|
|
<input type='button' name='button' class='btn btn--primary' onClick="formConfirmation();" value="<?php displayLanguageText('TEXT-DELETE-SELECTED'); ?>">
|
|
</form>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
|
|
<script language='javascript'>
|
|
function formConfirmation() {
|
|
var msg = "<?php displayLanguageText('TEXT-CONFIRM-DELETE') ?>";
|
|
msg = msg+'\n'+"<?php echo(str_replace('"','\"',$schedule_name)) ?>"+'\n'+"<?php echo(str_replace('"','\"',$curr_mtitle)) ?>";
|
|
var answer = confirm(msg);
|
|
if (answer) document.getElementById("deleteorderform").submit();
|
|
}
|
|
</script>
|
|
|
|
<?php
|
|
}
|
|
|
|
|
|
//
|
|
// If classes have been selected then display the students from those classes
|
|
//
|
|
if (array_key_exists('selected_orders',$_POST)) $selected_orders = $_POST['selected_orders'];
|
|
if (array_key_exists('selected_items',$_POST)) $selected_items = $_POST['selected_items'];
|
|
|
|
if (isset($selected_orders) && is_array($selected_orders)) writeLog("Orders: ".count($selected_orders));
|
|
if (isset($selected_items) && is_array($selected_items)) writeLog("Items: ".count($selected_items));
|
|
|
|
if (isset($naction) && $naction == 'deletion-verified' && isset($selected_orders) && isset($selected_items) && count($selected_orders) > 0 && count($selected_items) > 0) {
|
|
?>
|
|
<table width='650' class='content-table'>
|
|
<tr class='heading'>
|
|
<td colspan='2' align='center'><?php displayLanguageText('TEXT-ORDERS-UPDATED'); ?></td>
|
|
</tr>
|
|
<tr class='heading'>
|
|
<td align='left' width='75%'><?php echo($GlobalText['StudentName']); ?></td>
|
|
<td align='center'><?php displayLanguageText('TEXT-STATUS'); ?></td>
|
|
</tr>
|
|
<?php
|
|
$count = 0;
|
|
$today = date("Y-m-d",time());
|
|
$menu_items = implode(",",$selected_items);
|
|
for ($i = 0; $i < count($selected_orders); $i++) {
|
|
$order_num = $selected_orders[$i];
|
|
writeLog("Order Num: $order_num");
|
|
|
|
// Update order items
|
|
$query = "UPDATE hotlunch_order_items SET active = 'N' " .
|
|
"WHERE school_num = $school_num " .
|
|
"AND menu_num = $menu_num " .
|
|
"AND order_num = $order_num " .
|
|
"AND menu_item_num IN ($menu_items)";
|
|
writeLog($query);
|
|
db_query($query);
|
|
|
|
// Get order total
|
|
$query = "select sum(extended_price) " .
|
|
"from hotlunch_order_items " .
|
|
"where school_num = $school_num " .
|
|
"and order_num = $order_num " .
|
|
"and schedule_num = $schedule_num " .
|
|
"and active != 'N'";
|
|
$order_subtotal = floatval(db_getVal($query));
|
|
|
|
$pnum = 0;
|
|
$disc = 0;
|
|
$total = 0;
|
|
$paid = 0;
|
|
$status = '';
|
|
|
|
// Get order
|
|
$results = db_query("SELECT * FROM hotlunch_order_header WHERE record_num = $order_num");
|
|
if (db_num_rows($results)) {
|
|
$row = db_fetch_array($results);
|
|
$pnum = $row['ordered_by_num'];
|
|
$disc = $row['discount_amount'];
|
|
$total = $row['order_total'];
|
|
$paid = $row['amount_paid'];
|
|
$status = $row['status'];
|
|
}
|
|
|
|
$amount_paid = $paid;
|
|
if ($status == 'Paid' || $total == $paid || $paid > $total) $amount_paid = $total;
|
|
|
|
// Calculate new order total
|
|
$order_total = $order_subtotal;
|
|
if ($disc > 0 && $order_subtotal > $disc) $order_total = $order_subtotal - $disc;
|
|
$change_amount = $total - $order_total;
|
|
|
|
$order_subtotal = number_format($order_subtotal,2);
|
|
$order_total = number_format($order_total,2);
|
|
$amount_paid = number_format($amount_paid,2);
|
|
|
|
// Log the change in order total
|
|
if ($change_amount > 0) {
|
|
$user_num = intval(db_getVal("SELECT user_num FROM people WHERE school_num = $base_school_num AND record_num = $pnum"));
|
|
$entered_time = time();
|
|
$trx_time = date("Y-m-d H:i:s",$entered_time);
|
|
|
|
$totals = calcOrderTotal($order_num,$schedule_num,'Y');
|
|
|
|
$logmsg = 'Order Items Deleted';
|
|
$additional_note = "#$order_num - Previous Order Total: $currencySymbol" . $total .
|
|
" => New Order Total: $currencySymbol" . $totals['order_total'];
|
|
$lognote = db_escape_string("#$order_num - $curr_mtitle: $currencySymbol" . number_format($change_amount,2) . '<br>' . $additional_note);
|
|
|
|
$query = "INSERT INTO user_account " .
|
|
"(school_num,user_num,schedule_num,transaction_datetime,transaction_type,note,transaction_amount,transaction_fee,payment_method,payment_reference,order_payments,deleted,entered_time,transaction_status) " .
|
|
"VALUES ($school_num,$user_num,$schedule_num,'$trx_time','TRX Note','$logmsg - $lognote',0,0,NULL,'',NULL,'N',$entered_time,'Closed')";
|
|
db_query($query);
|
|
$rnum = db_insert_id();
|
|
|
|
db_query("UPDATE user_account SET additional_note = '" . db_escape_string($additional_note) . "' WHERE record_num = $rnum");
|
|
|
|
logOrderChange($order_num, "ORDER ITEM DELETED", "hotlunch.order_deletion.php");
|
|
|
|
// Get person's name
|
|
$name = db_getVal("SELECT concat(first_name,' ',last_name) FROM people WHERE record_num = $pnum");
|
|
|
|
$class = 'data-odd';
|
|
if ($i % 2) $class = 'data-even';
|
|
$count++;
|
|
?>
|
|
<tr class='<?php echo($class) ?>'>
|
|
<td align='left'><?php echo($name) ?></td>
|
|
<td align='center'><?php displayLanguageText('TEXT-UPDATED'); ?></td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
}
|
|
?>
|
|
</table>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<?php
|
|
|
|
// Update menu totals
|
|
$query = "SELECT sum(extended_price) AS order_revenue FROM hotlunch_order_items " .
|
|
"WHERE school_num = $school_num " .
|
|
"AND schedule_num = $schedule_num " .
|
|
"AND menu_num = $menu_num " .
|
|
"and active = 'Y'";
|
|
$results = db_query($query);
|
|
$r = db_fetch_assoc($results);
|
|
$menu_order_revenue = floatval($r['order_revenue']);
|
|
|
|
db_query("UPDATE hotlunch_menu_dates SET order_revenue = $menu_order_revenue WHERE record_num = $menu_num");
|
|
|
|
}
|
|
|
|
|
|
//
|
|
// Display the menu selection
|
|
//
|
|
?>
|
|
<form method='post' action='/'>
|
|
<table width='90%' cellpadding='5' cellspacing='1'>
|
|
<tr>
|
|
<td width='35%' align='right'>Menu Date: </td>
|
|
<td align='left'>
|
|
<select name='menu_num'>
|
|
<?php
|
|
$query = "select * from hotlunch_menu_dates " .
|
|
"where school_num = $school_num " .
|
|
"and schedule_num = $schedule_num " .
|
|
"order by sequence,menu_date";
|
|
$results = db_query($query);
|
|
|
|
$selected_date = 'N';
|
|
while ($row = db_fetch_array($results)) {
|
|
$mtitle = $row['menu_title'];
|
|
$mdate = dateString('default',strtotime($row['menu_date']));
|
|
$record_num = $row['record_num'];
|
|
|
|
if ($hotlunch_schedule['display_menu_date'] == 'Y') $mtitle .= " - $mdate";
|
|
|
|
$selected = "";
|
|
if (isset($menu_num) && $menu_num == $record_num) {
|
|
$selected_date = 'Y';
|
|
$selected = " selected='selected'";
|
|
}
|
|
echo(" <option value='$record_num'$selected>$mtitle</option>\n");
|
|
}
|
|
?>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align='center' colspan='2'><input type='submit' name='button' class='btn btn--primary' value="<?php displayLanguageText('TEXT-CHANGE-MENU-DATE'); ?>"></td>
|
|
</tr>
|
|
</table>
|
|
<input type='hidden' name='action' value='order-deletion'>
|
|
<input type='hidden' name='schedule_num' value='<?php echo($schedule_num) ?>'>
|
|
</form>
|
|
<br>
|
|
<form method='post' action='/'>
|
|
<table width='650' class='content-table'>
|
|
<tr>
|
|
<td align='center'><b><?php echo("$schedule_name - $curr_mtitle"); ?></b></td>
|
|
</tr>
|
|
<tr class='heading'>
|
|
<td colspan='2' align='center'>
|
|
<?php displayLanguageText('TEXT-SELECT-CLASSES'); ?>
|
|
</td>
|
|
</tr>
|
|
<tr class='data-odd'>
|
|
<td align='left'><b><?php displayLanguageText('TEXT-SELECT-ALL-CLASSES'); ?></b> :: </td>
|
|
<td align='center'><input type='checkbox' name='select_all_classes' id='select_all_classes' value='Y'></td>
|
|
</tr>
|
|
<?php
|
|
// Display the classes
|
|
$query = "select * from classes " .
|
|
"where school_num = $base_school_num " .
|
|
"order by sequence";
|
|
$results = db_query($query);
|
|
|
|
$count = 0;
|
|
$classes = array();
|
|
while ($row = db_fetch_array($results)) {
|
|
$class_num = $row['record_num'];
|
|
$class_info = getClassInfo($class_num);
|
|
$num_orders = getNumClassOrders($class_num,$schedule_num);
|
|
if ($num_orders > 0) $classes[] = "class_$class_num";
|
|
|
|
$class = 'data-even';
|
|
if ($count % 2) $class = 'data-odd';
|
|
$count++;
|
|
|
|
?>
|
|
<tr class='<?php echo($class) ?>'>
|
|
<td align='left'><?php echo($class_info) ?> (<?php echo($num_orders . ' ' . getLanguageText('TEXT-ORDERS')) ?>) :: </td>
|
|
<?php if ($num_orders > 0) { ?>
|
|
<td align='center'><input type='checkbox' name='class_<?php echo($class_num) ?>' id='class_<?php echo($class_num) ?>' class='class-checkbox' value='Y' onClick='clearOnePerBox();'></td>
|
|
<?php } else { ?>
|
|
<td> </td>
|
|
<?php } ?>
|
|
</tr>
|
|
<?php
|
|
}
|
|
|
|
$class = 'data-even';
|
|
if ($count % 2) $class = 'data-odd';
|
|
$count++;
|
|
|
|
$class_num = 0;
|
|
$num_orders = getNumClassOrders(0,$schedule_num);
|
|
if ($num_orders > 0) $classes[] = "class_$class_num";
|
|
?>
|
|
<tr class='<?php echo($class) ?>'>
|
|
<td align='left'><?php echo($GlobalText['Staff']) ?> (<?php echo($num_orders . ' ' . getLanguageText('TEXT-ORDERS')) ?>) :: </td>
|
|
<?php if ($num_orders > 0) { ?>
|
|
<td align='center'><input type='checkbox' name='class_<?php echo($class_num) ?>' id='class_<?php echo($class_num) ?>' class='class-checkbox' value='Y' onClick='clearOnePerBox();'></td>
|
|
<?php } else { ?>
|
|
<td> </td>
|
|
<?php } ?>
|
|
<?php
|
|
|
|
$class_num = 1;
|
|
$num_orders = getNumClassOrders(1,$schedule_num);
|
|
if ($num_orders > 0) {
|
|
$class = 'data-even';
|
|
if ($count % 2) $class = 'data-odd';
|
|
$count++;
|
|
|
|
$classes[] = "class_$class_num";
|
|
?>
|
|
<tr class='<?php echo($class) ?>'>
|
|
<td align='left'><?php displayLanguageText('TEXT-CUSTOMER'); ?> (<?php echo($num_orders . ' ' . getLanguageText('TEXT-ORDERS')) ?>) :: </td>
|
|
<td align='center'><input type='checkbox' name='class_<?php echo($class_num) ?>' id='class_<?php echo($class_num) ?>' class='class-checkbox' value='Y' onClick='clearOnePerBox();'></td>
|
|
<?php
|
|
}
|
|
|
|
$class = 'data-even';
|
|
if ($count % 2) $class = 'data-odd';
|
|
$count++;
|
|
?>
|
|
<tr class='<?php echo($class) ?>'>
|
|
<td align='left' valign='top'><?php displayLanguageText('TEXT-ORDER-STATUS'); ?> :: </td>
|
|
<td>
|
|
<?php BuildFileCheckbox("order_status.txt","order_status",'',"<br>") ?>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
<input type='hidden' name='action' value='order-deletion'>
|
|
<input type='hidden' name='naction' value='verify'>
|
|
<input type='hidden' name='schedule_num' value='<?php echo($schedule_num) ?>'>
|
|
<input type='hidden' name='menu_num' value='<?php echo($menu_num) ?>'>
|
|
<input type='hidden' name='schedule_num' value='<?php echo($schedule_num) ?>'>
|
|
<input type='submit' name='button' class='btn btn--primary' value="<?php displayLanguageText('TEXT-DELETE-ORDERS'); ?>">
|
|
</form>
|
|
<br>
|
|
<?php
|
|
|
|
?>
|
|
|
|
<?php include "hotlunch_orders.print_buttons.php"; ?>
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
|
|
<?php include "include/ajax.Setup.php" ?>
|
|
|
|
$("#select_all_classes").change(function() {
|
|
var cb = $(this).prop('checked');
|
|
|
|
if (cb) {
|
|
$(".class-checkbox").prop('checked',true);
|
|
}
|
|
else {
|
|
$(".class-checkbox").prop('checked',false);
|
|
}
|
|
});
|
|
|
|
$("#select_all_people").change(function() {
|
|
var cb = $(this).prop('checked');
|
|
|
|
if (cb) {
|
|
$(".name-checkbox").prop('checked',true);
|
|
}
|
|
else {
|
|
$(".name-checkbox").prop('checked',false);
|
|
}
|
|
});
|
|
|
|
});
|
|
</script>
|
|
<?php
|
|
endTemplate();
|
|
?>
|