function display_kit_items($selected_kit) { $result = get_item_kit($selected_kit); div_start('bom'); start_table(TABLESTYLE, "width='60%'"); $th = array(_("Stock Item"), _("Description"), _("Quantity"), _("Units"), '', ''); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["stock_id"]); label_cell($myrow["comp_name"]); qty_cell($myrow["quantity"], false, $myrow["units"] == '' ? 0 : get_qty_dec($myrow["comp_name"])); label_cell($myrow["units"] == '' ? _('kit') : $myrow["units"]); edit_button_cell("Edit" . $myrow['id'], _("Edit")); delete_button_cell("Delete" . $myrow['id'], _("Delete")); end_row(); } //END WHILE LIST LOOP end_table(); div_end(); }
function display_bom_items($selected_parent) { $result = get_bom($selected_parent); div_start('bom'); start_table(TABLESTYLE, "width=60%"); $th = array(_("Code"), _("Description"), _("Location"), _("Work Centre"), _("Quantity"), _("Units"), '', ''); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["component"]); label_cell($myrow["description"]); label_cell($myrow["location_name"]); label_cell($myrow["WorkCentreDescription"]); qty_cell($myrow["quantity"], false, get_qty_dec($myrow["component"])); label_cell($myrow["units"]); edit_button_cell("Edit" . $myrow['id'], _("Edit")); delete_button_cell("Delete" . $myrow['id'], _("Delete")); end_row(); } //END WHILE LIST LOOP end_table(); div_end(); }
$th = array(_("Description"), _("Dissallow Invoices"), '', ''); inactive_control_column($th); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); if ($myrow["dissallow_invoices"] == 0) { $disallow_text = _("Invoice OK"); } else { $disallow_text = "<b>" . _("NO INVOICING") . "</b>"; } label_cell($myrow["reason_description"]); label_cell($disallow_text); inactive_control_cell($myrow["id"], $myrow["inactive"], 'credit_status', 'id'); edit_button_cell("Edit" . $myrow['id'], _("Edit")); delete_button_cell("Delete" . $myrow['id'], _("Delete")); end_row(); } inactive_control_row($th); end_table(); echo '<br>'; //----------------------------------------------------------------------------------- start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing status code $myrow = get_credit_status($selected_id); $_POST['reason_description'] = $myrow["reason_description"]; $_POST['DisallowInvoices'] = $myrow["dissallow_invoices"]; } hidden('selected_id', $selected_id);
start_table(TABLESTYLE); $th = array(_("Name"), _("Contact Person"), _("Phone Number"), _("Secondary Phone"), _("Address"), "", ""); inactive_control_column($th); table_header($th); $k = 0; //row colour counter while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["shipper_name"]); label_cell($myrow["contact"]); label_cell($myrow["phone"]); label_cell($myrow["phone2"]); label_cell($myrow["address"]); inactive_control_cell($myrow["shipper_id"], $myrow["inactive"], 'shippers', 'shipper_id'); edit_button_cell("Edit" . $myrow["shipper_id"], _("Edit")); delete_button_cell("Delete" . $myrow["shipper_id"], _("Delete")); end_row(); } inactive_control_row($th); end_table(1); //---------------------------------------------------------------------------------------------- start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing Shipper $myrow = get_shipper($selected_id); $_POST['shipper_name'] = $myrow["shipper_name"]; $_POST['contact'] = $myrow["contact"]; $_POST['phone'] = $myrow["phone"]; $_POST['phone2'] = $myrow["phone2"]; $_POST['address'] = $myrow["address"];
} else { start_table(TABLESTYLE, "width=65%"); $th = array(_("Supplier"), _("Price"), _("Currency"), _("Supplier's Unit"), _("Conversion Factor"), _("Supplier's Description"), "", ""); table_header($th); $k = $j = 0; //row colour counter while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["supp_name"]); amount_decimal_cell($myrow["price"]); label_cell($myrow["curr_code"]); label_cell($myrow["suppliers_uom"]); qty_cell($myrow['conversion_factor'], false, 'max'); label_cell($myrow["supplier_description"]); edit_button_cell("Edit" . $myrow['supplier_id'], _("Edit")); delete_button_cell("Delete" . $myrow['supplier_id'], _("Delete")); end_row(); $j++; if ($j == 12) { $j = 1; table_header($th); } //end of page full new headings } //end of while loop end_table(); } div_end(); } //----------------------------------------------------------------------------------------------- $dec2 = 6;
} end_table(1); //------------------------------------------------------------------------------------------------------------------- $vresult = get_all_asset_valuations($_POST['assetid']); start_form(); start_table(TABLESTYLE, "width=50%"); $th = array(_("Valuation Year"), _("Asset Value"), _("Value Change"), ""); inactive_control_column($th); table_header($th); $k = 0; while ($myrow = db_fetch($vresult)) { alt_table_row_color($k); label_cell($myrow["valuation_year"]); amount_cell($myrow["asset_value"]); amount_cell($myrow["value_change"]); delete_button_cell("Delete" . $myrow['asset_valuation_id'], _("Delete")); end_row(); } end_table(1); start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing status code $myrow = get_asset_valuation($selected_id); $_POST['valuationyear'] = $myrow["valuation_year"]; $_POST['assetvalue'] = number_format2($myrow["asset_value"], 2); } hidden('selected_id', $selected_id); } text_row(_("Year of Valuation :"), 'valuationyear', null, 50, 50); amount_row(_("Asset Value :"), 'assetvalue', null, null, null, 2);
$th = array(_("Name"), _("Phone"), _("Fax"), _("Email"), _("Provision"), _("Break Pt."), _("Provision") . " 2", "", ""); inactive_control_column($th); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["salesman_name"]); label_cell($myrow["salesman_phone"]); label_cell($myrow["salesman_fax"]); email_cell($myrow["salesman_email"]); label_cell(percent_format($myrow["provision"]) . " %", "nowrap align=right"); amount_cell($myrow["break_pt"]); label_cell(percent_format($myrow["provision2"]) . " %", "nowrap align=right"); inactive_control_cell($myrow["salesman_code"], $myrow["inactive"], 'salesman', 'salesman_code'); edit_button_cell("Edit" . $myrow["salesman_code"], _("Edit")); delete_button_cell("Delete" . $myrow["salesman_code"], _("Delete")); end_row(); } //END WHILE LIST LOOP inactive_control_row($th); end_table(); echo '<br>'; //------------------------------------------------------------------------------------------------ $_POST['salesman_email'] = ""; if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing Sales-person $myrow = get_salesman($selected_id); $_POST['salesman_name'] = $myrow["salesman_name"]; $_POST['salesman_phone'] = $myrow["salesman_phone"]; $_POST['salesman_fax'] = $myrow["salesman_fax"];
} //------------------------------------------------------------------------------------------------- $result = get_sales_groups(check_value('show_inactive')); start_form(); start_table(TABLESTYLE, "width=30%"); $th = array(_("ID"), _("Group Name"), "", ""); inactive_control_column($th); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["id"]); label_cell($myrow["description"]); inactive_control_cell($myrow["id"], $myrow["inactive"], 'groups', 'id'); edit_button_cell("Edit" . $myrow["id"], _("Edit")); delete_button_cell("Delete" . $myrow["id"], _("Delete")); end_row(); } inactive_control_row($th); end_table(1); //------------------------------------------------------------------------------------------------- start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing group $myrow = get_sales_group($selected_id); $_POST['description'] = $myrow["description"]; } hidden("selected_id", $selected_id); label_row(_("ID"), $myrow["id"]); }
$k = 0; //row colour counter while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["description"]); label_cell($myrow["tax_name"]); label_cell($myrow["dflt_units"], "align=center"); label_cell($stock_types[$myrow["dflt_mb_flag"]]); label_cell($myrow["dflt_sales_act"], "align=center"); label_cell($myrow["dflt_inventory_act"], "align=center"); label_cell($myrow["dflt_cogs_act"], "align=center"); label_cell($myrow["dflt_adjustment_act"], "align=center"); label_cell($myrow["dflt_assembly_act"], "align=center"); inactive_control_cell($myrow["category_id"], $myrow["inactive"], 'stock_category', 'category_id'); edit_button_cell("Edit" . $myrow["category_id"], _("Edit")); delete_button_cell("Delete" . $myrow["category_id"], _("Delete")); end_row(); } inactive_control_row($th); end_table(); echo '<br>'; //---------------------------------------------------------------------------------- div_start('details'); start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing item category $myrow = get_item_category($selected_id); $_POST['category_id'] = $myrow["category_id"]; $_POST['description'] = $myrow["description"]; $_POST['tax_type_id'] = $myrow["dflt_tax_type"];
$result = get_all_item_units(check_value('show_inactive')); start_form(); start_table(TABLESTYLE, "width=40%"); $th = array(_('Unit'), _('Description'), _('Decimals'), "", ""); inactive_control_column($th); table_header($th); $k = 0; //row colour counter while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["abbr"]); label_cell($myrow["name"]); label_cell($myrow["decimals"] == -1 ? _("User Quantity Decimals") : $myrow["decimals"]); inactive_control_cell($myrow["abbr"], $myrow["inactive"], 'item_units', 'abbr'); edit_button_cell("Edit" . $myrow["abbr"], _("Edit")); delete_button_cell("Delete" . $myrow["abbr"], _("Delete")); end_row(); } inactive_control_row($th); end_table(1); //---------------------------------------------------------------------------------- start_table(TABLESTYLE2); if ($selected_id != '') { if ($Mode == 'Edit') { //editing an existing item category $myrow = get_item_unit($selected_id); $_POST['abbr'] = $myrow["abbr"]; $_POST['description'] = $myrow["name"]; $_POST['decimals'] = $myrow["decimals"]; } hidden('selected_id', $selected_id);
function display_languages() { global $table_style, $installed_languages, $dflt_lang, $GetText; $th = array(_("Language"), _("Name"), _("Encoding"), _("Right To Left"), _("Installed"), _("Available"), _("Default"), "", ""); $currlang = $_SESSION["language"]->code; div_start('lang_tbl'); start_form(); // // select/display system locales support for sites using native gettext // if (function_exists('gettext')) { if (check_value('DisplayAll')) { array_insert($th, 7, _("Supported")); } start_table(); check_row(_('Display also languages not supported by server locales'), 'DisplayAll', null, true); end_table(); } start_table(TABLESTYLE); table_header($th); $k = 0; // get list of all (available and installed) langauges $langs = get_languages_list(); foreach ($langs as $pkg_name => $lng) { if ($lng == 'C') { // skip default locale (aka no translation) continue; } $lang = $lng['code']; $lang_name = $lng['name']; $charset = $lng['encoding']; $rtl = @$lng['rtl'] == 'yes' || @$lng['rtl'] === true; $available = @$lng['available']; $installed = @$lng['version']; $id = @$lng['local_id']; if ($lang == $currlang) { start_row("class='stockmankobg'"); } else { alt_table_row_color($k); } $support = $GetText->check_support($lang, $charset); if (function_exists('gettext') && !$support && !get_post('DisplayAll')) { continue; } label_cell($lang); label_cell($available ? get_package_view_str($lang, $lang_name) : $lang_name); label_cell($charset); label_cell($rtl ? _("Yes") : _("No")); label_cell($id === null ? _("None") : ($available && $installed ? $installed : _("Unknown"))); label_cell($available ? $available : _("None")); label_cell($id === null ? '' : radio(null, 'CurDflt', $id, $dflt_lang == $lang, true), "align='center'"); if (function_exists('gettext') && check_value('DisplayAll')) { label_cell($support ? _("Yes") : _("No")); } if (!$available && $lang != 'C') { // manually installed language button_cell('Edit' . $id, _("Edit"), _('Edit non standard language configuration'), ICON_EDIT); } elseif (check_pkg_upgrade($installed, $available)) { // outdated or not installed language in repo button_cell('Update' . $pkg_name, $installed ? _("Update") : _("Install"), _('Upload and install latest language package'), ICON_DOWN); } else { label_cell(''); } if ($id !== null && $lang != $currlang && $lang != 'C') { delete_button_cell('Delete' . $id, _('Delete')); submit_js_confirm('Delete' . $id, sprintf(_("You are about to remove language \\'%s\\'.\nDo you want to continue ?"), $lang_name)); } else { label_cell(''); } end_row(); } end_table(); display_note(_("The marked language is the current language which cannot be deleted."), 0, 0, "class='currentfg'"); br(); submit_center_first('Refresh', _("Update default"), '', null); submit_center_last('Add', _("Add new language manually"), '', false); end_form(); div_end(); }
$_POST['show_inactive'] = $sav; } //------------------------------------------------------------------------------------------------- $result = get_sales_areas(check_value('show_inactive')); start_form(); start_table(TABLESTYLE, "width=30%"); $th = array(_("Area Name"), "", ""); inactive_control_column($th); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["description"]); inactive_control_cell($myrow["area_code"], $myrow["inactive"], 'areas', 'area_code'); edit_button_cell("Edit" . $myrow["area_code"], _("Edit")); delete_button_cell("Delete" . $myrow["area_code"], _("Delete")); end_row(); } inactive_control_row($th); end_table(); echo '<br>'; //------------------------------------------------------------------------------------------------- start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing area $myrow = get_sales_area($selected_id); $_POST['description'] = $myrow["description"]; } hidden("selected_id", $selected_id); }
start_table(TABLESTYLE); $th = array(_("Description"), _("Type"), _("Due After/Days"), "", ""); inactive_control_column($th); table_header($th); $k = 0; //row colour counter while ($myrow = db_fetch($result)) { alt_table_row_color($k); $type = term_type($myrow); $days = term_days($myrow); label_cell($myrow["terms"]); label_cell($pterm_types[$type]); label_cell($type == PTT_DAYS ? "{$days} " . _("days") : ($type == PTT_FOLLOWING ? $days : _("N/A"))); inactive_control_cell($myrow["terms_indicator"], $myrow["inactive"], 'payment_terms', "terms_indicator"); edit_button_cell("Edit" . $myrow["terms_indicator"], _("Edit")); delete_button_cell("Delete" . $myrow["terms_indicator"], _("Delete")); end_row(); } inactive_control_row($th); end_table(1); //------------------------------------------------------------------------------------------------- if (list_updated('type')) { $Ajax->activate('edits'); } div_start('edits'); start_table(TABLESTYLE2); $day_in_following_month = $days_before_due = 0; if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing payment terms $myrow = get_payment_terms($selected_id);
start_form(); start_table(TABLESTYLE, "width=40%"); $th = array(_('Unit'), _('Description'), _('Decimals'), "", ""); inactive_control_column($th); table_header($th); $k = 0; //row colour counter while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["abbr"]); label_cell($myrow["name"]); label_cell($myrow["decimals"] == -1 ? _("User Quantity Decimals") : $myrow["decimals"]); $id = htmlentities($myrow["abbr"]); inactive_control_cell($id, $myrow["inactive"], 'item_units', 'abbr'); edit_button_cell("Edit" . $id, _("Edit")); delete_button_cell("Delete" . $id, _("Delete")); end_row(); } inactive_control_row($th); end_table(1); //---------------------------------------------------------------------------------- start_table(TABLESTYLE2); if ($selected_id != '') { if ($Mode == 'Edit') { //editing an existing item category $myrow = get_item_unit($selected_id); $_POST['abbr'] = $myrow["abbr"]; $_POST['description'] = $myrow["name"]; $_POST['decimals'] = $myrow["decimals"]; } hidden('selected_id', $myrow["abbr"]);
echo "<hr/>\n"; $result = get_all_requisition_details(get_post('requisitionid')); start_form(); start_table(TABLESTYLE, "width=50%"); $th = array(_("Item Code"), _("Item Name"), _("Purpose"), _("Qrder Quantity"), _("Estimate Price"), "", ""); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["item_code"]); label_cell($myrow["description"]); label_cell($myrow["purpose"]); label_cell($myrow["order_quantity"]); amount_cell($myrow["estimate_price"]); edit_button_cell("Edit" . $myrow['requisition_detail_id'], _("Edit")); delete_button_cell("Delete" . $myrow['requisition_detail_id'], _("Delete")); end_row(); } end_table(1); //----------------------------------------------------------------------------------- start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing status code $myrow = get_requisition_detail($selected_id); $_POST['item_code'] = $myrow["item_code"]; $_POST['purpose'] = $myrow["purpose"]; $_POST['order_quantity'] = $myrow["order_quantity"]; $_POST['estimate_price'] = $myrow["estimate_price"]; } hidden('selected_id', $selected_id);
function display_extensions() { global $installed_extensions; div_start('ext_tbl'); start_table(TABLESTYLE); $th = array(_("Extension"), _("Modules provided"), _("Options provided"), _("Installed"), _("Available"), "", ""); table_header($th); $k = 0; $mods = get_extensions_list('extension'); foreach ($mods as $pkg_name => $ext) { $available = @$ext['available']; $installed = @$ext['version']; $id = @$ext['local_id']; $entries = fmt_titles(@$ext['entries']); $tabs = fmt_titles(@$ext['tabs']); alt_table_row_color($k); label_cell($available ? get_package_view_str($pkg_name, $ext['name']) : $ext['name']); label_cell($tabs); label_cell($entries); label_cell($id === null ? _("None") : ($available && $installed ? $installed : _("Unknown"))); label_cell($available ? $available : _("Unknown")); if (!$available && $ext['type'] == 'extension') { // third-party plugin if (!$installed) { button_cell('Local' . $ext['package'], _("Install"), _('Install third-party extension.'), ICON_DOWN); } else { label_cell(''); } } elseif (check_pkg_upgrade($installed, $available)) { // outdated or not installed extension in repo button_cell('Update' . $pkg_name, $installed ? _("Update") : _("Install"), _('Upload and install latest extension package'), ICON_DOWN); } else { label_cell(''); } if ($id !== null) { delete_button_cell('Delete' . $id, _('Delete')); submit_js_confirm('Delete' . $id, sprintf(_("You are about to remove package \\'%s\\'.\nDo you want to continue ?"), $ext['name'])); } else { label_cell(''); } end_row(); } end_table(1); submit_center_first('Refresh', _("Update"), '', null); div_end(); }
function display_fiscalyears() { $company_year = get_company_pref('f_year'); $result = get_all_fiscalyears(); start_form(); display_note(_("Warning: Deleting a fiscal year all transactions \n\t\tare removed and converted into relevant balances. This process is irreversible!"), 0, 1, "class='currentfg'"); start_table(TABLESTYLE); $th = array(_("Fiscal Year Begin"), _("Fiscal Year End"), _("Closed"), "", ""); table_header($th); $k = 0; $row_cnt = 0; $can_close = true; while ($myrow = db_fetch($result)) { $row_cnt++; if ($myrow['id'] == $company_year) { start_row("class='stockmankobg'"); } else { alt_table_row_color($k); } $from = sql2date($myrow["begin"]); $to = sql2date($myrow["end"]); $closed_text = yesno_value($myrow["closed"]); label_cell($from); label_cell($to); label_cell($closed_text); // can only close year if there are no earlier open years; can reopen year that is closed if ($can_close || $myrow["closed"] != 0) { edit_button_cell("Edit" . $myrow['id'], _("Closed?")); } else { label_cell(''); } // can only delete first year if it is closed and not current year if ($myrow["id"] != $company_year && $row_cnt == 1 && $myrow["closed"] != 0) { delete_button_cell("Delete" . $myrow['id'], _("Delete")); submit_js_confirm("Delete" . $myrow['id'], sprintf(_("Are you sure you want to delete fiscal year %s - %s? All transactions are deleted and converted into relevant balances. Do you want to continue ?"), $from, $to)); } else { label_cell(''); } end_row(); if ($myrow["closed"] == 0) { $can_close = false; } } end_table(); end_form(); display_note(_("The marked fiscal year is the current fiscal year which cannot be deleted."), 0, 0, "class='currentfg'"); }
$mods = get_charts_list(); foreach ($mods as $pkg_name => $ext) { $available = @$ext['available']; $installed = @$ext['version']; $id = @$ext['local_id']; $encoding = @$ext['encoding']; alt_table_row_color($k); // label_cell(is_array($ext['Descr']) ? $ext['Descr'][0] : $ext['Descr']); label_cell($available ? get_package_view_str($pkg_name, $ext['name']) : $ext['name']); label_cell($id === null ? _("None") : ($available && $installed ? $installed : _("Unknown"))); label_cell($available ? $available : _("None")); label_cell($encoding ? $encoding : _("Unknown")); if ($available && check_pkg_upgrade($installed, $available)) { // outdated or not installed theme in repo button_cell('Update' . $pkg_name, $installed ? _("Update") : _("Install"), _('Upload and install latest extension package'), ICON_DOWN); } else { label_cell(''); } if ($id !== null) { delete_button_cell('Delete' . $id, _('Delete')); submit_js_confirm('Delete' . $id, sprintf(_("You are about to remove package \\'%s\\'.\nDo you want to continue ?"), $ext['name'])); } else { label_cell(''); } end_row(); } end_table(1); div_end(); //--------------------------------------------------------------------------------------------- end_form(); end_page();
function display_currencies() { $company_currency = get_company_currency(); $result = get_currencies(check_value('show_inactive')); start_table(TABLESTYLE); $th = array(_("Abbreviation"), _("Symbol"), _("Currency Name"), _("Hundredths name"), _("Country"), _("Auto update"), "", ""); inactive_control_column($th); table_header($th); $k = 0; //row colour counter while ($myrow = db_fetch($result)) { if ($myrow[1] == $company_currency) { start_row("class='currencybg'"); } else { alt_table_row_color($k); } label_cell($myrow["curr_abrev"]); label_cell($myrow["curr_symbol"]); label_cell($myrow["currency"]); label_cell($myrow["hundreds_name"]); label_cell($myrow["country"]); label_cell($myrow[1] == $company_currency ? '-' : ($myrow["auto_update"] ? _('Yes') : _('No')), "align='center'"); inactive_control_cell($myrow["curr_abrev"], $myrow["inactive"], 'currencies', 'curr_abrev'); edit_button_cell("Edit" . $myrow["curr_abrev"], _("Edit")); if ($myrow["curr_abrev"] != $company_currency) { delete_button_cell("Delete" . $myrow["curr_abrev"], _("Delete")); } else { label_cell(''); } end_row(); } //END WHILE LIST LOOP inactive_control_row($th); end_table(); display_note(_("The marked currency is the home currency which cannot be deleted."), 0, 0, "class='currentfg'"); }
start_table(TABLESTYLE); $th = array(_("Location Code"), _("Location Name"), _("Address"), _("Phone"), _("Secondary Phone"), "", ""); inactive_control_column($th); table_header($th); $k = 0; //row colour counter while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["loc_code"]); label_cell($myrow["location_name"]); label_cell($myrow["delivery_address"]); label_cell($myrow["phone"]); label_cell($myrow["phone2"]); inactive_control_cell($myrow["loc_code"], $myrow["inactive"], 'locations', 'loc_code'); edit_button_cell("Edit" . $myrow["loc_code"], _("Edit")); delete_button_cell("Delete" . $myrow["loc_code"], _("Delete")); end_row(); } //END WHILE LIST LOOP inactive_control_row($th); end_table(); echo '<br>'; start_table(TABLESTYLE2); $_POST['email'] = ""; if ($selected_id != -1) { //editing an existing Location if ($Mode == 'Edit') { $myrow = get_item_location($selected_id); $_POST['loc_code'] = $myrow["loc_code"]; $_POST['location_name'] = $myrow["location_name"]; $_POST['delivery_address'] = $myrow["delivery_address"];
} //----------------------------------------------------------------------------------- $result = get_all_asset_types(check_value('show_inactive')); start_form(); start_table(TABLESTYLE, "width=30%"); $th = array(_("Asset Type Name"), _("Depreciation Rate"), "", ""); inactive_control_column($th); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["asset_type_name"]); label_cell($myrow["depreciation_rate"]); inactive_control_cell($myrow["asset_type_id"], $myrow["inactive"], 'asset_types', 'asset_type_id'); edit_button_cell("Edit" . $myrow['asset_type_id'], _("Edit")); delete_button_cell("Delete" . $myrow['asset_type_id'], _("Delete")); end_row(); } inactive_control_row($th); end_table(1); //----------------------------------------------------------------------------------- start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { //editing an existing status code $myrow = get_asset_type($selected_id); $_POST['name'] = $myrow["asset_type_name"]; $_POST['rate'] = $myrow["depreciation_rate"]; $_POST['asset_account'] = $myrow["asset_account"]; $_POST['depreciation_account'] = $myrow["depreciation_account"]; $_POST['accumulated_account'] = $myrow["accumulated_account"];