Example #1
0
        $da = add_months($da, 1);
    }
    commit_transaction();
    if (isset($_POST['add'])) {
        display_notification_centered(tr("The Budget has been saved."));
    } else {
        display_notification_centered(tr("The Budget has been deleted."));
    }
    //meta_forward($_SERVER['PHP_SELF']);
}
//-------------------------------------------------------------------------------------
start_form();
if (db_has_gl_accounts()) {
    $dim = get_company_pref('use_dimension');
    start_table($table_style2);
    fiscalyears_list_row(tr("Fiscal Year:"), 'fyear', null);
    gl_all_accounts_list_row(tr("Account Code:"), 'account', null);
    if (!isset($_POST['dim1'])) {
        $_POST['dim1'] = 0;
    }
    if (!isset($_POST['dim2'])) {
        $_POST['dim2'] = 0;
    }
    if ($dim == 2) {
        dimensions_list_row(tr("Dimension") . " 1", 'dim1', $_POST['dim1'], true, null, false, 1);
        dimensions_list_row(tr("Dimension") . " 2", 'dim2', $_POST['dim2'], true, null, false, 2);
    } else {
        if ($dim == 1) {
            dimensions_list_row(tr("Dimension"), 'dim1', $_POST['dim1'], true, null, false, 1);
            hidden('dim2', 0);
        } else {
$_POST['auto_curr_reval'] = $myrow['auto_curr_reval'];
$_POST['del_coy_logo'] = 0;
$_POST['bcc_email'] = $myrow["bcc_email"];
start_outer_table(TABLESTYLE2);
table_section(1);
text_row_ex(_("Name (to appear on reports):"), 'coy_name', 42, 50);
textarea_row(_("Address:"), 'postal_address', $_POST['postal_address'], 35, 6);
text_row_ex(_("Domicile:"), 'domicile', 25, 55);
text_row_ex(_("Phone Number:"), 'phone', 25, 55);
text_row_ex(_("Fax Number:"), 'fax', 25);
email_row_ex(_("Email Address:"), 'email', 25, 55);
email_row_ex(_("BCC Address for all outgoing mails:"), 'bcc_email', 25, 55);
text_row_ex(_("Official Company Number:"), 'coy_no', 25);
text_row_ex(_("GSTNo:"), 'gst_no', 25);
currencies_list_row(_("Home Currency:"), 'curr_default', $_POST['curr_default']);
fiscalyears_list_row(_("Fiscal Year:"), 'f_year', $_POST['f_year']);
text_row_ex(_("Tax Periods:"), 'tax_prd', 10, 10, '', null, null, _('Months.'));
text_row_ex(_("Tax Last Period:"), 'tax_last', 10, 10, '', null, null, _('Months back.'));
table_section(2);
label_row(_("Company Logo:"), $_POST['coy_logo']);
file_row(_("New Company Logo (.jpg)") . ":", 'pic', 'pic');
check_row(_("Delete Company Logo:"), 'del_coy_logo', $_POST['del_coy_logo']);
number_list_row(_("Use Dimensions:"), 'use_dimension', null, 0, 2);
sales_types_list_row(_("Base for auto price calculations:"), 'base_sales', $_POST['base_sales'], false, _('No base price list'));
text_row_ex(_("Add Price from Std Cost:"), 'add_pct', 10, 10, '', null, null, "%");
$curr = get_currency($_POST['curr_default']);
text_row_ex(_("Round to nearest:"), 'round_to', 10, 10, '', null, null, $curr['hundreds_name']);
label_row("", " ");
check_row(_("Search Item List"), 'no_item_list', null);
check_row(_("Search Customer List"), 'no_customer_list', null);
check_row(_("Search Supplier List"), 'no_supplier_list', null);