First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
require_once("include/globals.php");
|
||||
|
||||
if (SessionActive() != 1 || ! UserLoggedIn()) {
|
||||
header("Location: /");
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
// Start the template and output buffering
|
||||
startTemplate();
|
||||
$templatePageTitle = getLanguageText('TEXT-CONCESSION-ORDERS');
|
||||
$headerArgs = "";
|
||||
|
||||
|
||||
$school_name = $school_record['school_name'];
|
||||
|
||||
$ConcessionOrders = array();
|
||||
|
||||
$schedules = db_query("SELECT * FROM hotlunch_schedules WHERE school_num = $school_num ORDER BY start_order_datetime");
|
||||
while ($row = db_fetch_assoc($schedules)) {
|
||||
$schedule_num = $row['record_num'];
|
||||
$schedule_name = $row['schedule_name'];
|
||||
|
||||
$query = "SELECT * FROM hotlunch_order_header WHERE school_num = $school_num AND schedule_num = $schedule_num AND ordered_by_type = 'Concession'";
|
||||
$results = db_query($query);
|
||||
if (db_num_rows($results) == 1) {
|
||||
$order = db_fetch_assoc($results);
|
||||
$amount = $order['order_total'];
|
||||
$cost = $order['order_cost'];
|
||||
|
||||
$ConcessionOrders[] = array(
|
||||
$schedule_name,
|
||||
'$'.number_format($amount,2),
|
||||
'$'.number_format($cost,2),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$commands = array();
|
||||
$columnHeaders = array(getLanguageText('TEXT-SCHEDULE'), getLanguageText('TEXT-ORDER-TOTAL'), getLanguageText('TEXT-COST'));
|
||||
$columnAlign = array('left', 'right', 'right');
|
||||
|
||||
listDataCustom($ConcessionOrders, $columnHeaders, '', $commands, 'N', $columnAlign, array(), "", "");
|
||||
|
||||
endTemplate();
|
||||
?>
|
||||
Reference in new issue
Block a user