text_row("Field separator:", 'sep', $_POST['sep'], 2, 1); locations_list_row("To Location:", 'location', null); item_tax_types_list_row("Item Tax Type:", 'tax_type_id', null); sales_types_list_row("Sales Type:", 'sales_type_id', null); label_row("CSV Import File:", "<input type='file' id='imp' name='imp'>"); end_table(1); submit_center('import', "Import CSV File"); end_form(); } if ($action == 'export') { start_form(true); start_table(TABLESTYLE2, "width=40%"); $company_record = get_company_prefs(); $currency = $company_record["curr_default"]; hidden('currency', $currency); table_section_title("Export Selection"); ?> <tr> <td>Export Type:</td> <td><select name='export_type' class='combo' title='' > <option value='1'>Item</option> <option value='2'>Price List</option> <option value='3'>Purchase Price</option> <option value='4'>Units of Measure</option> <option value='5'>Kit</option> <option value='6'>Bill of Materials</option> <option value='7'>Foreign Item Codes</option> </select> </td> </tr> <?php
gl_all_accounts_list_row("Sales Discount Account:", 'sales_discount_account', $_POST['sales_discount_account']); gl_all_accounts_list_row("Receivables Account:", 'receivables_account', $_POST['receivables_account']); gl_all_accounts_list_row("Payment Discount Account:", 'payment_discount_account', $_POST['payment_discount_account']); table_section_title("Location, Tax Type, Sales Type, Sales Person and Payment Terms"); locations_list_row("Location:", 'default_location', 'DEF'); tax_groups_list_row(_("Default Tax Group:"), 'tax_group_id', $default_TaxGroup); sales_types_list_row("Sales Type:", 'sales_type', null); sales_persons_list_row("Sales Person:", 'salesman', null); sales_areas_list_row("Sales Area:", 'area'); currencies_list_row("Customer Currency:", 'currency', $default_Currency); payment_terms_list_row("Payment Terms:", 'payment_terms', null); text_row("Starting Zen Cart Customer ID:", 'min_cid', $min_cid, 10, 10); text_row("Ending Zen Cart Customer ID:", 'max_cid', $max_cid, 10, 10); end_table(1); hidden('action', 'c_import'); submit_center('cimport', "Import Zen Cart Customers"); end_form(); end_page(); } if ($action == 'oimport') { start_form(true); start_table(TABLESTYLE2, "width=40%"); table_section_title("Order Import Options"); text_row("Starting Order Number:", 'first_oid', $min_oid, 10, 10); text_row("Last Order Number:", 'last_oid', $max_oid, 10, 10); end_table(1); hidden('action', 'o_import'); submit_center('oimport', "Import Zen Cart Orders"); end_form(); end_page(); }
// Sherifoz 23.09.03 currency can't be changed if editing if (isset($_POST['supplier_id']) && !isset($_POST['New'])) { label_row(tr("Supplier's Currency:"), $_POST['curr_code']); hidden('curr_code', $_POST['curr_code']); } else { currencies_list_row(tr("Supplier's Currency:"), 'curr_code', null); } tax_groups_list_row(tr("Tax Group:"), 'tax_group_id', null); payment_terms_list_row(tr("Payment Terms:"), 'payment_terms', null); table_section_title(tr("Accounts")); gl_all_accounts_list_row(tr("Accounts Payable Account:"), 'payable_account', $_POST['payable_account']); gl_all_accounts_list_row(tr("Purchase Account:"), 'purchase_account', $_POST['purchase_account']); gl_all_accounts_list_row(tr("Purchase Discount Account:"), 'payment_discount_account', $_POST['payment_discount_account']); $dim = get_company_pref('use_dimension'); if ($dim >= 1) { table_section_title(tr("Dimension")); dimensions_list_row(tr("Dimension") . " 1:", 'dimension_id', null, true, " ", false, 1); if ($dim > 1) { dimensions_list_row(tr("Dimension") . " 2:", 'dimension2_id', null, true, " ", false, 2); } } if ($dim < 1) { hidden('dimension_id', 0); } if ($dim < 2) { hidden('dimension2_id', 0); } end_table(1); if (!isset($_POST['New'])) { submit_center_first('submit', tr("Update Supplier")); submit_center_last('delete', tr("Delete Supplier"));
if (get_post('cogs_account') == "") { $_POST['cogs_account'] = $company_record["default_cogs_act"]; } if (get_post('sales_account') == "") { $_POST['sales_account'] = $company_record["default_inv_sales_act"]; } if (get_post('adjustment_account') == "") { $_POST['adjustment_account'] = $company_record["default_adj_act"]; } if (get_post('assembly_account') == "") { $_POST['assembly_account'] = $company_record["default_assembly_act"]; } } } text_row(_("Category Name:"), 'description', null, 30, 30); table_section_title(_("Default values for new items")); item_tax_types_list_row(_("Item Tax Type:"), 'tax_type_id', null); stock_item_types_list_row(_("Item Type:"), 'mb_flag', null, true); stock_units_list_row(_("Units of Measure:"), 'units', null); check_row(_("Exclude from sales:"), 'no_sale'); gl_all_accounts_list_row(_("Sales Account:"), 'sales_account', $_POST['sales_account']); if (is_service($_POST['mb_flag'])) { gl_all_accounts_list_row(_("C.O.G.S. Account:"), 'cogs_account', $_POST['cogs_account']); hidden('inventory_account', $_POST['inventory_account']); hidden('adjustment_account', $_POST['adjustment_account']); } else { gl_all_accounts_list_row(_("Inventory Account:"), 'inventory_account', $_POST['inventory_account']); gl_all_accounts_list_row(_("C.O.G.S. Account:"), 'cogs_account', $_POST['cogs_account']); gl_all_accounts_list_row(_("Inventory Adjustments Account:"), 'adjustment_account', $_POST['adjustment_account']); } if (is_manufactured($_POST['mb_flag'])) {
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(); } print_profiles_list_row(_("Printing profile") . ':', 'print_profile', null, _('Browser printing support')); check_row(_("Use popup window to display reports:"), 'rep_popup', user_rep_popup(), false, _('Set this option to on if your browser directly supports pdf files'));
//---------------- table_section(2); table_section_title(_("Dimension Defaults")); text_row(_("Dimension Required By After:"), 'default_dim_required', $_POST['default_dim_required'], 6, 6, '', "", _("days")); //--------------- table_section_title(_("Suppliers and Purchasing")); percent_row(_("Delivery Over-Receive Allowance:"), 'po_over_receive'); percent_row(_("Invoice Over-Charge Allowance:"), 'po_over_charge'); table_section_title(_("Suppliers and Purchasing Defaults")); gl_all_accounts_list_row(_("Payable Account:"), 'creditors_act', $_POST['creditors_act']); gl_all_accounts_list_row(_("Purchase Discount Account:"), 'pyt_discount_act', $_POST['pyt_discount_act']); gl_all_accounts_list_row(_("GRN Clearing Account:"), 'grn_clearing_act', get_post('grn_clearing_act'), true, false, _("No postings on GRN")); table_section_title(_("Inventory")); check_row(_("Allow Negative Inventory:"), 'allow_negative_stock', null); label_row(null, _("Warning: This may cause a delay in GL postings"), "", "class='stockmankofg' colspan=2"); table_section_title(_("Items Defaults")); gl_all_accounts_list_row(_("Sales Account:"), 'default_inv_sales_act', $_POST['default_inv_sales_act']); gl_all_accounts_list_row(_("Inventory Account:"), 'default_inventory_act', $_POST['default_inventory_act']); // this one is default for items and suppliers (purchase account) gl_all_accounts_list_row(_("C.O.G.S. Account:"), 'default_cogs_act', $_POST['default_cogs_act']); gl_all_accounts_list_row(_("Inventory Adjustments Account:"), 'default_adj_act', $_POST['default_adj_act']); gl_all_accounts_list_row(_("Item Assembly Costs Account:"), 'default_assembly_act', $_POST['default_assembly_act']); //---------------- table_section_title(_("Manufacturing Defaults")); text_row(_("Work Order Required By After:"), 'default_workorder_required', $_POST['default_workorder_required'], 6, 6, '', "", _("days")); //---------------- end_outer_table(1); submit_center('submit', _("Update"), true, '', 'default'); end_form(2); //------------------------------------------------------------------------------------------------- end_page();
gl_all_accounts_list_row(tr("Sales Discount Account:"), 'default_sales_discount_act', $_POST['default_sales_discount_act']); gl_all_accounts_list_row(tr("Prompt Payment Discount Account:"), 'default_prompt_payment_act', $_POST['default_prompt_payment_act']); //--------------- table_section_title(tr("Suppliers and Purchasing")); percent_row(tr("Delivery Over-Receive Allowance:"), 'po_over_receive'); percent_row(tr("Invoice Over-Charge Allowance:"), 'po_over_charge'); gl_all_accounts_list_row(tr("Purchases Exchange Variances Account:"), 'purch_exchange_diff_act', $_POST['purch_exchange_diff_act']); gl_all_accounts_list_row(tr("Goods Received Clearing Account:"), 'grn_act', $_POST['grn_act']); table_section_title(tr("Suppliers and Purchasing Defaults")); gl_all_accounts_list_row(tr("Accounts Payable Account:"), 'creditors_act', $_POST['creditors_act']); gl_all_accounts_list_row(tr("Purchase Discount Account:"), 'pyt_discount_act', $_POST['pyt_discount_act']); //--------------- table_section_title(tr("Inventory Defaults")); check_row(tr("Allow Negative Inventory:"), 'allow_negative_stock', null); gl_all_accounts_list_row(tr("Sales Account:"), 'default_inv_sales_act', $_POST['default_inv_sales_act']); gl_all_accounts_list_row(tr("Inventory Account:"), 'default_inventory_act', $_POST['default_inventory_act']); gl_all_accounts_list_row(tr("C.O.G.S. Account:"), 'default_cogs_act', $_POST['default_cogs_act']); gl_all_accounts_list_row(tr("Inventory Adjustments Account:"), 'default_adj_act', $_POST['default_adj_act']); gl_all_accounts_list_row(tr("Item Assembly Costs Account:"), 'default_assembly_act', $_POST['default_assembly_act']); //---------------- table_section_title(tr("Manufacturing Defaults")); text_row(tr("Default Work Order Required By After:"), 'default_workorder_required', $_POST['default_workorder_required'], 6, 6, "", tr("days")); //---------------- table_section_title(tr("Dimension Defaults")); text_row(tr("Default Dimension Required By After:"), 'default_dim_required', $_POST['default_dim_required'], 6, 6, "", tr("days")); //---------------- end_table(1); submit_center('submit', tr("Update")); end_form(2); //------------------------------------------------------------------------------------------------- end_page();
if ($_POST['password'] != $_POST['passwordConfirm']) { display_error(_("The passwords entered are not the same.")); set_focus('password'); return false; } return true; } if (isset($_POST['UPDATE_ITEM']) && check_csrf_token()) { if (can_process()) { if ($allow_demo_mode) { display_warning(_("Password cannot be changed in demo mode.")); } else { update_user_password($_SESSION["wa_current_user"]->user, $_SESSION["wa_current_user"]->username, md5($_POST['password'])); display_notification(_("Your password has been updated.")); } $Ajax->activate('_page_body'); } } start_form(); start_table(TABLESTYLE); $myrow = get_user($_SESSION["wa_current_user"]->user); label_row(_("User login:"******""; $_POST['passwordConfirm'] = ""; password_row(_("Password:"******"Repeat password:"******"Enter your new password in the fields.")); end_table(1); submit_center('UPDATE_ITEM', _('Change password'), true, '', 'default'); end_form(); end_page();
if ($entryCount > 0) { display_notification_centered("{$entryCount} {$typeString} have been imported."); } else { display_error("Import file contained no {$typeString}."); } } } } else { display_error("No import file selected"); } } start_form(true); start_table(TABLESTYLE2); if (!isset($_POST['type'])) { $_POST['type'] = ST_JOURNAL; } if (!isset($_POST['sep'])) { $_POST['sep'] = ","; } table_section_title("Import Settings"); import_type_list_row("Import Type:", 'type', $_POST['type'], true); if ($_POST['type'] != ST_JOURNAL) { bank_accounts_list_row($_POST['type'] == ST_BANKPAYMENT ? _("From:") : _("To:"), 'bank_account', null, false); } text_row("Field Separator:", 'sep', $_POST['sep'], 2, 1); label_row("Import File:", "<input type='file' id='imp' name='imp'>"); end_table(1); submit_center('import', "Perform Import"); //,true,false,'process',ICON_SUBMIT); end_form(); end_page();
br(); start_form(false, false, $_SESSION['timeout']['uri'], "loginform"); start_table(false, "class='login'"); start_row(); echo "<td align='center' colspan=2>"; if (!$login_timeout) { // FA logo echo "<a target='_blank' href='{$power_url}'><img src='{$path_to_root}/themes/{$def_theme}/images/logo_frontaccounting.png' alt='FrontAccounting' height='50' onload='fixPNG(this)' border='0' /></a>"; } else { echo "<font size=5>" . _('Authorization timeout') . "</font>"; } echo "</td>\n"; end_row(); echo "<input type='hidden' id=ui_mode name='ui_mode' value='" . $_SESSION["wa_current_user"]->ui_mode . "' />\n"; if (!$login_timeout) { table_section_title(_("Version") . " {$version} Build {$build_version} - " . _("Login")); } $value = $login_timeout ? $_SESSION['wa_current_user']->loginname : ($allow_demo_mode ? "demouser" : ""); text_row(_("User name"), "user_name_entry_field", $value, 20, 30); $password = $allow_demo_mode ? "password" : ""; password_row(_("Password:"******"wa_current_user"]->company); } else { if (isset($_SESSION['wa_current_user']->company)) { $coy = $_SESSION['wa_current_user']->company; } else { $coy = $def_coy; } if (!@$text_company_selection) { echo "<tr><td>" . _("Company") . "</td><td><select name='company_login_name'>\n";
function item_settings(&$stock_id) { global $SysPrefs, $path_to_root, $new_item, $pic_height; start_outer_table(TABLESTYLE2); table_section(1); table_section_title(_("Item")); //------------------------------------------------------------------------------------ if ($new_item) { text_row(_("Item Code/ISBN:"), 'NewStockID', null, 21, 20); $_POST['inactive'] = 0; } else { // Must be modifying an existing item if (get_post('NewStockID') != get_post('stock_id') || get_post('addupdate')) { // first item display $_POST['NewStockID'] = $_POST['stock_id']; $myrow = get_item($_POST['NewStockID']); $_POST['long_description'] = $myrow["long_description"]; $_POST['description'] = $myrow["description"]; $_POST['category_id'] = $myrow["category_id"]; /*==============MOODLEARNING=============*/ $_POST['level_id'] = $myrow["level_id"]; /*=======================================*/ $_POST['tax_type_id'] = $myrow["tax_type_id"]; $_POST['units'] = $myrow["units"]; $_POST['mb_flag'] = $myrow["mb_flag"]; $_POST['sales_account'] = $myrow['sales_account']; $_POST['inventory_account'] = $myrow['inventory_account']; $_POST['cogs_account'] = $myrow['cogs_account']; $_POST['adjustment_account'] = $myrow['adjustment_account']; $_POST['assembly_account'] = $myrow['assembly_account']; $_POST['dimension_id'] = $myrow['dimension_id']; $_POST['dimension2_id'] = $myrow['dimension2_id']; $_POST['no_sale'] = $myrow['no_sale']; $_POST['del_image'] = 0; $_POST['inactive'] = $myrow["inactive"]; $_POST['editable'] = $myrow["editable"]; } label_row(_("Item Code/ISBN:"), $_POST['NewStockID']); hidden('NewStockID', $_POST['NewStockID']); set_focus('description'); } /*=================MOODLEARNING====================*/ level_list_row(_("Level:"), 'level_id', null); /*=================================================*/ text_row(_("Name:"), 'description', null, 52, 200); textarea_row(_('Description:'), 'long_description', null, 42, 3); stock_categories_list_row(_("Category/Subject:"), 'category_id', null, false, $new_item); if ($new_item && (list_updated('category_id') || !isset($_POST['units']))) { $category_record = get_item_category($_POST['category_id']); $_POST['level_id'] = $category_record["level_id"]; // moodlearning edit $_POST['subject_id'] = $category_record["level_id"]; $_POST['tax_type_id'] = $category_record["dflt_tax_type"]; $_POST['units'] = $category_record["dflt_units"]; $_POST['mb_flag'] = $category_record["dflt_mb_flag"]; $_POST['inventory_account'] = $category_record["dflt_inventory_act"]; $_POST['cogs_account'] = $category_record["dflt_cogs_act"]; $_POST['sales_account'] = $category_record["dflt_sales_act"]; $_POST['adjustment_account'] = $category_record["dflt_adjustment_act"]; $_POST['assembly_account'] = $category_record["dflt_assembly_act"]; $_POST['dimension_id'] = $category_record["dflt_dim1"]; $_POST['dimension2_id'] = $category_record["dflt_dim2"]; $_POST['no_sale'] = $category_record["dflt_no_sale"]; $_POST['editable'] = 0; } $fresh_item = !isset($_POST['NewStockID']) || $new_item || check_usage($_POST['stock_id'], false); item_tax_types_list_row(_("Item Tax Type:"), 'tax_type_id', null); stock_item_types_list_row(_("Item Type:"), 'mb_flag', null, $fresh_item); stock_units_list_row(_('Units of Measure:'), 'units', null, $fresh_item); check_row(_("Editable description:"), 'editable'); check_row(_("Exclude from sales:"), 'no_sale'); table_section(2); $dim = get_company_pref('use_dimension'); if ($dim >= 1) { table_section_title(_("Dimensions")); 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(_("GL Accounts")); gl_all_accounts_list_row(_("Sales Account:"), 'sales_account', $_POST['sales_account']); if (!is_service($_POST['mb_flag'])) { gl_all_accounts_list_row(_("Inventory Account:"), 'inventory_account', $_POST['inventory_account']); gl_all_accounts_list_row(_("C.O.G.S. Account:"), 'cogs_account', $_POST['cogs_account']); gl_all_accounts_list_row(_("Inventory Adjustments Account:"), 'adjustment_account', $_POST['adjustment_account']); } else { gl_all_accounts_list_row(_("C.O.G.S. Account:"), 'cogs_account', $_POST['cogs_account']); hidden('inventory_account', $_POST['inventory_account']); hidden('adjustment_account', $_POST['adjustment_account']); } if (is_manufactured($_POST['mb_flag'])) { gl_all_accounts_list_row(_("Item Assembly Costs Account:"), 'assembly_account', $_POST['assembly_account']); } else { hidden('assembly_account', $_POST['assembly_account']); } table_section_title(_("Other")); // Add image upload for New Item - by Joe file_row(_("Image File (.jpg)") . ":", 'pic', 'pic'); // Add Image upload for New Item - by Joe $stock_img_link = ""; $check_remove_image = false; if (isset($_POST['NewStockID']) && file_exists(company_path() . '/images/' . item_img_name($_POST['NewStockID']) . ".jpg")) { // 31/08/08 - rand() call is necessary here to avoid caching problems. Thanks to Peter D. $stock_img_link .= "<img id='item_img' alt = '[" . $_POST['NewStockID'] . ".jpg" . "]' src='" . company_path() . '/images/' . item_img_name($_POST['NewStockID']) . ".jpg?nocache=" . rand() . "'" . " height='{$pic_height}' border='0'>"; $check_remove_image = true; } else { $stock_img_link .= _("No image"); } label_row(" ", $stock_img_link); if ($check_remove_image) { check_row(_("Delete Image:"), 'del_image'); } record_status_list_row(_("Item status:"), 'inactive'); end_outer_table(1); div_start('controls'); if (!isset($_POST['NewStockID']) || $new_item) { submit_center('addupdate', _("Insert New Item"), true, '', 'default'); } else { submit_center_first('addupdate', _("Update Item"), '', @$_REQUEST['popup'] ? true : 'default'); submit_return('select', get_post('stock_id'), _("Select this items and return to document entry."), 'default'); submit('clone', _("Clone This Item"), true, '', true); submit('delete', _("Delete This Item"), true, '', true); submit_center_last('cancel', _("Cancel"), _("Cancel Edition"), 'cancel'); } div_end(); }
<?php // ---------------------------------------------------------------- // Creator: Mizan & Kvvaradha // email: admin@kvcodes.com // Title: Tutorial Hook For HRM // ---------------------------------------------------------------- $page_security = 'SA_OPEN'; $path_to_root = "../.."; include_once $path_to_root . "/includes/session.inc"; include_once $path_to_root . "/includes/ui.inc"; include_once $path_to_root . "/modules/HumanResourceManagement/includes/employee_db.inc"; page('About Us'); if (isset($_GET['clean_db'])) { kv_truncate_my_tables(); display_notification(_("Your HRM is ready to go with your datas. the Demo detials completely Removed!")); } start_table(TABLESTYLE2, "width=30%"); table_section_title(_("About Us")); label_row("Author: ", "Mizanur Rahman and Varadharaj V"); label_row("Module: ", "Simple HRM"); label_row("Email @mizan: ", "*****@*****.**"); label_row("Email @varadha: ", "*****@*****.**"); label_row("Website: ", "<a href='http://1stopwebsolution.com' >http://1stopwebsolution.com </a> "); echo "<tr> <td >Simple Documentation</td><td> <a href='http://www.kvcodes.com/2014/10/frontaccounting-simple-hrm/' target='_blank'> Click Here </a> </td></tr>"; echo "<tr> <td >Example Payroll Excel Sheet</td><td> <a href='includes/payroll.xlsx' target='_blank'> Click Here </a> </td></tr>"; echo "<tr> <td >Clear Demo Data's </td><td> <a href='?clean_db=yes' > Clean it </a> </td></tr>"; echo "<tr> <td colspan='2'><iframe src='http://www.kvcodes.com/kvc' height='1px' with='100%' > </iframe></td></tr>"; end_table(); end_page();
text_row_ex(tr("Percentages:"), 'Percent', 5, 5, user_percent_dec()); table_section_title(tr("Dateformat and Separators")); dateformats_list_row(tr("Dateformat:"), "date_format", user_date_format()); dateseps_list_row(tr("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(tr("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(tr("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 */ table_section_title(tr("Miscellaneous")); check_row(tr("Show GL Information:"), 'show_gl', user_show_gl_info()); check_row(tr("Show Item Codes:"), 'show_codes', user_show_codes()); themes_list_row(tr("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(tr("Page Size:"), "page_size", user_pagesize()); /* 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 */ table_section_title(tr("Language")); if (!isset($_POST['language'])) { $_POST['language'] = $_SESSION['language']->code; } languages_list_row(tr("Language:"), 'language', $_POST['language']); end_table(1); submit_center('setprefs', tr("Update")); end_form(2); //------------------------------------------------------------------------------------------------- end_page();
function display_balance_sheet() { global $path_to_root; $from = begin_fiscalyear(); $to = $_POST['TransToDate']; if (!isset($_POST['Dimension'])) { $_POST['Dimension'] = 0; } if (!isset($_POST['Dimension2'])) { $_POST['Dimension2'] = 0; } $dimension = $_POST['Dimension']; $dimension2 = $_POST['Dimension2']; $lconvert = $econvert = 1; if (isset($_POST["AccGrp"]) && strlen($_POST['AccGrp']) > 0) { $drilldown = 1; } else { $drilldown = 0; } // Root level div_start('balance_tbl'); start_table(TABLESTYLE, "width='30%'"); if (!$drilldown) { $equityclose = 0.0; $lclose = 0.0; $calculateclose = 0.0; $parent = -1; //Get classes for BS $classresult = get_account_classes(false, 1); while ($class = db_fetch($classresult)) { $classclose = 0.0; $convert = get_class_type_convert($class["ctype"]); $ctype = $class["ctype"]; $classname = $class["class_name"]; //Print Class Name table_section_title($class["class_name"]); //Get Account groups/types under this group/type $typeresult = get_account_types(false, $class['cid'], -1); while ($accounttype = db_fetch($typeresult)) { $TypeTotal = display_type($accounttype["id"], $accounttype["name"], $from, $to, $convert, $dimension, $dimension2, $drilldown, $path_to_root); //Print Summary if ($TypeTotal != 0) { $url = "<a href='{$path_to_root}/gl/inquiry/balance_sheet.php?TransFromDate=" . $from . "&TransToDate=" . $to . "&Dimension=" . $dimension . "&Dimension2=" . $dimension2 . "&AccGrp=" . $accounttype['id'] . "'>" . $accounttype['id'] . " " . $accounttype['name'] . "</a>"; alt_table_row_color($k); label_cell($url); amount_cell($TypeTotal * $convert); end_row(); } $classclose += $TypeTotal; } //Print Class Summary start_row("class='inquirybg' style='font-weight:bold'"); label_cell(_('Total') . " " . $class["class_name"]); amount_cell($classclose * $convert); end_row(); if ($ctype == CL_EQUITY) { $equityclose += $classclose; $econvert = $convert; } if ($ctype == CL_LIABILITIES) { $lclose += $classclose; $lconvert = $convert; } $calculateclose += $classclose; } if ($lconvert == 1) { $calculateclose *= -1; } //Final Report Summary $url = "<a href='{$path_to_root}/gl/inquiry/profit_loss.php?TransFromDate=" . $from . "&TransToDate=" . $to . "&Dimension=" . $dimension . "&Dimension2=" . $dimension2 . "&Compare=0'>" . _('Calculated Return') . "</a>"; start_row("class='inquirybg' style='font-weight:bold'"); label_cell($url); amount_cell($calculateclose); end_row(); start_row("class='inquirybg' style='font-weight:bold'"); label_cell(_('Total') . " " . _('Liabilities') . _(' and ') . _('Equities')); amount_cell($lclose * $lconvert + $equityclose * $econvert + $calculateclose); end_row(); } else { //Level Pointer : Global variable defined in order to control display of root global $levelptr; $levelptr = 0; $accounttype = get_account_type($_POST["AccGrp"]); $classid = $accounttype["class_id"]; $class = get_account_class($classid); $convert = get_class_type_convert($class["ctype"]); //Print Class Name table_section_title($_POST["AccGrp"] . " " . get_account_type_name($_POST["AccGrp"])); $classclose = display_type($accounttype["id"], $accounttype["name"], $from, $to, $convert, $dimension, $dimension2, $drilldown, $path_to_root); } end_table(1); // outer table div_end(); }
check_row(_("Use Paypal Transaction Id:"), 'use_paypal_trn_id', null); check_row(_("Receipts Date Today:"), 'paypal_recpt_today', null); table_section_title(_("PayPal File")); text_row_ex(_("Company Name Column:"), 'paypal_name_col', 25, 55); table_section_title(_("Customers")); sales_types_list_row("Sales Type:", 'paypal_sales_type_id', null); sales_persons_list_row(_("Sales Person:"), 'paypal_salesman', null); sales_areas_list_row(_("Sales Area:"), 'paypal_area', null); credit_status_list_row(_("Credit Status:"), 'paypal_credit_status', null); locations_list_row(_("Default Location:"), 'paypal_location', null); shippers_list_row(_("Default Shipper:"), 'paypal_shipper', null); table_section(2); table_section_title(_("Accounts")); bank_accounts_list_row(_("Bank Account:"), 'paypal_bank_id', $_POST['paypal_bank_id'], false); gl_all_accounts_list_row(_("Sales Account:"), 'paypal_sales_act', $_POST['paypal_sales_act']); gl_all_accounts_list_row(_("Sales Tax Account:"), 'paypal_sales_tax_act', $_POST['paypal_sales_tax_act']); gl_all_accounts_list_row(_("Shipping Account:"), 'paypal_shipping_act', $_POST['paypal_shipping_act']); gl_all_accounts_list_row(_("Fee Account:"), 'paypal_fee_act', $_POST['paypal_fee_act']); gl_all_accounts_list_row(_("Insurance Account:"), 'paypal_insurance_act', $_POST['paypal_insurance_act']); bank_accounts_list_row(_("Withdrawal Account:"), 'paypal_withdraw_id', $_POST['paypal_withdraw_id'], false); table_section_title(_("Tax")); check_row(_("Add Tax to Receipts:"), 'paypal_add_tax', null); check_row(_("Tax Included in Paypal Amount:"), 'paypal_tax_included', null); tax_types_list_row("Default Tax Type:", 'paypal_tax_type_id', null); tax_groups_list_row("Default Tax Group:", 'paypal_tax_group_id', null); item_tax_types_list_row("Default Item Tax Group:", 'paypal_item_tax_id', null); end_outer_table(1); submit_center('submit', _("Update"), true, '', 'default'); end_form(); //------------------------------------------------------------------------------------------------- end_page();
} } else { display_error(_("Select backup file first.")); } } //------------------------------------------------------------------------------- start_form(true, true); start_outer_table(TABLESTYLE2); table_section(1); table_section_title(_("Create backup")); textarea_row(_("Comments:"), 'comments', null, 30, 8); compress_list_row(_("Compression:"), 'comp'); vertical_space("height='20px'"); submit_row('creat', _("Create Backup"), false, "colspan=2 align='center'", '', 'process'); table_section(2); table_section_title(_("Backup scripts maintenance")); start_row(); echo "<td style='padding-left:20px' align='left'>" . get_backup_file_combo() . "</td>"; echo "<td style='padding-left:20px' valign='top'>"; start_table(); submit_row('view', _("View Backup"), false, '', '', false); submit_row('download', _("Download Backup"), false, '', '', false); submit_row('restore', _("Restore Backup"), false, '', '', 'process'); submit_js_confirm('restore', _("You are about to restore database from backup file.\nDo you want to continue?")); submit_row('deldump', _("Delete Backup"), false, '', '', true); // don't use 'delete' name or IE js errors appear submit_js_confirm('deldump', sprintf(_("You are about to remove selected backup file.\nDo you want to continue ?"))); end_table(); echo "</td>"; end_row(); start_row();
echo $js; echo "</head>\n"; echo "<body id='loginscreen' {$onload}>\n"; echo "<table class='titletext'><tr><td>{$title}</td></tr></table>\n"; div_start('_page_body'); br(); br(); start_form(false, false, @$_SESSION['timeout']['uri'], "resetform"); start_table(false, "class='login'"); start_row(); echo "<td align='center' colspan=2>"; echo "<a target='_blank' href='{$power_url}'><img src='{$path_to_root}/themes/{$def_theme}/images/logo_frontaccounting.png' alt='FrontAccounting' height='50' onload='fixPNG(this)' border='0' ></a>"; echo "</td>\n"; end_row(); echo "<input type='hidden' id=ui_mode name='ui_mode' value='" . $_SESSION["wa_current_user"]->ui_mode . "' >\n"; table_section_title(_("Version") . " {$version} Build {$build_version} - " . _("Password reset")); text_row(_("Email"), "email_entry_field", "", 20, 30); if (isset($_SESSION['wa_current_user']->company)) { $coy = $_SESSION['wa_current_user']->company; } else { $coy = $def_coy; } if (!@$text_company_selection) { echo "<tr><td>" . _("Company") . "</td><td><select name='company_login_name'>\n"; for ($i = 0; $i < count($db_connections); $i++) { echo "<option value={$i} " . ($i == $coy ? 'selected' : '') . ">" . $db_connections[$i]["name"] . "</option>"; } echo "</select>\n"; echo "</td></tr>"; } else { // $coy = $def_coy;
$_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();
start_outer_table(TABLESTYLE2); table_section(1); table_section_title(_("Employee Informations")); if (isset($selected_id) && $selected_id != '') { label_row(_("Employee ID:"), $_POST['empl_id']); hidden('empl_id', $_POST['empl_id']); } text_row(_("Employee Name *:"), 'empl_name', null, 28, 80); textarea_row(_("Present Address:"), 'pre_address', null, 25, 2); textarea_row(_("Permanent Address:"), 'per_address', null, 25, 2); date_row(_("Date of Birth") . ":", 'date_of_birth'); text_row(_("Age:"), 'age', null, 3, 10); text_row(_("Mobile Phone *:"), 'mobile_phone', null, 28, 40); text_row(_("Email *:"), 'email', null, 28, 40); table_section(2); table_section_title(_("Employee Job Info")); text_row(_("Grade:"), 'grade', null, 28, 10); text_row(_("Department:"), 'department', null, 28, 40); text_row(_("Designation:"), 'designation', null, 28, 40); text_row(_("Gross Salary Per Month *:"), 'gross_salary', null, 28, 40); text_row(_("Basic Salary Per Month *:"), 'basic_salary', null, 28, 40); date_row(_("Date of Join") . ":", 'date_of_join'); end_outer_table(1); if (isset($selected_id) && $selected_id != '') { submit_center_first('submit', _("Update Employee"), '', @$_REQUEST['popup'] ? true : 'default'); submit('delete', _("Delete employee"), true, '', true); submit_center_last('cancel', _("Cancel"), _("Cancel Edition"), 'cancel'); } else { submit_center('submit', _("Add New Employee"), true, '', 'default'); } div_end();
function display_profit_and_loss() { global $path_to_root, $sel; if (!isset($_POST['Dimension'])) { $_POST['Dimension'] = 0; } if (!isset($_POST['Dimension2'])) { $_POST['Dimension2'] = 0; } $dimension = $_POST['Dimension']; $dimension2 = $_POST['Dimension2']; $from = $_POST['TransFromDate']; $to = $_POST['TransToDate']; $compare = $_POST['Compare']; if (isset($_POST["AccGrp"]) && strlen($_POST['AccGrp']) > 0) { $drilldown = 1; } else { $drilldown = 0; } // Root level $dec = 0; $pdec = user_percent_dec(); if ($compare == 0 || $compare == 2) { $end = $to; if ($compare == 2) { $begin = $from; } else { $begin = begin_fiscalyear(); } } elseif ($compare == 1) { $begin = add_months($from, -12); $end = add_months($to, -12); } div_start('pl_tbl'); start_table(TABLESTYLE, "width=50%"); $tableheader = "<tr>\n <td class='tableheader'>" . _("Group/Account Name") . "</td>\n <td class='tableheader'>" . _("Period") . "</td>\n\t\t<td class='tableheader'>" . $sel[$compare] . "</td>\n\t\t<td class='tableheader'>" . _("Achieved %") . "</td>\n </tr>"; if (!$drilldown) { $parent = -1; $classper = 0.0; $classacc = 0.0; $salesper = 0.0; $salesacc = 0.0; //Get classes for PL $classresult = get_account_classes(false, 0); while ($class = db_fetch($classresult)) { $class_per_total = 0; $class_acc_total = 0; $convert = get_class_type_convert($class["ctype"]); //Print Class Name table_section_title($class["class_name"], 4); echo $tableheader; //Get Account groups/types under this group/type $typeresult = get_account_types(false, $class['cid'], -1); while ($accounttype = db_fetch($typeresult)) { $TypeTotal = display_type($accounttype["id"], $accounttype["name"], $from, $to, $begin, $end, $compare, $convert, $dec, $pdec, $rep, $dimension, $dimension2, $drilldown, $path_to_root); $class_per_total += $TypeTotal[0]; $class_acc_total += $TypeTotal[1]; if ($TypeTotal[0] != 0 || $TypeTotal[1] != 0) { $url = "<a href='{$path_to_root}/gl/inquiry/profit_loss.php?TransFromDate=" . $from . "&TransToDate=" . $to . "&Compare=" . $compare . "&Dimension=" . $dimension . "&Dimension2=" . $dimension2 . "&AccGrp=" . $accounttype['id'] . "'>" . $accounttype['id'] . " " . $accounttype['name'] . "</a>"; alt_table_row_color($k); label_cell($url); amount_cell($TypeTotal[0] * $convert); amount_cell($TypeTotal[1] * $convert); amount_cell(Achieve($TypeTotal[0], $TypeTotal[1])); end_row(); } } //Print Class Summary start_row("class='inquirybg' style='font-weight:bold'"); label_cell(_('Total') . " " . $class["class_name"]); amount_cell($class_per_total * $convert); amount_cell($class_acc_total * $convert); amount_cell(Achieve($class_per_total, $class_acc_total)); end_row(); $salesper += $class_per_total; $salesacc += $class_acc_total; } start_row("class='inquirybg' style='font-weight:bold'"); label_cell(_('Calculated Return')); amount_cell($salesper * -1); amount_cell($salesacc * -1); amount_cell(achieve($salesper, $salesacc)); end_row(); } else { //Level Pointer : Global variable defined in order to control display of root global $levelptr; $levelptr = 0; $accounttype = get_account_type($_POST["AccGrp"]); $classid = $accounttype["class_id"]; $class = get_account_class($classid); $convert = get_class_type_convert($class["ctype"]); //Print Class Name table_section_title($_POST["AccGrp"] . " " . get_account_type_name($_POST["AccGrp"]), 4); echo $tableheader; $classtotal = display_type($accounttype["id"], $accounttype["name"], $from, $to, $begin, $end, $compare, $convert, $dec, $pdec, $rep, $dimension, $dimension2, $drilldown, $path_to_root); } end_table(1); // outer table div_end(); }
start_table("{$table_style2} width=40%"); table_section_title("Price Check Options"); $company_record = get_company_prefs(); currencies_list_row("Customer Currency:", 'currency', get_company_pref("curr_default")); sales_types_list_row("Sales Type:", 'sales_type', null); end_table(1); hidden('action', 'p_check'); submit_center('pcheck', "Check osC Prices"); if ($num_price_errors == 0) { display_notification("No Pricing Errors Found"); } end_form(); hyperlink_params($_SERVER['PHP_SELF'], _("Refresh"), "action=pcheck"); end_page(); } if ($action == 'pupdate') { start_form(true); start_table("{$table_style2} width=40%"); table_section_title("Update Price Options"); $company_record = get_company_prefs(); currencies_list_row("Customer Currency:", 'currency', get_company_pref("curr_default")); sales_types_list_row("Sales Type:", 'sales_type', null); end_table(1); hidden('action', 'p_update'); submit_center('pupdate', "Update osC Prices"); if ($num_price_errors > 0) { display_notification("There were {$num_price_errors} prices updated"); } end_form(); end_page(); }
function customer_settings($selected_id) { global $SysPrefs, $path_to_root, $auto_create_branch; if (!$selected_id) { if (list_updated('customer_id') || !isset($_POST['CustName'])) { $_POST['CustName'] = $_POST['cust_ref'] = $_POST['address'] = $_POST['tax_id'] = ''; $_POST['dimension_id'] = 0; $_POST['dimension2_id'] = 0; $_POST['sales_type'] = -1; $_POST['curr_code'] = get_company_currency(); $_POST['credit_status'] = -1; $_POST['payment_terms'] = $_POST['notes'] = ''; $_POST['discount'] = $_POST['pymt_discount'] = percent_format(0); $_POST['credit_limit'] = price_format($SysPrefs->default_credit_limit()); } } else { $myrow = get_customer($selected_id); $_POST['CustName'] = $myrow["name"]; $_POST['cust_ref'] = $myrow["debtor_ref"]; $_POST['address'] = $myrow["address"]; $_POST['tax_id'] = $myrow["tax_id"]; $_POST['dimension_id'] = $myrow["dimension_id"]; $_POST['dimension2_id'] = $myrow["dimension2_id"]; $_POST['sales_type'] = $myrow["sales_type"]; $_POST['curr_code'] = $myrow["curr_code"]; $_POST['credit_status'] = $myrow["credit_status"]; $_POST['payment_terms'] = $myrow["payment_terms"]; $_POST['discount'] = percent_format($myrow["discount"] * 100); $_POST['pymt_discount'] = percent_format($myrow["pymt_discount"] * 100); $_POST['credit_limit'] = price_format($myrow["credit_limit"]); $_POST['notes'] = $myrow["notes"]; $_POST['inactive'] = $myrow["inactive"]; } start_outer_table(TABLESTYLE2); table_section(1); table_section_title(_("Name and Address")); text_row(_("Customer Name:"), 'CustName', $_POST['CustName'], 40, 80); text_row(_("Customer Short Name:"), 'cust_ref', null, 30, 30); textarea_row(_("Address:"), 'address', $_POST['address'], 35, 5); text_row(_("GSTNo:"), 'tax_id', null, 40, 40); if (!$selected_id || is_new_customer($selected_id)) { currencies_list_row(_("Customer's Currency:"), 'curr_code', $_POST['curr_code']); } else { label_row(_("Customer's Currency:"), $_POST['curr_code']); hidden('curr_code', $_POST['curr_code']); } sales_types_list_row(_("Sales Type/Price List:"), 'sales_type', $_POST['sales_type']); if ($selected_id) { record_status_list_row(_("Customer status:"), 'inactive'); } elseif (isset($auto_create_branch) && $auto_create_branch == 1) { table_section_title(_("Branch")); text_row(_("Phone:"), '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); sales_persons_list_row(_("Sales Person:"), 'salesman', null); } table_section(2); table_section_title(_("Sales")); percent_row(_("Discount Percent:"), 'discount', $_POST['discount']); percent_row(_("Prompt Payment Discount Percent:"), 'pymt_discount', $_POST['pymt_discount']); amount_row(_("Credit Limit:"), 'credit_limit', $_POST['credit_limit']); payment_terms_list_row(_("Payment Terms:"), 'payment_terms', $_POST['payment_terms']); credit_status_list_row(_("Credit Status:"), 'credit_status', $_POST['credit_status']); $dim = get_company_pref('use_dimension'); if ($dim >= 1) { dimensions_list_row(_("Dimension") . " 1:", 'dimension_id', $_POST['dimension_id'], true, " ", false, 1); } if ($dim > 1) { dimensions_list_row(_("Dimension") . " 2:", 'dimension2_id', $_POST['dimension2_id'], true, " ", false, 2); } if ($dim < 1) { hidden('dimension_id', 0); } if ($dim < 2) { hidden('dimension2_id', 0); } if ($selected_id) { start_row(); echo '<td class="label">' . _('Customer branches') . ':</td>'; hyperlink_params_td($path_to_root . "/sales/manage/customer_branches.php", '<b>' . (@$_REQUEST['popup'] ? _("Select or &Add") : _("&Add or Edit ")) . '</b>', "debtor_no=" . $selected_id . (@$_REQUEST['popup'] ? '&popup=1' : '')); end_row(); } textarea_row(_("General Notes:"), 'notes', null, 35, 5); if (!$selected_id && isset($auto_create_branch) && $auto_create_branch == 1) { table_section_title(_("Branch")); locations_list_row(_("Default Inventory Location:"), 'location'); shippers_list_row(_("Default Shipping Company:"), 'ship_via'); sales_areas_list_row(_("Sales Area:"), 'area', null); tax_groups_list_row(_("Tax Group:"), 'tax_group_id', null); } end_outer_table(1); div_start('controls'); if (!$selected_id) { submit_center('submit', _("Add New Customer"), true, '', 'default'); } else { submit_center_first('submit', _("Update Customer"), _('Update customer data'), @$_REQUEST['popup'] ? true : 'default'); submit_return('select', $selected_id, _("Select this customer and return to document entry.")); submit_center_last('delete', _("Delete Customer"), _('Delete customer data if have been never used'), true); } div_end(); }
} */ break; } $entryCount++; } @fclose($fp); if (!$errCnt) { if ($entryCount > 0) { display_notification("{$entryCount} {$arr[$type]} have been imported."); } else { display_error("Import file contained no {$arr[$type]}."); } } } } else { display_error("No import file selected"); } } start_form(true); start_table(TABLESTYLE2); if (!isset($_POST['type'])) { $_POST['type'] = $l_customers; } table_section_title("Import Quickbooks Data"); import_type_list_row("Import Type:", 'type', $arr, $_POST['type'], true); label_row("Import File:", "<input type='file' id='imp' name='imp'>"); end_table(1); submit_center('import', "Perform Import"); end_form(); end_page();
sales_areas_list_row(tr("Sales Area:"), 'area', null); locations_list_row(tr("Default Inventory Location:"), 'default_location', null); shippers_list_row(tr("Default Shipping Company:"), 'default_ship_via', null); tax_groups_list_row(tr("Tax Group:"), 'tax_group_id', null, 31, 30); language_list_row(tr("Language"), 'lang_code', null, 31, 30); yesno_list_row(tr("Disable this Branch:"), 'disable_trans', null); echo "</table>"; echo "</td><td class='tableseparator'>"; // outer table echo "<table>"; table_section_title(tr("GL Accounts")); gl_all_accounts_list_row(tr("Sales Account:"), 'sales_account', $_POST['sales_account']); gl_all_accounts_list_row(tr("Sales Discount Account:"), 'sales_discount_account', $_POST['sales_discount_account']); gl_all_accounts_list_row(tr("Accounts Receivable Account:"), 'receivables_account', $_POST['receivables_account']); gl_all_accounts_list_row(tr("Prompt Payment Discount Account:"), 'payment_discount_account', $_POST['payment_discount_account']); table_section_title(tr("Addresses")); textarea_row(tr("Mailing Address:"), 'br_post_address', $_POST['br_post_address'], 35, 5); textarea_row(tr("Billing Address:"), 'br_address', $_POST['br_address'], 35, 5); end_table(); end_table(1); // outer table submit_add_or_update_center(isset($_POST['New'])); end_form(); end_page(); function check_branches() { $cust = $_POST['customer_id']; $branch = $_POST['branch_code']; if ($cust != "" && $branch != "") { $sql = "SELECT branch_code from cust_branch WHERE debtor_no={$cust} AND " . "branch_code={$branch} ORDER BY branch_code ASC"; $result = db_query($sql);
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(); }
hidden('total_net', $total_net); start_outer_table(TABLESTYLE2); table_section(1); table_section_title(_("Earning Details")); if (db_has_employee_payslip($_POST['year'], $_POST['month'], $_POST['empl_id'])) { label_row(_(" Date of Paid :"), $date_of_paid); } label_row(_(" Basic:"), $basic_pay, null, 30, 30); label_row(_(" DA:"), $da_pay, null, 30, 30); label_row(_(" HRA:"), $hra_pay, null, 30, 30); label_row(_(" Conveyance:"), $convey_allow, null, 30, 30); label_row(_(" Education/ Other Allowance:"), $edu_other_allow, null, 30, 30); table_section_title(_("")); label_row(_(" Gross Earning"), $gross, 'style="color:#A86A0B; background-color:#F2F6D5;"', 'style="color:#A86A0B; background-color:#F2F6D5;"'); table_section(2); table_section_title(_("Deduction")); label_row(_(" Provident Fund:"), $pf, null, 30, 30); label_row(_(" LOP Amount:"), $lop_amount, null, 30, 30); label_row(_(" Monthly Amount:"), $staff_loan, null, 30, 30); label_row(_(" Other Deduction:"), $tds, null, 30, 30); label_row(_(" Total Deductions"), $total_ded, 'style="color:#f55; background-color:#fed;"', 'style="color:#f55; background-color:#fed;"'); label_row(_(" "), '', null, 30, 30); label_row(_(" Net Salary Payable:"), $total_net, 'style="color:#107B0F; background-color:#B7DBC1;"', 'style="color:#107B0F; background-color:#B7DBC1;"'); end_outer_table(1); if (!db_has_employee_payslip($_POST['year'], $_POST['month'], $_POST['empl_id'])) { start_table(TABLESTYLE2); echo '<tr>'; $from = Today(); $from = add_days($from, 1); $bal = get_balance_before_for_bank_account(1, $from); //echo $trans_no = kv_get_next_trans_no(99) + 1;
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'); }