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']));
}
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=".ST_CUSTDELIVERY." AND order_=" . $_GET['trans_no'];
- $result = db_query($sql,"The related delivery notes could not be retreived");
+ $result = get_related_documents(ST_CUSTDELIVERY, $_GET['trans_no']);
$delivery_total = 0;
$k = 0;
$th = array(_("#"), _("Ref"), _("Date"), _("Total"));
table_header($th);
- $sql = "SELECT * FROM ".TB_PREF."debtor_trans WHERE type=".ST_SALESINVOICE." AND order_=" . $_GET['trans_no'];
- $result = db_query($sql,"The related invoices could not be retreived");
+ $result = get_related_documents(ST_SALESINVOICE, $_GET['trans_no']);
$invoices_total = 0;
$k = 0;
$th = array(_("#"), _("Ref"), _("Date"), _("Total"));
table_header($th);
- $sql = "SELECT * FROM ".TB_PREF."debtor_trans WHERE type=".ST_CUSTCREDIT." AND order_=" . $_GET['trans_no'];
- $result = db_query($sql,"The related credit notes could not be retreived");
+ $result = get_related_documents(ST_CUSTCREDIT, $_GET['trans_no']);
$credits_total = 0;
$k = 0;
$display_total = price_format($items_total + $_SESSION['View']->freight_cost);
label_row(_("Shipping"), price_format($_SESSION['View']->freight_cost),
- "align=right colspan=6", "nowrap align=right");
+ "align=right colspan=6", "nowrap align=right", 1);
label_row(_("Total Order Value"), $display_total, "align=right colspan=6",
- "nowrap align=right");
+ "nowrap align=right", 1);
end_table(2);