Пример #1
0
function gl_inquiry_controls()
{
    $dim = get_company_pref('use_dimension');
    start_form();
    start_table(TABLESTYLE_NOBORDER);
    $date = today();
    if (!isset($_POST['TransFromDate'])) {
        $_POST['TransFromDate'] = begin_month($date);
    }
    if (!isset($_POST['TransToDate'])) {
        $_POST['TransToDate'] = end_month($date);
    }
    date_cells(_("From:"), 'TransFromDate');
    date_cells(_("To:"), 'TransToDate');
    if ($dim >= 1) {
        dimensions_list_cells(_("Dimension") . " 1:", 'Dimension', null, true, " ", false, 1);
    }
    if ($dim > 1) {
        dimensions_list_cells(_("Dimension") . " 2:", 'Dimension2', null, true, " ", false, 2);
    }
    check_cells(_("No zero values"), 'NoZero', null);
    check_cells(_("Only balances"), 'Balance', null);
    submit_cells('Show', _("Show"), '', '', 'default');
    end_table();
    end_form();
}
Пример #2
0
function gl_inquiry_controls()
{
    $dim = get_company_pref('use_dimension');
    start_form();
    start_table(TABLESTYLE_NOBORDER);
    start_row();
    gl_all_accounts_list_cells(_("Account:"), 'account', null, false, false, _("All Accounts"));
    date_cells(_("from:"), 'TransFromDate', '', null, -30);
    date_cells(_("to:"), 'TransToDate');
    end_row();
    end_table();
    start_table(TABLESTYLE_NOBORDER);
    start_row();
    if ($dim >= 1) {
        dimensions_list_cells(_("Dimension") . " 1:", 'Dimension', null, true, " ", false, 1);
    }
    if ($dim > 1) {
        dimensions_list_cells(_("Dimension") . " 2:", 'Dimension2', null, true, " ", false, 2);
    }
    small_amount_cells(_("Amount min:"), 'amount_min', null, " ");
    small_amount_cells(_("Amount max:"), 'amount_max', null, " ");
    submit_cells('Show', _("Show"), '', '', 'default');
    end_row();
    end_table();
    echo '<hr>';
    end_form();
}
Пример #3
0
function gl_inquiry_controls()
{
    start_form();
    start_table("class='tablestyle_noborder'");
    date_cells(tr("From:"), 'TransFromDate', null, -30);
    date_cells(tr("To:"), 'TransToDate');
    check_cells(tr("No zero values"), 'NoZero', null);
    submit_cells('Show', tr("Show"));
    end_table();
    end_form();
}
Пример #4
0
function tax_inquiry_controls()
{
    start_form();
    start_table(TABLESTYLE_NOBORDER);
    start_row();
    date_cells(_("from:"), 'TransFromDate', '', null, -30);
    date_cells(_("to:"), 'TransToDate');
    submit_cells('Show', _("Show"), '', '', 'default');
    end_row();
    end_table();
    end_form();
}
function inquiry_controls()
{
    global $Ajax;
    $dim = get_company_pref('use_dimension');
    start_table(TABLESTYLE_NOBORDER);
    $date = today();
    if (!isset($_POST['TransFromDate'])) {
        $_POST['TransFromDate'] = begin_month($date);
    }
    if (!isset($_POST['TransToDate'])) {
        $_POST['TransToDate'] = end_month($date);
    }
    date_cells(_("From:"), 'TransFromDate');
    date_cells(_("To:"), 'TransToDate');
    type_list_cells(_("Category: "), 'typeId', null, true);
    $r = set();
    account_list_cells(_(""), 'accountId', $r);
    submit_cells('submit_submit', _("Generate Report"), true, '', 'default');
    //submit_cells('RefreshInquiry', _("Search"),'',_('Refresh Inquiry'), 'default');
    end_table();
}
Пример #6
0
function gl_inquiry_controls()
{
    global $table_style2;
    $dim = get_company_pref('use_dimension');
    start_form();
    //start_table($table_style2);
    start_table("class='tablestyle_noborder'");
    start_row();
    gl_all_accounts_list_cells(tr("Account:"), 'account', null);
    date_cells(tr("from:"), 'TransFromDate', null, -30);
    date_cells(tr("to:"), 'TransToDate');
    submit_cells('Show', tr("Show"));
    end_row();
    if ($dim >= 1) {
        dimensions_list_row(tr("Dimension") . " 1", 'Dimension', null, true, " ", false, 1);
    }
    if ($dim > 1) {
        dimensions_list_row(tr("Dimension") . " 2", 'Dimension2', null, true, " ", false, 2);
    }
    end_table();
    end_form();
}
        if (count($invs) > 0) {
            $ar = array('PARAM_0' => $min . "-" . ST_SALESINVOICE, 'PARAM_1' => $max . "-" . ST_SALESINVOICE, 'PARAM_2' => "", 'PARAM_3' => 0, 'PARAM_4' => 0, 'PARAM_5' => "", 'PARAM_6' => $def_print_orientation);
            display_note(print_link(sprintf(_("&Print Recurrent Invoices # %s - # %s"), $min, $max), 107, $ar), 0, 1);
            $ar['PARAM_3'] = 1;
            // email
            display_note(print_link(sprintf(_("&Email Recurrent Invoices # %s - # %s"), $min, $max), 107, $ar), 0, 1);
        }
    } else {
        display_error(_("The entered date is not in fiscal year."));
    }
}
$result = get_recurrent_invoices();
start_form();
start_table(TABLESTYLE_NOBORDER);
start_row();
date_cells(_("Invoice date:"), 'date', '');
end_row();
end_table();
start_table(TABLESTYLE, "width=70%");
$th = array(_("Description"), _("Template No"), _("Customer"), _("Branch") . "/" . _("Group"), _("Days"), _("Monthly"), _("Begin"), _("End"), _("Last Created"), "");
table_header($th);
$k = 0;
$today = add_days($_POST['date'], 1);
$due = false;
while ($myrow = db_fetch($result)) {
    $begin = sql2date($myrow["begin"]);
    $end = sql2date($myrow["end"]);
    $last_sent = calculate_from($myrow);
    $due_date = add_months($last_sent, $myrow['monthly']);
    $due_date = add_days($due_date, $myrow['days']);
    $overdue = date1_greater_date2($today, $due_date) && date1_greater_date2($today, $begin) && date1_greater_date2($end, $today);
Пример #8
0
    $js .= get_js_date_picker();
}
if ($use_popup_windows) {
    $js .= get_js_open_window(900, 500);
}
page(_($help_context = "Disbursement/Journal Voucher Inquiry"), false, false, "", $js);
if (isset($_GET['UpdatedID'])) {
    $trans_no = $_GET['AddedID'];
    display_notification_centered(_("Check voucher entry has been edited") . " #{$trans_no}");
}
start_form();
start_table(TABLESTYLE_NOBORDER);
start_row();
booklet_type_row_list(_("Select type: "), 'type');
text_cells(_("Voucher #"), 'voucher_no');
date_cells(_("From:"), 'FromDate', '', null, 0, -1, 0);
submit_cells('RefreshInquiry', _("Search"), '', _('Refresh Inquiry'), 'default');
end_row();
end_table();
br(3);
//------------------------------------------------------------------------------------------------
function type_name($dummy, $type)
{
    global $systypes_array;
    return $systypes_array[$type];
}
function voucher($row)
{
    $vouch = substr($row['YearDate'], 2) . "-" . str_pad($row['customized_no'], 4, 0, STR_PAD_LEFT);
    return $vouch;
}
        if (get_post('bank_date')) {
            // if it is the last updated bank statement retrieve ending balance
            $row = get_ending_reconciled($_POST['bank_account'], $_POST['bank_date']);
            if ($row) {
                $_POST["end_balance"] = price_format($row["ending_reconcile_balance"]);
            }
        }
    }
}
echo "<hr>";
div_start('summary');
start_table(TABLESTYLE);
$th = array(_("Reconcile Date"), _("Beginning<br>Balance"), _("Ending<br>Balance"), _("Account<br>Total"), _("Reconciled<br>Amount"), _("Difference"));
table_header($th);
start_row();
date_cells("", "reconcile_date", _('Date of bank statement to reconcile'), get_post('bank_date') == '', 0, 0, 0, null, true);
amount_cells_ex("", "beg_balance", 15);
amount_cells_ex("", "end_balance", 15);
$reconciled = input_num('reconciled');
$difference = input_num("end_balance") - input_num("beg_balance") - $reconciled;
amount_cell($total);
amount_cell($reconciled, false, '', "reconciled");
amount_cell($difference, false, '', "difference");
end_row();
end_table();
div_end();
echo "<hr>";
//------------------------------------------------------------------------------------------------
if (!isset($_POST['bank_account'])) {
    $_POST['bank_account'] = "";
}
Пример #10
0
    $_POST['TransToDate'] = $_GET['ToDate'];
}
//------------------------------------------------------------------------------------------------
if (!@$_GET['popup']) {
    start_form();
}
if (!isset($_POST['supplier_id'])) {
    $_POST['supplier_id'] = get_global_supplier();
}
start_table(TABLESTYLE_NOBORDER);
start_row();
if (!@$_GET['popup']) {
    supplier_list_cells(_("Select a supplier:"), 'supplier_id', null, true, false, false, !@$_GET['popup']);
}
date_cells(_("From:"), 'TransAfterDate', '', null, -30);
date_cells(_("To:"), 'TransToDate');
supp_transactions_list_cell("filterType", null, true);
submit_cells('RefreshInquiry', _("Search"), '', _('Refresh Inquiry'), 'default');
end_row();
end_table();
set_global_supplier($_POST['supplier_id']);
//------------------------------------------------------------------------------------------------
function display_supplier_summary($supplier_record)
{
    $past1 = get_company_pref('past_due_days');
    $past2 = 2 * $past1;
    $nowdue = "1-" . $past1 . " " . _('Days');
    $pastdue1 = $past1 + 1 . "-" . $past2 . " " . _('Days');
    $pastdue2 = _('Over') . " " . $past2 . " " . _('Days');
    start_table(TABLESTYLE, "width='80%'");
    $th = array(_("Currency"), _("Terms"), _("Current"), $nowdue, $pastdue1, $pastdue2, _("Total Balance"));
Пример #11
0
function inquiry_controls()
{
    $dim = get_company_pref('use_dimension');
    start_table(TABLESTYLE_NOBORDER);
    $date = today();
    if (!isset($_POST['TransFromDate'])) {
        $_POST['TransFromDate'] = begin_month($date);
    }
    if (!isset($_POST['TransToDate'])) {
        $_POST['TransToDate'] = end_month($date);
    }
    date_cells(_("From:"), 'TransFromDate');
    date_cells(_("To:"), 'TransToDate');
    //Compare Combo
    global $sel;
    $sel = array(_("Accumulated"), _("Period Y-1"), _("Budget"));
    echo "<td>" . _("Compare to") . ":</td>\n";
    echo "<td>";
    echo array_selector('Compare', null, $sel);
    echo "</td>\n";
    if ($dim >= 1) {
        dimensions_list_cells(_("Dimension") . " 1:", 'Dimension', null, true, " ", false, 1);
    }
    if ($dim > 1) {
        dimensions_list_cells(_("Dimension") . " 2:", 'Dimension2', null, true, " ", false, 2);
    }
    submit_cells('Show', _("Show"), '', '', 'default');
    end_table();
    hidden('AccGrp');
}
Пример #12
0
if (!isset($_POST['ship_via'])) {
    $_POST['ship_via'] = $_SESSION['Items']->ship_via;
}
label_cell(_("Shipping Company"), "class='tableheader2'");
shippers_list_cells(null, 'ship_via', $_POST['ship_via']);
if (!isset($_POST['InvoiceDate']) || !is_date($_POST['InvoiceDate'])) {
    $_POST['InvoiceDate'] = new_doc_date();
    if (!is_date_in_fiscalyear($_POST['InvoiceDate'])) {
        $_POST['InvoiceDate'] = end_fiscalyear();
    }
}
date_cells(_("Date"), 'InvoiceDate', '', $_SESSION['Items']->trans_no == 0, 0, 0, 0, "class='tableheader2'", true);
if (!isset($_POST['due_date']) || !is_date($_POST['due_date'])) {
    $_POST['due_date'] = get_invoice_duedate($_SESSION['Items']->payment, $_POST['InvoiceDate']);
}
date_cells(_("Due Date"), 'due_date', '', null, 0, 0, 0, "class='tableheader2'");
/*
if ($dim > 1) 
	label_cells(_("Dimension"). " 2", get_dimension_string($_SESSION['Items']->dimension2_id), "class='tableheader2'");
else if ($dim > 0)
	label_cell("&nbsp;", "colspan=2");
*/
if ($dim > 1) {
    label_cell(_("Dimension") . " 2:", "class='tableheader2'");
    $_POST['dimension2_id'] = $_SESSION['Items']->dimension2_id;
    dimensions_list_cells(null, 'dimension2_id', null, true, ' ', false, 2, false);
} else {
    hidden('dimension2_id', 0);
}
end_row();
end_table();
Пример #13
0
if ($use_date_picker) {
    $js .= get_js_date_picker();
}
page(tr("Customer Transactions"), false, false, "", $js);
if (isset($_GET['customer_id'])) {
    $_POST['customer_id'] = $_GET['customer_id'];
}
//------------------------------------------------------------------------------------------------
start_form();
if (!isset($_POST['customer_id'])) {
    $_POST['customer_id'] = get_global_customer();
}
start_table("class='tablestyle_noborder'");
customer_list_cells(tr("Select a customer: "), 'customer_id', $_POST['customer_id'], true);
date_cells(tr("From:"), 'TransAfterDate', null, -30);
date_cells(tr("To:"), 'TransToDate', null, 1);
if (!isset($_POST['filterType'])) {
    $_POST['filterType'] = 0;
}
cust_allocations_list_cells(null, 'filterType', $_POST['filterType'], true);
submit_cells('Refresh Inquiry', tr("Search"));
end_table();
end_form();
set_global_customer($_POST['customer_id']);
//------------------------------------------------------------------------------------------------
function display_customer_summary($customer_record)
{
    global $table_style;
    $past1 = get_company_pref('past_due_days');
    $past2 = 2 * $past1;
    if ($customer_record["dissallow_invoices"] != 0) {
Пример #14
0
}
label_cell(tr("Delivery From"), "class='tableheader2'");
locations_list_cells(null, 'Location', $_POST['Location'], false, true);
if (!isset($_POST['ship_via'])) {
    $_POST['ship_via'] = $_SESSION['Items']->ship_via;
}
label_cell(tr("Shipping Company"), "class='tableheader2'");
shippers_list_cells(null, 'ship_via', $_POST['ship_via']);
// set this up here cuz it's used to calc qoh
if (!isset($_POST['DispatchDate']) || !is_date($_POST['DispatchDate'])) {
    $_POST['DispatchDate'] = Today();
    if (!is_date_in_fiscalyear($_POST['DispatchDate'])) {
        $_POST['DispatchDate'] = end_fiscalyear();
    }
}
date_cells(tr("Date"), 'DispatchDate', $_POST['DispatchDate'], 0, 0, 0, "class='tableheader2'");
end_row();
end_table();
echo "</td><td>";
// outer table
start_table("{$table_style} width=90%");
if (!isset($_POST['due_date']) || !is_date($_POST['due_date'])) {
    $_POST['due_date'] = get_invoice_duedate($_SESSION['Items']->customer_id, $_POST['DispatchDate']);
}
date_row(tr("Invoice Dead-line"), 'due_date', $_POST['due_date'], 0, 0, 0, "class='tableheader2'");
end_table();
echo "</td></tr>";
end_table(1);
// outer table
display_heading(tr("Delivery Items"));
start_table("{$table_style} width=80%");
Пример #15
0
function inquiry_controls()
{
    $dim = get_company_pref('use_dimension');
    start_table(TABLESTYLE_NOBORDER);
    date_cells(_("As at:"), 'TransToDate');
    if ($dim >= 1) {
        dimensions_list_cells(_("Dimension") . " 1:", 'Dimension', null, true, " ", false, 1);
    }
    if ($dim > 1) {
        dimensions_list_cells(_("Dimension") . " 2:", 'Dimension2', null, true, " ", false, 2);
    }
    submit_cells('Show', _("Show"), '', '', 'default');
    end_table();
    hidden('TransFromDate');
    hidden('AccGrp');
}
    $js .= get_js_date_picker();
}
page(_($help_context = "Customer Allocation Inquiry"), false, false, "", $js);
if (isset($_GET['customer_id'])) {
    $_POST['customer_id'] = $_GET['customer_id'];
}
//------------------------------------------------------------------------------------------------
if (!isset($_POST['customer_id'])) {
    $_POST['customer_id'] = get_global_customer();
}
start_form();
start_table(TABLESTYLE_NOBORDER);
start_row();
customer_list_cells(_("Select a customer: "), 'customer_id', $_POST['customer_id'], true);
date_cells(_("from:"), 'TransAfterDate', '', null, -30);
date_cells(_("to:"), 'TransToDate', '', null, 1);
cust_allocations_list_cells(_("Type:"), 'filterType', null);
check_cells(" " . _("show settled:"), 'showSettled', null);
submit_cells('RefreshInquiry', _("Search"), '', _('Refresh Inquiry'), 'default');
set_global_customer($_POST['customer_id']);
end_row();
end_table();
//------------------------------------------------------------------------------------------------
function check_overdue($row)
{
    return $row['OverDue'] == 1 && abs($row["TotalAmount"]) - $row["Allocated"] != 0;
}
function order_link($row)
{
    return $row['order_'] > 0 ? get_customer_trans_view_str(ST_SALESORDER, $row['order_']) : "";
}
Пример #17
0
    dimensions_list_cells(null, 'dimension_id', null, true, ' ', false, 1, false);
    end_row();
} else {
    hidden('dimension_id', 0);
}
if ($dim > 1) {
    start_row();
    label_cell(_("Dimension") . " 2:", "class='tableheader2'");
    dimensions_list_cells(null, 'dimension2_id', null, true, ' ', false, 2, false);
    end_row();
} else {
    hidden('dimension2_id', 0);
}
//---------
start_row();
date_cells(_("Invoice Dead-line"), 'due_date', '', null, 0, 0, 0, "class='tableheader2'");
end_row();
end_table();
echo "</td></tr>";
end_table(1);
// outer table
$row = get_customer_to_order($_SESSION['Items']->customer_id);
if ($row['dissallow_invoices'] == 1) {
    display_error(_("The selected customer account is currently on hold. Please contact the credit control personnel to discuss."));
    end_form();
    end_page();
    exit;
}
display_heading(_("Delivery Items"));
div_start('Items');
start_table(TABLESTYLE, "width=80%");
Пример #18
0
    if ($show_dates) {
        $Ajax->addDisable(true, 'OrdersAfterDate', $disable);
        $Ajax->addDisable(true, 'OrdersToDate', $disable);
    }
    $Ajax->activate('orders_tbl');
}
if (!@$_GET['popup']) {
    start_form();
}
start_table(TABLESTYLE_NOBORDER);
start_row();
ref_cells(_("#:"), 'OrderNumber', '', null, '', true);
ref_cells(_("Ref"), 'OrderReference', '', null, '', true);
if ($show_dates) {
    date_cells(_("from:"), 'OrdersAfterDate', '', null, -30);
    date_cells(_("to:"), 'OrdersToDate', '', null, 1);
}
locations_list_cells(_("Location:"), 'StockLocation', null, true);
if ($show_dates) {
    end_row();
    end_table();
    start_table(TABLESTYLE_NOBORDER);
    start_row();
}
stock_items_list_cells(_("Item:"), 'SelectStockFromList', null, true);
if (!@$_GET['popup']) {
    customer_list_cells(_("Select a customer: "), 'customer_id', null, true);
}
if ($trans_type == ST_SALESQUOTE) {
    check_cells(_("Show All:"), 'show_all');
}
Пример #19
0
if ($use_date_picker) {
    $js .= get_js_date_picker();
}
page(tr("Inventory Item Movement"), false, false, "", $js);
if (isset($_GET['stock_id'])) {
    $_POST['stock_id'] = $_GET['stock_id'];
}
start_form(false, true);
if (!isset($_POST['stock_id'])) {
    $_POST['stock_id'] = get_global_stock_item();
}
start_table("class='tablestyle_noborder'");
stock_items_list_cells(tr("Item:"), 'stock_id', $_POST['stock_id']);
locations_list_cells(tr("From Location:"), 'StockLocation', null);
date_cells(tr("From:"), 'AfterDate', null, -30);
date_cells(tr("To:"), 'BeforeDate');
submit_cells('ShowMoves', tr("Show Movements"));
end_table();
end_form();
set_global_stock_item($_POST['stock_id']);
$before_date = date2sql($_POST['BeforeDate']);
$after_date = date2sql($_POST['AfterDate']);
$sql = "SELECT type, trans_no, tran_date, person_id, qty, reference\n\tFROM stock_moves\n\tWHERE loc_code='" . $_POST['StockLocation'] . "'\n\tAND tran_date >= '" . $after_date . "'\n\tAND tran_date <= '" . $before_date . "'\n\tAND stock_id = '" . $_POST['stock_id'] . "' ORDER BY tran_date,trans_id";
$result = db_query($sql, "could not query stock moves");
check_db_error("The stock movements for the selected criteria could not be retrieved", $sql);
start_table("{$table_style} width=70%");
$th = array(tr("Type"), tr("#"), tr("Reference"), tr("Date"), tr("Detail"), tr("Quantity In"), tr("Quantity Out"), tr("Quantity On Hand"));
table_header($th);
$sql = "SELECT SUM(qty) FROM stock_moves WHERE stock_id='" . $_POST['stock_id'] . "'\n\tAND loc_code='" . $_POST['StockLocation'] . "'\n\tAND tran_date < '" . $after_date . "'";
$before_qty = db_query($sql, "The starting quantity on hand could not be calculated");
$before_qty_row = db_fetch_row($before_qty);
Пример #20
0
        set_focus('type_');
    }
    $Ajax->activate('dim_table');
}
//--------------------------------------------------------------------------------------
if (isset($_GET["stock_id"])) {
    $_POST['SelectedStockItem'] = $_GET["stock_id"];
}
//--------------------------------------------------------------------------------------
start_form(false, false, $_SERVER['PHP_SELF'] . "?outstanding_only={$outstanding_only}");
start_table(TABLESTYLE_NOBORDER);
start_row();
ref_cells(_("Reference:"), 'OrderNumber', '', null, '', true);
number_list_cells(_("Type"), 'type_', null, 1, 2, _("All"));
date_cells(_("From:"), 'FromDate', '', null, 0, 0, -5);
date_cells(_("To:"), 'ToDate');
check_cells(_("Only Overdue:"), 'OverdueOnly', null);
if (!$outstanding_only) {
    check_cells(_("Only Open:"), 'OpenOnly', null);
} else {
    $_POST['OpenOnly'] = 1;
}
submit_cells('SearchOrders', _("Search"), '', '', 'default');
end_row();
end_table();
$dim = get_company_pref('use_dimension');
function view_link($row)
{
    return get_dimensions_trans_view_str(ST_DIMENSION, $row["id"]);
}
function sum_dimension($row)
Пример #21
0
elseif ($_POST['order_view_mode']=='InvoiceTemplates')
{
  	$action .= "?InvoiceTemplates=" . $_POST['InvoiceTemplates'];
}
elseif ($_POST['order_view_mode']=='DeliveryTemplates')
{
  	$action .= "?DeliveryTemplates=" . $_POST['InvoiceTemplates'];
}
*/
start_form(false, false, $_SERVER['PHP_SELF'] . SID);
start_table("class='tablestyle_noborder'");
start_row();
ref_cells(tr("#:"), 'OrderNumber');
if ($_POST['order_view_mode'] != 'DeliveryTemplates' && $_POST['order_view_mode'] != 'InvoiceTemplates') {
    date_cells(tr("from:"), 'OrdersAfterDate', null, -30);
    date_cells(tr("to:"), 'OrdersToDate', null, 1);
}
locations_list_cells(tr("Location:"), 'StockLocation', null, true);
stock_items_list_cells(tr("Item:"), 'SelectStockFromList', null, true);
submit_cells('SearchOrders', tr("Search"));
hidden('order_view_mode', $_POST['order_view_mode']);
end_row();
end_table();
end_form();
//---------------------------------------------------------------------------------------------
if (isset($_POST['SelectStockFromList']) && $_POST['SelectStockFromList'] != "" && $_POST['SelectStockFromList'] != reserved_words::get_all()) {
    $selected_stock_item = $_POST['SelectStockFromList'];
} else {
    unset($selected_stock_item);
}
//---------------------------------------------------------------------------------------------
Пример #22
0
    $_POST['customer_id'] = $_GET['customer_id'];
}
//------------------------------------------------------------------------------------------------
if (!@$_GET['popup']) {
    start_form();
}
if (!isset($_POST['customer_id'])) {
    $_POST['customer_id'] = get_global_customer();
}
start_table(TABLESTYLE_NOBORDER);
start_row();
if (!@$_GET['popup']) {
    customer_list_cells(_("Select a customer: "), 'customer_id', null, true, false, false, !@$_GET['popup']);
}
date_cells(_("From:"), 'TransAfterDate', '', null, -30);
date_cells(_("To:"), 'TransToDate', '', null);
if (!isset($_POST['filterType'])) {
    $_POST['filterType'] = 0;
}
cust_allocations_list_cells(null, 'filterType', $_POST['filterType'], true);
submit_cells('RefreshInquiry', _("Search"), '', _('Refresh Inquiry'), 'default');
end_row();
end_table();
set_global_customer($_POST['customer_id']);
//------------------------------------------------------------------------------------------------
function display_customer_summary($customer_record)
{
    $past1 = get_company_pref('past_due_days');
    $past2 = 2 * $past1;
    if ($customer_record["dissallow_invoices"] != 0) {
        echo "<center><font color=red size=4><b>" . _("CUSTOMER ACCOUNT IS ON HOLD") . "</font></b></center>";
Пример #23
0
    if ($disable) {
        $Ajax->addFocus(true, 'order_number');
    } else {
        $Ajax->addFocus(true, 'OrdersAfterDate');
    }
    $Ajax->activate('orders_tbl');
}
//---------------------------------------------------------------------------------------------
if (!@$_GET['popup']) {
    start_form();
}
start_table(TABLESTYLE_NOBORDER);
start_row();
ref_cells(_("#:"), 'order_number', '', null, '', true);
date_cells(_("from:"), 'OrdersAfterDate', '', null, -30);
date_cells(_("to:"), 'OrdersToDate');
locations_list_cells(_("into location:"), 'StockLocation', null, true);
end_row();
end_table();
start_table(TABLESTYLE_NOBORDER);
start_row();
stock_items_list_cells(_("for item:"), 'SelectStockFromList', null, true);
submit_cells('SearchOrders', _("Search"), '', _('Select documents'), 'default');
end_row();
end_table(1);
//---------------------------------------------------------------------------------------------
if (isset($_POST['order_number'])) {
    $order_number = $_POST['order_number'];
}
if (isset($_POST['SelectStockFromList']) && $_POST['SelectStockFromList'] != "" && $_POST['SelectStockFromList'] != ALL_TEXT) {
    $selected_stock_item = $_POST['SelectStockFromList'];
Пример #24
0
    $Ajax->addDisable(true, 'SelectStockFromList', $disable);
    // if search is not empty rewrite table
    if ($disable) {
        $Ajax->addFocus(true, 'DeliveryNumber');
    } else {
        $Ajax->addFocus(true, 'DeliveryAfterDate');
    }
    $Ajax->activate('deliveries_tbl');
}
//-----------------------------------------------------------------------------------
start_form(false, false, $_SERVER['PHP_SELF'] . "?OutstandingOnly=" . $_POST['OutstandingOnly']);
start_table(TABLESTYLE_NOBORDER);
start_row();
ref_cells(_("#:"), 'DeliveryNumber', '', null, '', true);
date_cells(_("from:"), 'DeliveryAfterDate', '', null, -30);
date_cells(_("to:"), 'DeliveryToDate', '', null, 1);
locations_list_cells(_("Location:"), 'StockLocation', null, true);
end_row();
end_table();
start_table(TABLESTYLE_NOBORDER);
start_row();
stock_items_list_cells(_("Item:"), 'SelectStockFromList', null, true);
customer_list_cells(_("Select a customer: "), 'customer_id', null, true, true);
submit_cells('SearchOrders', _("Search"), '', _('Select documents'), 'default');
hidden('OutstandingOnly', $_POST['OutstandingOnly']);
end_row();
end_table(1);
//---------------------------------------------------------------------------------------------
if (isset($_POST['SelectStockFromList']) && $_POST['SelectStockFromList'] != "" && $_POST['SelectStockFromList'] != ALL_TEXT) {
    $selected_stock_item = $_POST['SelectStockFromList'];
} else {
Пример #25
0
} else {
    $outstanding_only = 0;
    page(tr("Search Dimensions"), false, false, "", $js);
}
//--------------------------------------------------------------------------------------
if (isset($_GET["stock_id"])) {
    $_POST['SelectedStockItem'] = $_GET["stock_id"];
}
//--------------------------------------------------------------------------------------
start_form(false, true, $_SERVER['PHP_SELF'] . "?outstanding_only=" . $outstanding_only . SID);
start_table("class='tablestyle_noborder'");
start_row();
ref_cells(tr("Reference:"), 'OrderNumber', null);
number_list_cells(tr("Type"), 'type_', null, 0, 2);
date_cells(tr("From:"), 'FromDate', null, 0, 0, -5);
date_cells(tr("To:"), 'ToDate');
check_cells(tr("Only Overdue:"), 'OverdueOnly', null);
if (!$outstanding_only) {
    check_cells(tr("Only Open:"), 'OpenOnly', null);
} else {
    $_POST['OpenOnly'] = 1;
}
submit_cells('SearchOrders', tr("Search"));
end_row();
end_table();
end_form();
$dim = get_company_pref('use_dimension');
$sql = "SELECT * FROM dimensions WHERE id > 0";
if ($dim == 1) {
    $sql .= " AND type_=1";
}
Пример #26
0
if (!isset($_POST['ship_via'])) {
    $_POST['ship_via'] = $_SESSION['Items']->ship_via;
}
label_cell(tr("Shipping Company"), "class='tableheader2'");
shippers_list_cells(null, 'ship_via', $_POST['ship_via']);
if (!isset($_POST['InvoiceDate']) || !is_date($_POST['InvoiceDate'])) {
    $_POST['InvoiceDate'] = Today();
    if (!is_date_in_fiscalyear($_POST['InvoiceDate'])) {
        $_POST['InvoiceDate'] = end_fiscalyear();
    }
}
date_cells(tr("Date"), 'InvoiceDate', $_POST['InvoiceDate'], 0, 0, 0, "class='tableheader2'");
if (!isset($_POST['due_date']) || !is_date($_POST['due_date'])) {
    $_POST['due_date'] = get_invoice_duedate($_SESSION['Items']->customer_id, $_POST['InvoiceDate']);
}
date_cells(tr("Due Date"), 'due_date', $_POST['due_date'], 0, 0, 0, "class='tableheader2'");
end_row();
end_table();
display_heading(tr("Invoice Items"));
start_table("{$table_style} width=80%");
$th = array(tr("Item Code"), tr("Item Description"), tr("Date"), tr("Description"), tr("Delivered"), tr("Units"), tr("Invoiced"), tr("This Invoice"), tr("Price"), tr("Tax Type"), tr("Discount"), tr("Total"));
if ($is_batch_invoice) {
    $th[] = tr("DN");
    $th[] = "";
}
if ($is_edition) {
    $th[4] = tr("Credited");
}
table_header($th);
$k = 0;
$has_marked = false;