\n"); $school_num = $school_record['record_num']; include "form.messages.php"; // Handle the recovery of any posted menu dates if ($naction == 'recover') { $selected_menus = array(); if (array_key_exists('selected_menus', $_POST)) $selected_menus = $_POST['selected_menus']; if (count($selected_menus) > 0) { ?>
$order_total) $amount_paid = $order_total; // Calculate new order total $order_total = $order_subtotal; if ($disc > 0 && $order_subtotal > $disc) $order_total = $order_subtotal - $disc; $order_subtotal = floatval($order_subtotal); $order_total = floatval($order_total); $amount_paid = floatval($amount_paid); $today = date("Y-m-d",time()); // Update order header db_query("UPDATE hotlunch_order_header " . "SET order_total = $order_total, " . "order_subtotal = $order_subtotal, " . "amount_paid = $amount_paid, " . "updated_date = '$today' " . "WHERE record_num = $order_num"); // Update user account if ($pnum > 0) { $query = "update user_account " . "set transaction_amount = $order_total " . "where school_num = $school_num " . "and schedule_num = $schedule_num " . "and order_num = $order_num " . "and people_num = $pnum " . "and transaction_type = 'Order'"; db_query($query); } } } } // Get all the menu dates for the selection list $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); ?>
::