Ejemplo n.º 1
0
$is_batch_invoice = count($_SESSION['Items']->src_docs) > 1;
$is_edition = $_SESSION['Items']->trans_type == ST_SALESINVOICE && $_SESSION['Items']->trans_no != 0;
start_form();
hidden('cart_id');
start_table(TABLESTYLE2, "width='80%'", 5);
start_row();
$colspan = 1;
$dim = get_company_pref('use_dimension');
if ($dim > 0) {
    $colspan = 3;
}
label_cells(_("Customer"), $_SESSION['Items']->customer_name, "class='tableheader2'");
label_cells(_("Branch"), get_branch_name($_SESSION['Items']->Branch), "class='tableheader2'");
if ($_SESSION['Items']->pos['credit_sale'] || $_SESSION['Items']->pos['cash_sale']) {
    $paymcat = !$_SESSION['Items']->pos['cash_sale'] ? PM_CREDIT : (!$_SESSION['Items']->pos['credit_sale'] ? PM_CASH : PM_ANY);
    label_cells(_("Payment terms:"), sale_payment_list('payment', $paymcat), "class='tableheader2'", "colspan={$colspan}");
} else {
    label_cells(_('Payment:'), $_SESSION['Items']->payment_terms['terms'], "class='tableheader2'", "colspan={$colspan}");
}
end_row();
start_row();
if ($_SESSION['Items']->trans_no == 0) {
    ref_cells(_("Reference"), 'ref', '', null, "class='tableheader2'");
} else {
    label_cells(_("Reference"), $_SESSION['Items']->reference, "class='tableheader2'");
}
//label_cells(_("Delivery Notes:"),
//get_customer_trans_view_str(ST_CUSTDELIVERY, array_keys($_SESSION['Items']->src_docs)), "class='tableheader2'");
label_cells(_("Sales Type"), $_SESSION['Items']->sales_type_name, "class='tableheader2'");
label_cells(_("Currency"), $_SESSION['Items']->customer_currency, "class='tableheader2'");
// 2010-09-03 Joe Hunt
 function sale_payment_list_cells($label, $name, $category, $selected_id = null, $submit_on_change = true)
 {
     $controls = sale_payment_list($name, $category, $selected_id, $submit_on_change);
     View::get()->addComboControls($label, $controls);
 }