X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=sales%2Fview%2Fview_sales_order.php;h=4529e1d421e1773db7b13ea1d4d0f79d3a4d388c;hb=d2cc0860eccf02eaefcd90731ac3af141a841529;hp=40902e445cd759d8486c870a0e0fbd688cf1dd27;hpb=0da4935c1fb5b588bfd7ead31f05069c9566eb8d;p=fa-stable.git diff --git a/sales/view/view_sales_order.php b/sales/view/view_sales_order.php index 40902e44..4529e1d4 100644 --- a/sales/view/view_sales_order.php +++ b/sales/view/view_sales_order.php @@ -23,14 +23,14 @@ $js = ""; if ($use_popup_windows) $js .= get_js_open_window(900, 600); -if ($_GET['trans_type'] == 32) +if ($_GET['trans_type'] == ST_SALESQUOTE) { - page(_("View Sales Quotation"), true, false, "", $js); + page(_($help_context = "View Sales Quotation"), true, false, "", $js); display_heading(sprintf(_("Sales Quotation #%d"),$_GET['trans_no'])); } else { - page(_("View Sales Order"), true, false, "", $js); + page(_($help_context = "View Sales Order"), true, false, "", $js); display_heading(sprintf(_("Sales Order #%d"),$_GET['trans_no'])); } @@ -44,7 +44,7 @@ $_SESSION['View'] = new Cart($_GET['trans_type'], $_GET['trans_no'], true); start_table("$table_style2 width=95%", 5); echo ""; display_heading2(_("Order Information")); -if ($_GET['trans_type'] != 32) +if ($_GET['trans_type'] != ST_SALESQUOTE) { echo ""; display_heading2(_("Deliveries")); @@ -64,7 +64,7 @@ label_cells(_("Deliver To Branch"), $_SESSION['View']->deliver_to, "class='table end_row(); start_row(); label_cells(_("Ordered On"), $_SESSION['View']->document_date, "class='tableheader2'"); -if ($_GET['trans_type'] == 32) +if ($_GET['trans_type'] == ST_SALESQUOTE) label_cells(_("Valid until"), $_SESSION['View']->due_date, "class='tableheader2'"); else label_cells(_("Requested Delivery"), $_SESSION['View']->due_date, "class='tableheader2'"); @@ -83,17 +83,18 @@ label_row(_("E-mail"), "email . "'>" . $_ label_row(_("Comments"), $_SESSION['View']->Comments, "class='tableheader2'", "colspan=3"); end_table(); -if ($_GET['trans_type'] != 32) +if ($_GET['trans_type'] != ST_SALESQUOTE) { echo ""; start_table($table_style); display_heading2(_("Delivery Notes")); + $th = array(_("#"), _("Ref"), _("Date"), _("Total")); table_header($th); - $sql = "SELECT * FROM ".TB_PREF."debtor_trans WHERE type=13 AND order_=" . $_GET['trans_no']; + $sql = "SELECT * FROM ".TB_PREF."debtor_trans WHERE type=".ST_CUSTDELIVERY." AND order_=".db_escape($_GET['trans_no']); $result = db_query($sql,"The related delivery notes could not be retreived"); $delivery_total = 0; @@ -126,7 +127,7 @@ if ($_GET['trans_type'] != 32) $th = array(_("#"), _("Ref"), _("Date"), _("Total")); table_header($th); - $sql = "SELECT * FROM ".TB_PREF."debtor_trans WHERE type=10 AND order_=" . $_GET['trans_no']; + $sql = "SELECT * FROM ".TB_PREF."debtor_trans WHERE type=".ST_SALESINVOICE." AND order_=".db_escape($_GET['trans_no']); $result = db_query($sql,"The related invoices could not be retreived"); $invoices_total = 0; @@ -158,7 +159,7 @@ if ($_GET['trans_type'] != 32) $th = array(_("#"), _("Ref"), _("Date"), _("Total")); table_header($th); - $sql = "SELECT * FROM ".TB_PREF."debtor_trans WHERE type=11 AND order_=" . $_GET['trans_no']; + $sql = "SELECT * FROM ".TB_PREF."debtor_trans WHERE type=".ST_CUSTCREDIT." AND order_=".db_escape($_GET['trans_no']); $result = db_query($sql,"The related credit notes could not be retreived"); $credits_total = 0; @@ -191,6 +192,8 @@ if ($_GET['trans_type'] != 32) end_table(); } echo "
"; +if ($_SESSION['View']->so_type == 1) + display_note(_("This Sales Order is used as a Template."), 0, 0, "class='currentfg'"); display_heading2(_("Line Details")); start_table("colspan=9 width=95% $table_style");