- page(_("View Sales Quotation"), true, false, "", $js);
+ page(_($help_context = "View Sales Quotation"), true, false, "", $js);
- page(_("View Sales Order"), true, false, "", $js);
+ page(_($help_context = "View Sales Order"), true, false, "", $js);
$th = array(_("#"), _("Ref"), _("Date"), _("Total"));
table_header($th);
$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']);
$th = array(_("#"), _("Ref"), _("Date"), _("Total"));
table_header($th);
$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']);
$th = array(_("#"), _("Ref"), _("Date"), _("Total"));
table_header($th);
$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']);
$display_total = price_format($items_total + $_SESSION['View']->freight_cost);
label_row(_("Shipping"), price_format($_SESSION['View']->freight_cost),
$display_total = price_format($items_total + $_SESSION['View']->freight_cost);
label_row(_("Shipping"), price_format($_SESSION['View']->freight_cost),
label_row(_("Total Order Value"), $display_total, "align=right colspan=6",
label_row(_("Total Order Value"), $display_total, "align=right colspan=6",