$path_to_root = "../..";
include_once $path_to_root . "/purchasing/includes/purchasing_db.inc";
include_once $path_to_root . "/includes/session.inc";
include_once $path_to_root . "/purchasing/includes/purchasing_ui.inc";
$js = "";
if ($use_popup_windows) {
    $js .= get_js_open_window(900, 500);
}
page(_($help_context = "View Supplier Invoice"), true, false, "", $js);
if (isset($_GET["trans_no"])) {
    $trans_no = $_GET["trans_no"];
} elseif (isset($_POST["trans_no"])) {
    $trans_no = $_POST["trans_no"];
}
$supp_trans = new supp_trans(ST_SUPPINVOICE);
read_supp_invoice($trans_no, ST_SUPPINVOICE, $supp_trans);
$supplier_curr_code = get_supplier_currency($supp_trans->supplier_id);
display_heading(_("SUPPLIER INVOICE") . " # " . $trans_no);
echo "<br>";
start_table(TABLESTYLE, "width=95%");
start_row();
label_cells(_("Supplier"), $supp_trans->supplier_name, "class='tableheader2'");
label_cells(_("Reference"), $supp_trans->reference, "class='tableheader2'");
label_cells(_("Supplier's Reference"), $supp_trans->supp_reference, "class='tableheader2'");
end_row();
start_row();
label_cells(_("Invoice Date"), $supp_trans->tran_date, "class='tableheader2'");
label_cells(_("Due Date"), $supp_trans->due_date, "class='tableheader2'");
if (!is_company_currency($supplier_curr_code)) {
    label_cells(_("Currency"), $supplier_curr_code, "class='tableheader2'");
}
$path_to_root = "../..";
include_once $path_to_root . "/purchasing/includes/purchasing_db.inc";
include_once $path_to_root . "/includes/session.inc";
include_once $path_to_root . "/purchasing/includes/purchasing_ui.inc";
$js = "";
if ($use_popup_windows) {
    $js .= get_js_open_window(900, 500);
}
page(_($help_context = "View Supplier Credit Note"), true, false, "", $js);
if (isset($_GET["trans_no"])) {
    $trans_no = $_GET["trans_no"];
} elseif (isset($_POST["trans_no"])) {
    $trans_no = $_POST["trans_no"];
}
$supp_trans = new supp_trans(ST_SUPPCREDIT);
read_supp_invoice($trans_no, ST_SUPPCREDIT, $supp_trans);
display_heading("<font color=red>" . _("SUPPLIER CREDIT NOTE") . " # " . $trans_no . "</font>");
echo "<br>";
start_table(TABLESTYLE, "width=95%");
start_row();
label_cells(_("Supplier"), $supp_trans->supplier_name, "class='tableheader2'");
label_cells(_("Reference"), $supp_trans->reference, "class='tableheader2'");
label_cells(_("Supplier's Reference"), $supp_trans->supp_reference, "class='tableheader2'");
end_row();
start_row();
label_cells(_("Invoice Date"), $supp_trans->tran_date, "class='tableheader2'");
label_cells(_("Due Date"), $supp_trans->due_date, "class='tableheader2'");
label_cells(_("Currency"), get_supplier_currency($supp_trans->supplier_id), "class='tableheader2'");
end_row();
comments_display_row(ST_SUPPCREDIT, $trans_no);
end_table(1);
Beispiel #3
0
<?php

$page_security = 1;
$path_to_root = "../..";
include_once $path_to_root . "/purchasing/includes/purchasing_db.inc";
include_once $path_to_root . "/includes/session.inc";
page(tr("View Supplier Credit Note"), true);
include_once $path_to_root . "/purchasing/includes/purchasing_ui.inc";
if (isset($_GET["trans_no"])) {
    $trans_no = $_GET["trans_no"];
} elseif (isset($_POST["trans_no"])) {
    $trans_no = $_POST["trans_no"];
}
$supp_trans = new supp_trans();
$supp_trans->is_invoice = false;
read_supp_invoice($trans_no, 21, $supp_trans);
display_heading(tr("SUPPLIER CREDIT NOTE") . " # " . $trans_no);
echo "<br>";
start_table($table_style2);
start_row();
label_cells(tr("Supplier"), $supp_trans->supplier_name, "class='tableheader2'");
label_cells(tr("Reference"), $supp_trans->reference, "class='tableheader2'");
label_cells(tr("Supplier's Reference"), $supp_trans->supp_reference, "class='tableheader2'");
end_row();
start_row();
label_cells(tr("Invoice Date"), $supp_trans->tran_date, "class='tableheader2'");
label_cells(tr("Due Date"), $supp_trans->due_date, "class='tableheader2'");
label_cells(tr("Currency"), get_supplier_currency($supp_trans->supplier_id), "class='tableheader2'");
end_row();
comments_display_row(21, $trans_no);
end_table(1);