Display colors according to late status.
[order_line_extra.git] / item_schedule.php
index 6a7614f78086963a7b8d3ddaf6880d578c87fcfb..95463a336264500ddf4d6611f2dc217907c3d96f 100644 (file)
@@ -18,7 +18,8 @@ include_once($path_to_root . "/includes/ui/ui_globals.inc");
 include_once($path_to_root . "/includes/ui/ui_input.inc");
 include_once($path_to_root . "/reporting/includes/reporting.inc");
 
-//include_once("includes/item_schedule.inc");
+//include_once("includes/item_scheduler.inc");
+include_once("hincludes/lib/php/Boot.class.php");
 
 $page_security = 'SA_ORDERLINEX_EDIT';
 add_access_extensions();
@@ -41,21 +42,59 @@ if (isset($_GET['stock_id']))
        $_POST['stock_id'] = $_GET['stock_id'];
 }
 
-if (!@$_GET['popup'])
+//if (!@$_GET['popup'])
        start_form();
 
 if (!isset($_POST['stock_id']))
        $_POST['stock_id'] = get_global_stock_item();
 
-       stock_costable_items_list_cells(_("Item:"), 'stock_id', $_POST['stock_id']);
+$stock_id = $_POST['stock_id'];
+       stock_costable_items_list_cells(_("Item:"), 'stock_id', $stock_id);
 
 end_row();
-
 end_table(1);
 
+$scheduler = new ItemScheduler($stock_id, 'DEF');
+
+div_start('item_schedule');
+start_table(TABLESTYLE);
+$th = $scheduler->tableHeader();
+
+table_header($th);
+
+$scheduler->generateTable();
+
+end_table();
+div_end();
+
+
 submit_center_first('Update', _("Update"), true, '', 'default', true);
 submit_center_last('Cancel', _("Cancel"), true, '', 'cancel', true);
 
-       end_form();
-       end_page();
+
+
+end_form();
+end_page();
 ?>
+<style type='text/css'>
+tr.partial {
+       color: darkred;
+}
+
+tr.location {
+       font-weight: normal;
+               background: #8f8;
+       #color: blue;
+}
+tr.on_time {
+}
+
+tr.late {
+               background: #fc8;
+}
+
+tr.soldout {
+               background: pink;
+}
+
+</style>