5 include($path_to_root . "/purchasing/includes/po_class.inc");
7 include($path_to_root . "/includes/session.inc");
8 page(_("View Purchase Order Delivery"), true);
10 include($path_to_root . "/purchasing/includes/purchasing_ui.inc");
12 if (!isset($_GET['trans_no']))
14 die ("<BR>" . _("This page must be called with a Purchase Order Delivery number to review."));
17 $purchase_order = new purch_order;
18 read_grn($_GET["trans_no"], $purchase_order);
20 display_heading(_("Purchase Order Delivery") . " #" . $_GET['trans_no']);
22 display_grn_summary($purchase_order);
24 display_heading2(_("Line Details"));
26 start_table("colspan=9 $table_style width=90%");
27 $th = array(_("Item Code"), _("Item Description"), _("Delivery Date"), _("Quantity"),
28 _("Unit"), _("Price"), _("Line Total"), _("Quantity Invoiced"));
33 $k = 0; //row colour counter
35 foreach ($purchase_order->line_items as $stock_item)
38 $line_total = $stock_item->qty_received * $stock_item->price;
40 alt_table_row_color($k);
42 label_cell($stock_item->stock_id);
43 label_cell($stock_item->item_description);
44 label_cell($stock_item->req_del_date, "nowrap align=right");
45 qty_cell($stock_item->qty_received);
46 label_cell($stock_item->units);
47 amount_cell($stock_item->price);
48 amount_cell($line_total);
49 qty_cell($stock_item->qty_inv);
52 $total += $line_total;
55 $display_total = number_format2($total,user_price_dec());
56 label_row(_("Total Excluding Tax/Shipping"), $display_total,
57 "colspan=6", "nowrap align=right");
61 is_voided_display(25, $_GET['trans_no'], _("This delivery has been voided."));