Purchase Order View: fixed dates, added overdue delivery marker.
[fa-stable.git] / purchasing / includes / ui / grn_ui.inc
index dc84b609637e157b0ceb3071cd74dcae19f3f0f0..1112ce077f1e0cadcd72a137be1826c5f30bf25f 100644 (file)
@@ -13,8 +13,8 @@
 
 function display_grn_summary(&$po)
 {
-       global $Refs;
-    start_table(TABLESTYLE2, "width=90%");
+
+   start_table(TABLESTYLE2, "width='90%'");
 
     start_row();
        label_cells(_("Supplier"), $po->supplier_name, "class='tableheader2'");
@@ -25,7 +25,7 @@ function display_grn_summary(&$po)
     label_cells(_("For Purchase Order"), get_trans_view_str(ST_PURCHORDER, $po->order_no),
        "class='tableheader2'");
 
-       label_cells(_("Ordered On"), $po->orig_order_date, "class='tableheader2'");
+       label_cells(_("Delivery Date"), $po->orig_order_date, "class='tableheader2'"); // FIXME: delivery date
        end_row();
 
        start_row();
@@ -45,8 +45,8 @@ function display_grn_summary(&$po)
 function edit_grn_summary(&$po)
 {
        global $Refs;
-
-       start_outer_table(TABLESTYLE2, "width=80%");
+       
+       start_outer_table(TABLESTYLE2, "width='80%'");
 
        table_section(1);
                label_row(_("Supplier"), $po->supplier_name);
@@ -60,7 +60,7 @@ function edit_grn_summary(&$po)
 
        table_section(2);
        if (!isset($_POST['ref']))
-           $_POST['ref'] = $Refs->get_next(ST_SUPPRECEIVE);
+           $_POST['ref'] = $Refs->get_next(ST_SUPPRECEIVE, null, array('supplier' => $po->supplier_id, 'date' => Today()));
        ref_row(_("Reference"), 'ref', '', null);
 
         if (!isset($_POST['Location']))
@@ -74,8 +74,6 @@ function edit_grn_summary(&$po)
        date_row(_("Date Items Received"), 'DefaultReceivedDate', '', true, 0, 0, 0, '', true);
 
        table_section(3);
-               // currently this is related order supp reference
-//             ref_row(_("Supplier's Reference"), 'supp_ref', _("Supplier's Reference"));
                label_row(_("Supplier's Reference"), $po->supp_ref);
 
                label_row(_("Delivery Address"), $po->delivery_address);