$th[2] = _("Balance Sheet"); } inactive_control_column($th); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["cid"]); label_cell($myrow['class_name']); if (isset($use_oldstyle_convert) && $use_oldstyle_convert == 1) { $myrow['ctype'] = $myrow["ctype"] >= CL_ASSETS && $myrow["ctype"] < CL_INCOME ? 1 : 0; label_cell($myrow['ctype'] == 1 ? _("Yes") : _("No")); } else { label_cell($class_types[$myrow["ctype"]]); } inactive_control_cell($myrow["cid"], $myrow["inactive"], 'chart_class', 'cid'); edit_button_cell("Edit" . $myrow["cid"], _("Edit")); delete_button_cell("Delete" . $myrow["cid"], _("Delete")); end_row(); } inactive_control_row($th); end_table(1); //----------------------------------------------------------------------------------- start_table(TABLESTYLE2); if ($selected_id != "") { if ($Mode == 'Edit') { //editing an existing status code $myrow = get_account_class($selected_id); $_POST['id'] = $myrow["cid"]; $_POST['name'] = $myrow["class_name"]; if (isset($use_oldstyle_convert) && $use_oldstyle_convert == 1) {
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'"); }
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["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"];
unset($_POST); $_POST['show_inactive'] = $sav; } //----------------------------------------------------------------------------------- $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"];
start_form(); start_table(TABLESTYLE, "width=40%"); $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"];
} //------------------------------------------------------------------------------------------------- $result = get_crm_categories(check_value('show_inactive')); start_form(); start_table(TABLESTYLE, "width=70%"); $th = array(_("Category Type"), _("Category Subtype"), _("Short Name"), _("Description"), "", " "); inactive_control_column($th); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["type"]); label_cell($myrow["action"]); label_cell($myrow["name"]); label_cell($myrow["description"]); inactive_control_cell($myrow["id"], $myrow["inactive"], 'crm_categories', 'id'); edit_button_cell("Edit" . $myrow["id"], _("Edit")); if ($myrow["system"]) { label_cell(''); } else { 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 area
$sav = get_post('show_inactive'); unset($_POST); $_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"]; }
table_header($th); $k = 0; //row colour counter while ($myrow = db_fetch($result)) { alt_table_row_color($k); $last_visit_date = sql2date($myrow["last_visit_date"]); /*The security_headings array is defined in config.php */ $not_me = strcasecmp($myrow["user_id"], $_SESSION["wa_current_user"]->username); label_cell($myrow["user_id"]); label_cell($myrow["real_name"]); label_cell($myrow["phone"]); email_cell($myrow["email"]); label_cell($last_visit_date, "nowrap"); label_cell($myrow["role"]); if ($not_me) { inactive_control_cell($myrow["id"], $myrow["inactive"], 'users', 'id'); } elseif (check_value('show_inactive')) { label_cell(''); } edit_button_cell("Edit" . $myrow["id"], _("Edit")); if ($not_me) { delete_button_cell("Delete" . $myrow["id"], _("Delete")); } else { label_cell(''); } end_row(); } //END WHILE LIST LOOP inactive_control_row($th); end_table(1); //-------------------------------------------------------------------------------------------------
$result = get_payment_terms_all(check_value('show_inactive')); start_form(); 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') {
start_table(TABLESTYLE, "width=60%"); $th = array(_('ID'), _('Booklet Type'), _('Begin'), _('End'), _('Year'), _('Status'), '', ''); inactive_control_column($th); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { $formatted = substr($myrow['year'], 2) . "-"; alt_table_row_color($k); label_cell($myrow['id']); //label_cell($myrow['no']); label_cell($myrow['type']); label_cell($formatted . str_pad($myrow['begin'], 4, 0, STR_PAD_LEFT)); label_cell($formatted . str_pad($myrow['end'], 4, 0, STR_PAD_LEFT)); label_cell($myrow['year']); label_cell($myrow['status1'] . "/" . $myrow['status']); inactive_control_cell($myrow["id"], $myrow["inactive"], 'booklet', 'id'); edit_button_cell("Edit" . $myrow['id'], _("Edit")); delete_button_cell("Delete" . $myrow['id'], _("Delete")); end_row(); } inactive_control_row($th); end_table(); br(); start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { $myrow = get_selected_booklet($selected_id); //$_POST['no'] = $myrow['no']; $_POST['type'] = $myrow['type']; $_POST['begin'] = $myrow['begin']; $_POST['end'] = $myrow['end'];
if ($sav) { $_POST['show_inactive'] = 1; } } $result = get_item_subject(check_value('show_inactive')); start_form(); start_table(TABLESTYLE, "width=30%"); $th = array(_("No"), _("Description"), "", ""); 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"], 'subject', '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 area $myrow = get_selected_item_subject($selected_id); $_POST['description'] = $myrow["description"]; }
start_form(); start_table(TABLESTYLE, "width='60%'"); $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"];
$sav = get_post('show_inactive'); unset($_POST); $_POST['show_inactive'] = $sav; } //----------------------------------------------------------------------------------- $result = get_all_movement_type(check_value('show_inactive')); start_form(); start_table(TABLESTYLE, "width='30%'"); $th = array(_("Description"), "", ""); inactive_control_column($th); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["name"]); inactive_control_cell($myrow["id"], $myrow["inactive"], 'movement_types', '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 status code $myrow = get_movement_type($selected_id); $_POST['name'] = $myrow["name"]; } hidden('selected_id', $selected_id);
unset($_POST); $_POST['show_inactive'] = $sav; } //----------------------------------------------------------------------------------- $result = get_all_work_centres(check_value('show_inactive')); start_form(); start_table(TABLESTYLE, "width=50%"); $th = array(_("Name"), _("description"), "", ""); inactive_control_column($th); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["name"]); label_cell($myrow["description"]); inactive_control_cell($myrow["id"], $myrow["inactive"], 'workcentres', '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 status code $myrow = get_work_centre($selected_id); $_POST['name'] = $myrow["name"]; $_POST['description'] = $myrow["description"]; }
start_form(); start_table(TABLESTYLE, "width=30%"); $th = array(_("Name"), _("Tax exempt"), '', ''); inactive_control_column($th); table_header($th); $k = 0; while ($myrow = db_fetch($result2)) { alt_table_row_color($k); if ($myrow["exempt"] == 0) { $disallow_text = _("No"); } else { $disallow_text = _("Yes"); } label_cell($myrow["name"]); label_cell($disallow_text); inactive_control_cell($myrow["id"], $myrow["inactive"], 'item_tax_types', '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') { $myrow = get_item_tax_type($selected_id); unset($_POST); // clear exemption checkboxes $_POST['name'] = $myrow["name"]; $_POST['exempt'] = $myrow["exempt"];
$result = get_item_locations(check_value('show_inactive')); start_form(); 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"];
$k = 0; $base_sales = get_base_sales_type(); while ($myrow = db_fetch($result)) { if ($myrow["id"] == $base_sales) { start_row("class='overduebg'"); } else { alt_table_row_color($k); } label_cell($myrow["sales_type"]); $f = number_format2($myrow["factor"], 4); if ($myrow["id"] == $base_sales) { $f = "<I>" . _('Base') . "</I>"; } label_cell($f); label_cell($myrow["tax_included"] ? _('Yes') : _('No'), 'align=center'); inactive_control_cell($myrow["id"], $myrow["inactive"], 'sales_types', 'id'); edit_button_cell("Edit" . $myrow['id'], _("Edit")); delete_button_cell("Delete" . $myrow['id'], _("Delete")); end_row(); } inactive_control_row($th); end_table(); display_note(_("Marked sales type is the company base pricelist for prices calculations."), 0, 0, "class='overduefg'"); //---------------------------------------------------------------------------------------------------- if (!isset($_POST['tax_included'])) { $_POST['tax_included'] = 0; } if (!isset($_POST['base'])) { $_POST['base'] = 0; } start_table(TABLESTYLE2);
$result = get_shippers(check_value('show_inactive')); start_form(); 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"];
} //---------------------------------------------------------------------------------- $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"];
if ($sav) { $_POST['show_inactive'] = 1; } } $result = get_item_level(check_value('show_inactive')); start_form(); start_table(TABLESTYLE, "width=30%"); $th = array(_("No"), _("Description"), "", ""); 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"], 'levels', '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 area $myrow = get_selected_item_level($selected_id); $_POST['description'] = $myrow["description"]; }
$k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["bank_account_name"], "nowrap"); label_cell($bank_account_types[$myrow["account_type"]], "nowrap"); label_cell($myrow["bank_curr_code"], "nowrap"); label_cell($myrow["account_code"] . " " . $myrow["account_name"], "nowrap"); label_cell($myrow["bank_name"], "nowrap"); label_cell($myrow["bank_account_number"], "nowrap"); label_cell($myrow["bank_address"]); if ($myrow["dflt_curr_act"]) { label_cell(_("Yes")); } else { label_cell(_("No")); } inactive_control_cell($myrow["id"], $myrow["inactive"], 'bank_accounts', 'id'); edit_button_cell("Edit" . $myrow["id"], _("Edit")); delete_button_cell("Delete" . $myrow["id"], _("Delete")); end_row(); } inactive_control_row($th); end_table(1); $is_used = $selected_id != -1 && key_in_foreign_table($selected_id, 'bank_trans', 'bank_act'); start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { $myrow = get_bank_account($selected_id); $_POST['account_code'] = $myrow["account_code"]; $_POST['account_type'] = $myrow["account_type"]; $_POST['bank_name'] = $myrow["bank_name"]; $_POST['bank_account_name'] = $myrow["bank_account_name"];
inactive_control_column($th); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); $bs_text = get_account_class_name($myrow["class_id"]); if ($myrow["parent"] == '-1') { $parent_text = ""; } else { $parent_text = get_account_type_name($myrow["parent"]); } label_cell($myrow["id"]); label_cell($myrow["name"]); label_cell($parent_text); label_cell($bs_text); inactive_control_cell($myrow["id"], $myrow["inactive"], 'chart_types', '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 != "") { if ($Mode == 'Edit') { //editing an existing status code $myrow = get_account_type($selected_id); $_POST['id'] = $myrow["id"]; $_POST['name'] = $myrow["name"]; $_POST['parent'] = $myrow["parent"];
//----------------------------------------------------------------------------------- $result = get_all_requisitions(check_value('show_inactive')); start_form(); start_table(TABLESTYLE, "width=50%"); $th = array(_("RNo. "), _("Point of use"), _("Narrative"), _("Application Date"), "", "", _("Details")); inactive_control_column($th); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["requisition_id"]); label_cell($myrow["point_of_use"]); label_cell($myrow["narrative"]); label_cell(sql2date($myrow["application_date"])); edit_button_cell("Edit" . $myrow['requisition_id'], _("Edit")); inactive_control_cell($myrow["requisition_id"], $myrow["inactive"], 'requisitions', 'requisition_id'); delete_button_cell("Delete" . $myrow['requisition_id'], _("Delete")); echo "<td><a href='requisition_details.php?requisitionid=" . $myrow['requisition_id'] . "'>" . _("Details") . "</a></td>\n"; 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_requisition($selected_id); $_POST['point_of_use'] = $myrow["point_of_use"]; $_POST['narrative'] = $myrow["narrative"]; $_POST['details'] = $myrow["details"];
$_POST['show_inactive'] = 1; } } //------------------------------------------------------------------------------------------------- $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);
//---------------------------------------------------------------------------------------------------- $result = get_all_sales_points(check_value('show_inactive')); start_form(); start_table(TABLESTYLE); $th = array(_('POS Name'), _('Credit sale'), _('Cash sale'), _('Location'), _('Default account'), '', ''); inactive_control_column($th); table_header($th); $k = 0; while ($myrow = db_fetch($result)) { alt_table_row_color($k); label_cell($myrow["pos_name"], "nowrap"); label_cell($myrow['credit_sale'] ? _('Yes') : _('No')); label_cell($myrow['cash_sale'] ? _('Yes') : _('No')); label_cell($myrow["location_name"], ""); label_cell($myrow["bank_account_name"], ""); inactive_control_cell($myrow["id"], $myrow["inactive"], "sales_pos", 'id'); edit_button_cell("Edit" . $myrow['id'], _("Edit")); delete_button_cell("Delete" . $myrow['id'], _("Delete")); end_row(); } inactive_control_row($th); end_table(1); //---------------------------------------------------------------------------------------------------- $cash = db_has_cash_accounts(); if (!$cash) { display_note(_("To have cash POS first define at least one cash bank account.")); } start_table(TABLESTYLE2); if ($selected_id != -1) { if ($Mode == 'Edit') { $myrow = get_sales_point($selected_id);