$_POST[$name] = $val; } set_focus('name'); } if (!isset($installed_extensions)) { $installed_extensions = array(); update_extensions($installed_extensions); } subpage_title(_('Company Settings')); start_table(TABLESTYLE); text_row_ex(_("Company Name:"), 'name', 30); text_row_ex(_("Admin Login:"******"Admin Password:"******"Reenter Password:"******"Select Chart of Accounts:"), 'coa'); languages_list_row(_("Select Default Language:"), 'lang'); end_table(1); submit_center_first('back', _('<< Back')); submit_center_last('set_admin', _('Continue >>')); break; case '6': // final screen subpage_title(_('SerbizHub Suite ERP has been installed successsfully.')); display_note(_('Please do not forget to remove install wizard folder.')); session_unset(); session_destroy(); hyperlink_no_params($path_to_root . '/index.php', _('Click here to start.')); break; } hidden('Tests'); hidden('Page');
table_section_title(_("Dateformat and Separators")); dateformats_list_row(_("Dateformat:"), "date_format", user_date_format()); dateseps_list_row(_("Date Separator:"), "date_sep", user_date_sep()); /* The array $dateseps is set up in config.php for modifications possible separators can be added by modifying the array definition by editing that file */ thoseps_list_row(_("Thousand Separator:"), "tho_sep", user_tho_sep()); /* The array $thoseps is set up in config.php for modifications possible separators can be added by modifying the array definition by editing that file */ decseps_list_row(_("Decimal Separator:"), "dec_sep", user_dec_sep()); /* The array $decseps is set up in config.php for modifications possible separators can be added by modifying the array definition by editing that file */ if (!isset($_POST['language'])) { $_POST['language'] = $_SESSION['language']->code; } table_section_title(_("Language")); languages_list_row(_("Language:"), 'language', $_POST['language']); table_section(2); table_section_title(_("Miscellaneous")); check_row(_("Show hints for new users:"), 'show_hints', user_hints()); check_row(_("Show GL Information:"), 'show_gl', user_show_gl_info()); check_row(_("Show Item Codes:"), 'show_codes', user_show_codes()); themes_list_row(_("Theme:"), "theme", user_theme()); /* The array $themes is set up in config.php for modifications possible separators can be added by modifying the array definition by editing that file */ pagesizes_list_row(_("Page Size:"), "page_size", user_pagesize()); tab_list_row(_("Start-up Tab"), 'startup_tab', user_startup_tab()); /* The array $pagesizes is set up in config.php for modifications possible separators can be added by modifying the array definition by editing that file */ if (!isset($_POST['print_profile'])) { $_POST['print_profile'] = user_print_profile(); }
function supplier_settings(&$supplier_id) { start_outer_table(TABLESTYLE2); table_section(1); if ($supplier_id) { //SupplierID exists - either passed when calling the form or from the form itself $myrow = get_supplier($_POST['supplier_id']); $_POST['supp_name'] = $myrow["supp_name"]; $_POST['supp_ref'] = $myrow["supp_ref"]; $_POST['address'] = $myrow["address"]; $_POST['supp_address'] = $myrow["supp_address"]; $_POST['gst_no'] = $myrow["gst_no"]; $_POST['website'] = $myrow["website"]; $_POST['supp_account_no'] = $myrow["supp_account_no"]; $_POST['bank_account'] = $myrow["bank_account"]; $_POST['dimension_id'] = $myrow["dimension_id"]; $_POST['dimension2_id'] = $myrow["dimension2_id"]; $_POST['curr_code'] = $myrow["curr_code"]; $_POST['payment_terms'] = $myrow["payment_terms"]; $_POST['credit_limit'] = price_format($myrow["credit_limit"]); $_POST['tax_group_id'] = $myrow["tax_group_id"]; $_POST['tax_included'] = $myrow["tax_included"]; $_POST['payable_account'] = $myrow["payable_account"]; $_POST['purchase_account'] = $myrow["purchase_account"]; $_POST['payment_discount_account'] = $myrow["payment_discount_account"]; $_POST['notes'] = $myrow["notes"]; $_POST['inactive'] = $myrow["inactive"]; } else { $_POST['supp_name'] = $_POST['supp_ref'] = $_POST['address'] = $_POST['supp_address'] = $_POST['tax_group_id'] = $_POST['website'] = $_POST['supp_account_no'] = $_POST['notes'] = ''; $_POST['dimension_id'] = 0; $_POST['dimension2_id'] = 0; $_POST['tax_included'] = 0; $_POST['sales_type'] = -1; $_POST['gst_no'] = $_POST['bank_account'] = ''; $_POST['payment_terms'] = ''; $_POST['credit_limit'] = price_format(0); $company_record = get_company_prefs(); $_POST['curr_code'] = $company_record["curr_default"]; $_POST['payable_account'] = $company_record["creditors_act"]; $_POST['purchase_account'] = ''; // default/item's cogs account $_POST['payment_discount_account'] = $company_record['pyt_discount_act']; } table_section_title(_("Basic Data")); text_row(_("Supplier Name:"), 'supp_name', null, 42, 40); text_row(_("Supplier Short Name:"), 'supp_ref', null, 30, 30); text_row(_("GSTNo:"), 'gst_no', null, 42, 40); link_row(_("Website:"), 'website', null, 35, 55); if ($supplier_id && !is_new_supplier($supplier_id) && (key_in_foreign_table($_POST['supplier_id'], 'supp_trans', 'supplier_id') || key_in_foreign_table($_POST['supplier_id'], 'purch_orders', 'supplier_id'))) { label_row(_("Supplier's Currency:"), $_POST['curr_code']); hidden('curr_code', $_POST['curr_code']); } else { currencies_list_row(_("Supplier's Currency:"), 'curr_code', null); } tax_groups_list_row(_("Tax Group:"), 'tax_group_id', null); text_row(_("Our Customer No:"), 'supp_account_no', null, 42, 40); table_section_title(_("Purchasing")); text_row(_("Bank Name/Account:"), 'bank_account', null, 42, 40); amount_row(_("Credit Limit:"), 'credit_limit', null); payment_terms_list_row(_("Payment Terms:"), 'payment_terms', null); // // tax_included option from supplier record is used directly in update_average_cost() function, // therefore we can't edit the option after any transaction waas done for the supplier. // if (is_new_supplier($supplier_id)) { check_row(_("Prices contain tax included:"), 'tax_included'); } else { hidden('tax_included'); label_row(_("Prices contain tax included:"), $_POST['tax_included'] ? _('Yes') : _('No')); } table_section_title(_("Accounts")); gl_all_accounts_list_row(_("Accounts Payable Account:"), 'payable_account', $_POST['payable_account']); gl_all_accounts_list_row(_("Purchase Account:"), 'purchase_account', $_POST['purchase_account'], false, false, _("Use Item Inventory/COGS Account")); gl_all_accounts_list_row(_("Purchase Discount Account:"), 'payment_discount_account', $_POST['payment_discount_account']); if (!$supplier_id) { table_section_title(_("Contact Data")); text_row(_("Phone Number:"), 'phone', null, 32, 30); text_row(_("Secondary Phone Number:"), 'phone2', null, 32, 30); } table_section(2); $dim = get_company_pref('use_dimension'); if ($dim >= 1) { table_section_title(_("Dimension")); dimensions_list_row(_("Dimension") . " 1:", 'dimension_id', null, true, " ", false, 1); if ($dim > 1) { dimensions_list_row(_("Dimension") . " 2:", 'dimension2_id', null, true, " ", false, 2); } } if ($dim < 1) { hidden('dimension_id', 0); } if ($dim < 2) { hidden('dimension2_id', 0); } table_section_title(_("Addresses")); textarea_row(_("Mailing Address:"), 'address', null, 35, 5); textarea_row(_("Physical Address:"), 'supp_address', null, 35, 5); table_section_title(_("General")); textarea_row(_("General Notes:"), 'notes', null, 35, 5); if ($supplier_id) { record_status_list_row(_("Supplier status:"), 'inactive'); } else { table_section_title(_("Contact Data")); text_row(_("Contact Person:"), 'contact', null, 42, 40); text_row(_("Fax Number:"), 'fax', null, 32, 30); email_row(_("E-mail:"), 'email', null, 35, 55); languages_list_row(_("Document Language:"), 'rep_lang', null, _('System default')); } end_outer_table(1); div_start('controls'); if ($supplier_id) { submit_center_first('submit', _("Update Supplier"), _('Update supplier data'), @$_REQUEST['popup'] ? true : 'default'); submit_return('select', get_post('supplier_id'), _("Select this supplier and return to document entry.")); submit_center_last('delete', _("Delete Supplier"), _('Delete supplier data if have been never used'), true); } else { submit_center('submit', _("Add New Supplier Details"), true, '', 'default'); } div_end(); }
$_POST['pos'] = $myrow["pos"]; } hidden('selected_id', $selected_id); hidden('user_id'); start_row(); label_row(_("User login:"******"User Login:"******"user_id", null, 22, 20); $_POST['language'] = user_language(); $_POST['print_profile'] = user_print_profile(); $_POST['rep_popup'] = user_rep_popup(); $_POST['pos'] = user_pos(); } $_POST['password'] = ""; password_row(_("Password:"******"Enter a new password to change, leave empty to keep current.")); } text_row_ex(_("Full Name") . ":", 'real_name', 50); text_row_ex(_("Telephone No.:"), 'phone', 30); email_row_ex(_("Email Address:"), 'email', 50); security_roles_list_row(_("Access Level:"), 'role_id', null); languages_list_row(_("Language:"), 'language', null); pos_list_row(_("User's POS") . ':', 'pos', null); print_profiles_list_row(_("Printing profile") . ':', 'print_profile', null, _('Browser printing support')); check_row(_("Use popup window for reports:"), 'rep_popup', $_POST['rep_popup'], false, _('Set this option to on if your browser directly supports pdf files')); end_table(1); submit_add_or_update_center($selected_id == -1, '', 'both'); end_form(); end_page();
function branch_settings($selected_id) { global $Mode, $num_branches; start_outer_table(TABLESTYLE2); table_section(1); $_POST['email'] = ""; if ($selected_id != -1) { if ($Mode == 'Edit' || !isset($_POST['br_name'])) { //editing an existing branch $myrow = get_cust_branch($_POST['customer_id'], $_POST['branch_code']); set_focus('br_name'); $_POST['branch_code'] = $myrow["branch_code"]; $_POST['br_name'] = $myrow["br_name"]; $_POST['br_ref'] = $myrow["branch_ref"]; $_POST['br_address'] = $myrow["br_address"]; $_POST['br_post_address'] = $myrow["br_post_address"]; // $_POST['contact_name'] = $myrow["contact_name"]; $_POST['salesman'] = $myrow["salesman"]; $_POST['area'] = $myrow["area"]; // $_POST['rep_lang'] =$myrow["rep_lang"]; // $_POST['phone'] =$myrow["phone"]; // $_POST['phone2'] =$myrow["phone2"]; // $_POST['fax'] =$myrow["fax"]; // $_POST['email'] =$myrow["email"]; $_POST['tax_group_id'] = $myrow["tax_group_id"]; $_POST['disable_trans'] = $myrow['disable_trans']; $_POST['default_location'] = $myrow["default_location"]; $_POST['default_ship_via'] = $myrow['default_ship_via']; $_POST['sales_account'] = $myrow["sales_account"]; $_POST['sales_discount_account'] = $myrow['sales_discount_account']; $_POST['receivables_account'] = $myrow['receivables_account']; $_POST['payment_discount_account'] = $myrow['payment_discount_account']; $_POST['group_no'] = $myrow["group_no"]; $_POST['notes'] = $myrow["notes"]; } } elseif ($Mode != 'ADD_ITEM') { //end of if $SelectedBranch only do the else when a new record is being entered $myrow = get_default_info_for_branch($_POST['customer_id']); // $_POST['rep_lang'] = $myrow['rep_lang']; if (!$num_branches) { $_POST['br_name'] = $myrow["name"]; $_POST['br_ref'] = $myrow["debtor_ref"]; $_POST['contact_name'] = _('Main Branch'); $_POST['br_address'] = $_POST['br_post_address'] = $myrow["address"]; } $_POST['branch_code'] = ""; if (!isset($_POST['sales_account']) || !isset($_POST['sales_discount_account'])) { $company_record = get_company_prefs(); // We use the Item Sales Account as default! // $_POST['sales_account'] = $company_record["default_sales_act"]; $_POST['sales_account'] = $_POST['notes'] = ''; $_POST['sales_discount_account'] = $company_record['default_sales_discount_act']; $_POST['receivables_account'] = $company_record['debtors_act']; $_POST['payment_discount_account'] = $company_record['default_prompt_payment_act']; } } hidden('popup', @$_REQUEST['popup']); table_section_title(_("Name and Contact")); text_row(_("Branch Name:"), 'br_name', null, 35, 40); text_row(_("Branch Short Name:"), 'br_ref', null, 30, 30); table_section_title(_("Sales")); sales_persons_list_row(_("Sales Person:"), 'salesman', null); sales_areas_list_row(_("Sales Area:"), 'area', null); sales_groups_list_row(_("Sales Group:"), 'group_no', null, true); locations_list_row(_("Default Inventory Location:"), 'default_location', null); shippers_list_row(_("Default Shipping Company:"), 'default_ship_via', null); tax_groups_list_row(_("Tax Group:"), 'tax_group_id', null); table_section_title(_("GL Accounts")); // 2006-06-14. Changed gl_al_accounts_list to have an optional all_option 'Use Item Sales Accounts' gl_all_accounts_list_row(_("Sales Account:"), 'sales_account', null, false, false, true); gl_all_accounts_list_row(_("Sales Discount Account:"), 'sales_discount_account'); gl_all_accounts_list_row(_("Accounts Receivable Account:"), 'receivables_account', null, true); gl_all_accounts_list_row(_("Prompt Payment Discount Account:"), 'payment_discount_account'); table_section(2); if ($selected_id == -1) { table_section_title(_("General contact data")); text_row(_("Contact Person:"), 'contact_name', null, 35, 40); text_row(_("Phone Number:"), 'phone', null, 32, 30); text_row(_("Secondary Phone Number:"), 'phone2', null, 32, 30); text_row(_("Fax Number:"), 'fax', null, 32, 30); email_row(_("E-mail:"), 'email', null, 35, 55); languages_list_row(_("Document Language:"), 'rep_lang', null, _("Customer default")); } table_section_title(_("Addresses")); textarea_row(_("Mailing Address:"), 'br_post_address', null, 35, 4); textarea_row(_("Billing Address:"), 'br_address', null, 35, 4); textarea_row(_("General Notes:"), 'notes', null, 35, 4); if ($selected_id != -1) { yesno_list_row(_("Disable this Branch:"), 'disable_trans', null); } end_outer_table(1); submit_add_or_update_center($selected_id == -1, '', 'both'); }