Added company switch for placing company logo on certain views.
[fa-stable.git] / purchasing / view / view_po.php
index 193bfa471c8a89bfe7dbcf9be47d7673d6cc0b4a..38064894344c4230b2e2201f3631189ba9a17ac8 100644 (file)
@@ -17,7 +17,7 @@ include($path_to_root . "/includes/session.inc");
 include($path_to_root . "/purchasing/includes/purchasing_ui.inc");
 
 $js = "";
-if ($use_popup_windows)
+if ($SysPrefs->use_popup_windows)
        $js .= get_js_open_window(900, 500);
 page(_($help_context = "View Purchase Order"), true, false, "", $js);
 
@@ -27,6 +27,9 @@ if (!isset($_GET['trans_no']))
        die ("<br>" . _("This page must be called with a purchase order number to review."));
 }
 
+if (!empty($SysPrefs->prefs['company_logo_on_views']))
+       company_logo_on_view();
+
 display_heading(_("Purchase Order") . " #" . $_GET['trans_no']);
 
 $purchase_order = new purch_order;
@@ -35,12 +38,12 @@ read_po($_GET['trans_no'], $purchase_order);
 echo "<br>";
 display_po_summary($purchase_order, true);
 
-start_table(TABLESTYLE, "width=90%", 6);
+start_table(TABLESTYLE, "width='90%'", 6);
 echo "<tr><td valign=top>"; // outer table
 
 display_heading2(_("Line Details"));
 
-start_table(TABLESTYLE, "colspan=9 width=100%");
+start_table(TABLESTYLE, "width='100%'");
 
 $th = array(_("Item Code"), _("Item Description"), _("Quantity"), _("Unit"), _("Price"),
        _("Requested By"), _("Line Total"), _("Quantity Received"), _("Quantity Invoiced"));
@@ -123,7 +126,7 @@ if (db_num_rows($grns_result) > 0)
        label_cell(sql2date($myrow["delivery_date"]));
        end_row();
     }
-    end_table();;
+    end_table();
 }
 
 $invoice_result = get_po_invoices_credits($_GET['trans_no']);
@@ -154,11 +157,10 @@ if (db_num_rows($invoice_result) > 0)
 echo "</td></tr>";
 
 end_table(1); // outer table
-//_vd($purchase_order);
+
 display_allocations_to(PT_SUPPLIER, $purchase_order->supplier_id, ST_PURCHORDER, $purchase_order->order_no, $total + $tax_total);
 
 //----------------------------------------------------------------------------------------------------
 
 end_page(true, false, false, ST_PURCHORDER, $_GET['trans_no']);
 
-?>