예제 #1
0
    }
    return true;
}
//-------------------------------------------------------------------------------------------------
if (isset($_POST['submit']) && can_process()) {
    update_company_prefs(get_post(array('retained_earnings_act', 'profit_loss_year_act', 'debtors_act', 'pyt_discount_act', 'creditors_act', 'freight_act', 'exchange_diff_act', 'bank_charge_act', 'default_sales_act', 'default_sales_discount_act', 'default_prompt_payment_act', 'default_inventory_act', 'default_cogs_act', 'default_adj_act', 'default_inv_sales_act', 'default_assembly_act', 'legal_text', 'past_due_days', 'default_workorder_required', 'default_dim_required', 'default_delivery_required', 'grn_clearing_act', 'allow_negative_stock' => 0, 'accumulate_shipping' => 0, 'po_over_receive' => 0.0, 'po_over_charge' => 0.0, 'default_credit_limit' => 0.0)));
    display_notification(_("The general GL setup has been updated."));
}
/* end of if submit */
//-------------------------------------------------------------------------------------------------
start_form();
start_outer_table(TABLESTYLE2);
table_section(1);
if (get_company_pref('grn_clearing_act') === null) {
    // available from 2.3.1, can be not defined on pre-2.4 installations
    set_company_pref('grn_clearing_act', 'glsetup.purchase', 'varchar', 15, 0);
    refresh_sys_prefs();
}
$myrow = get_company_prefs();
$_POST['retained_earnings_act'] = $myrow["retained_earnings_act"];
$_POST['profit_loss_year_act'] = $myrow["profit_loss_year_act"];
$_POST['debtors_act'] = $myrow["debtors_act"];
$_POST['creditors_act'] = $myrow["creditors_act"];
$_POST['freight_act'] = $myrow["freight_act"];
$_POST['pyt_discount_act'] = $myrow["pyt_discount_act"];
$_POST['exchange_diff_act'] = $myrow["exchange_diff_act"];
$_POST['bank_charge_act'] = $myrow["bank_charge_act"];
$_POST['default_sales_act'] = $myrow["default_sales_act"];
$_POST['default_sales_discount_act'] = $myrow["default_sales_discount_act"];
$_POST['default_prompt_payment_act'] = $myrow["default_prompt_payment_act"];
$_POST['default_inventory_act'] = $myrow["default_inventory_act"];
예제 #2
0
    if ($_POST['round_to'] <= 0) {
        $_POST['round_to'] = 1;
    }
    if ($input_error != 1) {
        update_company_prefs(get_post(array('coy_name', 'coy_no', 'gst_no', 'tax_prd', 'tax_last', 'postal_address', 'phone', 'fax', 'email', 'coy_logo', 'domicile', 'use_dimension', 'curr_default', 'f_year', 'no_item_list' => 0, 'no_customer_list' => 0, 'no_supplier_list' => 0, 'base_sales', 'time_zone' => 0, 'add_pct', 'round_to', 'login_tout', 'auto_curr_reval', 'bcc_email')));
        $_SESSION['wa_current_user']->timeout = $_POST['login_tout'];
        display_notification_centered(_("Company setup has been updated."));
    }
    set_focus('coy_name');
    $Ajax->activate('_page_body');
}
/* end of if submit */
//---------------------------------------------------------------------------------------------
if (get_company_pref('bcc_email') === null) {
    // available from 2.3.14, can be not defined on pre-2.4 installations
    set_company_pref('bcc_email', 'setup.company', 'varchar', 100, '');
    refresh_sys_prefs();
}
start_form(true);
$myrow = get_company_prefs();
$_POST['coy_name'] = $myrow["coy_name"];
$_POST['gst_no'] = $myrow["gst_no"];
$_POST['tax_prd'] = $myrow["tax_prd"];
$_POST['tax_last'] = $myrow["tax_last"];
$_POST['coy_no'] = $myrow["coy_no"];
$_POST['postal_address'] = $myrow["postal_address"];
$_POST['phone'] = $myrow["phone"];
$_POST['fax'] = $myrow["fax"];
$_POST['email'] = $myrow["email"];
$_POST['coy_logo'] = $myrow["coy_logo"];
$_POST['domicile'] = $myrow["domicile"];
예제 #3
0
파일: gl_setup.php 프로젝트: M-Shahbaz/FA
    update_company_prefs(get_post(array('retained_earnings_act', 'profit_loss_year_act', 'debtors_act', 'pyt_discount_act', 'creditors_act', 'freight_act', 'exchange_diff_act', 'bank_charge_act', 'default_sales_act', 'default_sales_discount_act', 'default_prompt_payment_act', 'default_inventory_act', 'default_cogs_act', 'default_adj_act', 'default_inv_sales_act', 'default_assembly_act', 'legal_text', 'past_due_days', 'default_workorder_required', 'default_dim_required', 'default_delivery_required', 'default_quote_valid_days', 'grn_clearing_act', 'allow_negative_stock' => 0, 'accumulate_shipping' => 0, 'po_over_receive' => 0.0, 'po_over_charge' => 0.0, 'default_credit_limit' => 0.0)));
    display_notification(_("The general GL setup has been updated."));
}
/* end of if submit */
//-------------------------------------------------------------------------------------------------
start_form();
start_outer_table(TABLESTYLE2);
table_section(1);
if (get_company_pref('grn_clearing_act') === null) {
    // available from 2.3.1, can be not defined on pre-2.4 installations
    set_company_pref('grn_clearing_act', 'glsetup.purchase', 'varchar', 15, 0);
    refresh_sys_prefs();
}
if (get_company_pref('default_quote_valid_days') === null) {
    // available from 2.3.23, can be not defined on pre-2.4 installations
    set_company_pref('default_quote_valid_days', 'glsetup.sales', 'smallint', 6, 30);
    refresh_sys_prefs();
}
$myrow = get_company_prefs();
$_POST['retained_earnings_act'] = $myrow["retained_earnings_act"];
$_POST['profit_loss_year_act'] = $myrow["profit_loss_year_act"];
$_POST['debtors_act'] = $myrow["debtors_act"];
$_POST['creditors_act'] = $myrow["creditors_act"];
$_POST['freight_act'] = $myrow["freight_act"];
$_POST['pyt_discount_act'] = $myrow["pyt_discount_act"];
$_POST['exchange_diff_act'] = $myrow["exchange_diff_act"];
$_POST['bank_charge_act'] = $myrow["bank_charge_act"];
$_POST['default_sales_act'] = $myrow["default_sales_act"];
$_POST['default_sales_discount_act'] = $myrow["default_sales_discount_act"];
$_POST['default_prompt_payment_act'] = $myrow["default_prompt_payment_act"];
$_POST['default_inventory_act'] = $myrow["default_inventory_act"];
예제 #4
0
    refresh_sys_prefs();
}
if (get_company_pref('paypal_area') === null) {
    set_company_pref('paypal_area', 'paypal.setup', 'int', 11, 0);
    refresh_sys_prefs();
}
if (get_company_pref('paypal_location') === null) {
    set_company_pref('paypal_location', 'paypal.setup', 'varchar', 5, '');
    refresh_sys_prefs();
}
if (get_company_pref('paypal_shipper') === null) {
    set_company_pref('paypal_shipper', 'paypal.setup', 'int', 11, '');
    refresh_sys_prefs();
}
if (get_company_pref('paypal_credit_status') === null) {
    set_company_pref('paypal_credit_status', 'paypal.setup', 'int', 11, '');
    refresh_sys_prefs();
}
$myrow = get_company_prefs();
$_POST['paypal_bank_id'] = $myrow["paypal_bank_id"];
$_POST['paypal_create_invoices'] = $myrow['paypal_create_invoices'];
$_POST['paypal_sales_act'] = $myrow["paypal_sales_act"];
$_POST['paypal_sales_tax_act'] = $myrow["paypal_sales_tax_act"];
$_POST['paypal_shipping_act'] = $myrow["paypal_shipping_act"];
$_POST['paypal_insurance_act'] = $myrow["paypal_insurance_act"];
$_POST['paypal_withdraw_id'] = $myrow["paypal_withdraw_id"];
$_POST['paypal_fee_act'] = $myrow["paypal_fee_act"];
$_POST['paypal_sales_type_id'] = $myrow["paypal_sales_type_id"];
$_POST['use_paypal_trn_id'] = $myrow['use_paypal_trn_id'];
$_POST['paypal_add_tax'] = $myrow['paypal_add_tax'];
$_POST['paypal_recpt_today'] = $myrow['paypal_recpt_today'];
    $init++;
}
if (get_company_pref('smtp_port') === null) {
    set_company_pref('smtp_port', 'system.mail', 'int', 11, 25);
    $init++;
}
if (get_company_pref('smtp_username') === null) {
    set_company_pref('smtp_username', 'system.mail', 'varchar', 60, '');
    $init++;
}
if (get_company_pref('smtp_password') === null) {
    set_company_pref('smtp_password', 'system.mail', 'varchar', 60, '');
    $init++;
}
if (get_company_pref('smtp_secure') === null) {
    set_company_pref('smtp_secure', 'system.mail', 'varchar', 10, 'none');
    $init++;
}
if ($init) {
    refresh_sys_prefs();
}
function can_process()
{
    if ($_POST['mail_type'] == 'MAIL') {
        return true;
    }
    $errors = 0;
    if (empty($_POST['smtp_host']) && $_POST['mail_type'] == 'SMTP') {
        $errors++;
        display_error(_("The SMTP host must be entered."));
    }