X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=purchasing%2Fview%2Fview_grn.php;h=b2d95bb8e26390226249069d414976456536ef51;hb=716ddd8b68b285b432e47626939165d9f6c48f90;hp=31126c97f05a5912fbc4917d7af73b478f11a108;hpb=a482c8ff040347dc7eb5a4962f23347053983f79;p=fa-stable.git diff --git a/purchasing/view/view_grn.php b/purchasing/view/view_grn.php index 31126c97..b2d95bb8 100644 --- a/purchasing/view/view_grn.php +++ b/purchasing/view/view_grn.php @@ -16,7 +16,7 @@ include($path_to_root . "/purchasing/includes/po_class.inc"); include($path_to_root . "/includes/session.inc"); $js = ""; -if ($use_popup_windows) +if ($SysPrefs->use_popup_windows) $js .= get_js_open_window(900, 500); page(_($help_context = "View Purchase Order Delivery"), true, false, "", $js); @@ -36,21 +36,31 @@ display_grn_summary($purchase_order); display_heading2(_("Line Details")); -start_table(TABLESTYLE, "colspan=9 width=90%"); -$th = array(_("Item Code"), _("Item Description"), _("Delivery Date"), _("Quantity"), +start_table(TABLESTYLE, "width='90%'"); +$th = array(_("Item Code"), _("Item Description"), _("Required by"), _("Quantity"), _("Unit"), _("Price"), _("Line Total"), _("Quantity Invoiced")); table_header($th); $total = 0; $k = 0; //row colour counter +$overdue_items = false; foreach ($purchase_order->line_items as $stock_item) { $line_total = $stock_item->qty_received * $stock_item->price; - alt_table_row_color($k); + // if overdue and outstanding quantities, then highlight as so + if (date1_greater_date2($purchase_order->orig_order_date, $stock_item->req_del_date)) + { + start_row("class='overduebg'"); + $overdue_items = true; + } + else + { + alt_table_row_color($k); + } label_cell($stock_item->stock_id); label_cell($stock_item->item_description); @@ -83,8 +93,10 @@ end_row(); end_table(1); +if ($overdue_items) + display_note(_("Marked items were delivered overdue."), 0, 0, "class='overduefg'"); + is_voided_display(ST_SUPPRECEIVE, $_GET['trans_no'], _("This delivery has been voided.")); end_page(true, false, false, ST_SUPPRECEIVE, $_GET['trans_no']); -?>