From: Janusz Dobrowolski Date: Sun, 15 Nov 2009 20:58:54 +0000 (+0000) Subject: All *_list() functions now does not display html directly - added echo when needed. X-Git-Tag: v2.4.2~19^2~1024 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=a71350aae19e5abbfdac6b0552664897f98c5557;p=fa-stable.git All *_list() functions now does not display html directly - added echo when needed. --- diff --git a/admin/backups.php b/admin/backups.php index 3f45f522..efa78619 100644 --- a/admin/backups.php +++ b/admin/backups.php @@ -97,7 +97,7 @@ function compress_list_row($label, $name, $value=null) $ar_comps['gzip'] = "gzip"; echo "$label"; - array_selector('comp', $value, $ar_comps); + echo array_selector('comp', $value, $ar_comps); echo ""; } diff --git a/admin/inst_module.php b/admin/inst_module.php index 067e83f0..c465a551 100644 --- a/admin/inst_module.php +++ b/admin/inst_module.php @@ -348,7 +348,7 @@ if (list_updated('extset')) $Ajax->activate('_page_body'); echo "
" . _('Extensions:') . "  "; -extset_list('extset', null, true); +echo extset_list('extset', null, true); echo "

"; $set = get_post('extset', -1); diff --git a/admin/print_profiles.php b/admin/print_profiles.php index 1df47c67..5b387534 100644 --- a/admin/print_profiles.php +++ b/admin/print_profiles.php @@ -160,7 +160,7 @@ foreach(get_reports() as $rep => $descr) label_cell($descr == '' ? '???1)' : _($descr)); $_POST['Prn'.$rep] = isset($prints[$rep]) ? $prints[$rep] : ''; echo ''; - printers_list('Prn'.$rep, null, + echo printers_list('Prn'.$rep, null, $rep == '' ? _('Browser support') : _('Default')); echo ''; if ($descr == '') $unkn = 1; diff --git a/gl/includes/ui/gl_bank_ui.inc b/gl/includes/ui/gl_bank_ui.inc index 4014426e..46408216 100644 --- a/gl/includes/ui/gl_bank_ui.inc +++ b/gl/includes/ui/gl_bank_ui.inc @@ -197,7 +197,7 @@ function gl_edit_item_controls(&$order, $dim, $Index=null) $_POST['LineMemo'] = $item->reference; hidden('Index', $id); - gl_all_accounts_list('code_id', null, true, true); + echo gl_all_accounts_list('code_id', null, true, true); if ($dim >= 1) dimensions_list_cells(null, 'dimension_id', null, true, " ", false, 1); if ($dim > 1) @@ -230,7 +230,7 @@ function gl_edit_item_controls(&$order, $dim, $Index=null) $_POST['code_id'] = get_company_pref($payment ? 'default_cogs_act':'default_inv_sales_act'); } - gl_all_accounts_list('code_id', null, true, true); + echo gl_all_accounts_list('code_id', null, true, true); if ($dim >= 1) dimensions_list_cells(null, 'dimension_id', null, true, " ", false, 1); if ($dim > 1) diff --git a/gl/includes/ui/gl_journal_ui.inc b/gl/includes/ui/gl_journal_ui.inc index 04d703dd..3d0a9723 100644 --- a/gl/includes/ui/gl_journal_ui.inc +++ b/gl/includes/ui/gl_journal_ui.inc @@ -170,7 +170,7 @@ function gl_edit_item_controls(&$order, $dim, $Index=null) hidden('Index', $id); $skip_bank = !$_SESSION["wa_current_user"]->can_access('SA_BANKJOURNAL'); - gl_all_accounts_list('code_id', null, $skip_bank, true); + echo gl_all_accounts_list('code_id', null, $skip_bank, true); if ($dim >= 1) dimensions_list_cells(null, 'dimension_id', null, true, " ", false, 1); if ($dim > 1) @@ -192,7 +192,7 @@ function gl_edit_item_controls(&$order, $dim, $Index=null) } $skip_bank = !$_SESSION["wa_current_user"]->can_access('SA_BANKJOURNAL'); - gl_all_accounts_list('code_id', null, $skip_bank, true); + echo gl_all_accounts_list('code_id', null, $skip_bank, true); if ($dim >= 1) dimensions_list_cells(null, 'dimension_id', null, true, " ", false, 1); if ($dim > 1) diff --git a/gl/manage/exchange_rates.php b/gl/manage/exchange_rates.php index 5bc3b252..a22b7152 100644 --- a/gl/manage/exchange_rates.php +++ b/gl/manage/exchange_rates.php @@ -172,7 +172,7 @@ if (!isset($_POST['curr_abrev'])) echo "
"; echo _("Select a currency :") . " "; -currencies_list('curr_abrev', null, true); +echo currencies_list('curr_abrev', null, true); echo "
"; // if currency sel has changed, clear the form diff --git a/includes/ui/ui_input.inc b/includes/ui/ui_input.inc index 1b73f1a4..b2a49e2b 100644 --- a/includes/ui/ui_input.inc +++ b/includes/ui/ui_input.inc @@ -154,9 +154,9 @@ function submit($name, $value, $echo=true, $title=false, $atype=false, $icon=fal function submit_center($name, $value, $echo=true, $title=false, $async=false, $icon=false) { - echo "
"; + if ($echo) echo "
"; submit($name, $value, $echo, $title, $async, $icon); - echo "
"; + if ($echo) echo "
"; } function submit_center_first($name, $value, $title=false, $async=false, $icon=false) diff --git a/inventory/cost_update.php b/inventory/cost_update.php index 1c05c3bb..2ce775fc 100644 --- a/inventory/cost_update.php +++ b/inventory/cost_update.php @@ -83,7 +83,7 @@ if (!isset($_POST['stock_id'])) $_POST['stock_id'] = get_global_stock_item(); echo "
" . _("Item:"). " "; -stock_costable_items_list('stock_id', $_POST['stock_id'], false, true); +echo stock_costable_items_list('stock_id', $_POST['stock_id'], false, true); echo "

"; set_global_stock_item($_POST['stock_id']); diff --git a/inventory/inquiry/stock_status.php b/inventory/inquiry/stock_status.php index ee0e5871..d3d8781a 100644 --- a/inventory/inquiry/stock_status.php +++ b/inventory/inquiry/stock_status.php @@ -39,7 +39,7 @@ if (!isset($_POST['stock_id'])) $_POST['stock_id'] = get_global_stock_item(); echo "
" . _("Item:"). " "; -stock_items_list('stock_id', $_POST['stock_id'], false, true); +echo stock_items_list('stock_id', $_POST['stock_id'], false, true); echo "
"; echo "
"; diff --git a/inventory/manage/item_codes.php b/inventory/manage/item_codes.php index af88a520..a731d9ed 100644 --- a/inventory/manage/item_codes.php +++ b/inventory/manage/item_codes.php @@ -103,7 +103,7 @@ if (!isset($_POST['stock_id'])) $_POST['stock_id'] = get_global_stock_item(); echo "
" . _("Item:"). " "; -stock_purchasable_items_list('stock_id', $_POST['stock_id'], false, true); +echo stock_purchasable_items_list('stock_id', $_POST['stock_id'], false, true); echo "
"; diff --git a/inventory/manage/items.php b/inventory/manage/items.php index 59fc7671..ac042933 100644 --- a/inventory/manage/items.php +++ b/inventory/manage/items.php @@ -348,7 +348,7 @@ text_row(_("Name:"), 'description', null, 52, 50); textarea_row(_('Description:'), 'long_description', null, 42, 3); -stock_categories_list_row(_("Category:"), 'category_id', null, $new_item); +stock_categories_list_row(_("Category:"), 'category_id', null, false, $new_item); if ($new_item && (list_updated('category_id') || !isset($_POST['units']))) { diff --git a/inventory/manage/sales_kits.php b/inventory/manage/sales_kits.php index 30fcc48a..005af381 100644 --- a/inventory/manage/sales_kits.php +++ b/inventory/manage/sales_kits.php @@ -183,7 +183,7 @@ if ($Mode == 'RESET') start_form(); echo "
" . _("Select a sale kit:") . " "; -sales_kits_list('item_code', null, _('New kit'), true); +echo sales_kits_list('item_code', null, _('New kit'), true); echo "

"; $props = get_kit_props($_POST['item_code']); diff --git a/inventory/prices.php b/inventory/prices.php index 70bec34e..40dd11f7 100644 --- a/inventory/prices.php +++ b/inventory/prices.php @@ -54,7 +54,7 @@ if (!isset($_POST['stock_id'])) $_POST['stock_id'] = get_global_stock_item(); echo "
" . _("Item:"). " "; -sales_items_list('stock_id', $_POST['stock_id'], false, true); +echo sales_items_list('stock_id', $_POST['stock_id'], false, true); echo "
"; set_global_stock_item($_POST['stock_id']); diff --git a/inventory/purchasing_data.php b/inventory/purchasing_data.php index 1970481a..b77a92bd 100644 --- a/inventory/purchasing_data.php +++ b/inventory/purchasing_data.php @@ -115,7 +115,7 @@ if (!isset($_POST['stock_id'])) $_POST['stock_id'] = get_global_stock_item(); echo "
" . _("Item:"). " "; -stock_purchasable_items_list('stock_id', $_POST['stock_id'], false, true); +echo stock_purchasable_items_list('stock_id', $_POST['stock_id'], false, true); echo "
"; diff --git a/inventory/reorder_level.php b/inventory/reorder_level.php index 49f5f5ca..25e84955 100644 --- a/inventory/reorder_level.php +++ b/inventory/reorder_level.php @@ -41,7 +41,7 @@ if (!isset($_POST['stock_id'])) $_POST['stock_id'] = get_global_stock_item(); echo "
" . _("Item:"). " "; -stock_costable_items_list('stock_id', $_POST['stock_id'], false, true); +echo stock_costable_items_list('stock_id', $_POST['stock_id'], false, true); echo "
"; diff --git a/manufacturing/inquiry/where_used_inquiry.php b/manufacturing/inquiry/where_used_inquiry.php index 016c336f..14286c0a 100644 --- a/manufacturing/inquiry/where_used_inquiry.php +++ b/manufacturing/inquiry/where_used_inquiry.php @@ -26,7 +26,7 @@ if (!isset($_POST['stock_id'])) $_POST['stock_id'] = get_global_stock_item(); echo "
" . _("Select an item to display its parent item(s).") . " "; -stock_items_list('stock_id', $_POST['stock_id'], false, true); +echo stock_items_list('stock_id', $_POST['stock_id'], false, true); echo "
"; set_global_stock_item($_POST['stock_id']); diff --git a/manufacturing/manage/bom_edit.php b/manufacturing/manage/bom_edit.php index dc89783a..742c2b1a 100644 --- a/manufacturing/manage/bom_edit.php +++ b/manufacturing/manage/bom_edit.php @@ -266,7 +266,7 @@ start_form(); label_cell(_("Component:")); echo ""; - stock_component_items_list('component', $selected_parent, null, false, true); + echo stock_component_items_list('component', $selected_parent, null, false, true); if (get_post('_component_update')) { $Ajax->activate('quantity'); diff --git a/purchasing/allocations/supplier_allocation_main.php b/purchasing/allocations/supplier_allocation_main.php index a1456594..34877675 100644 --- a/purchasing/allocations/supplier_allocation_main.php +++ b/purchasing/allocations/supplier_allocation_main.php @@ -34,7 +34,7 @@ start_form(); $_POST['supplier_id'] = get_global_supplier(); echo "
" . _("Select a Supplier: ") . "  "; - supplier_list('supplier_id', $_POST['supplier_id'], true, true); + echo supplier_list('supplier_id', $_POST['supplier_id'], true, true); echo "
"; check(_("Show Settled Items:"), 'ShowSettled', null, true); echo "


"; diff --git a/purchasing/includes/ui/invoice_ui.inc b/purchasing/includes/ui/invoice_ui.inc index 4f419d53..baf2ceb5 100644 --- a/purchasing/includes/ui/invoice_ui.inc +++ b/purchasing/includes/ui/invoice_ui.inc @@ -170,7 +170,7 @@ function display_gl_controls(&$supp_trans, $k) $_POST['gl_code'] = $accs['purchase_account']; alt_table_row_color($k); - gl_all_accounts_list('gl_code', null, true, true); + echo gl_all_accounts_list('gl_code', null, true, true); $dim = get_company_pref('use_dimension'); if ($dim >= 1) dimensions_list_cells(null, 'dimension_id', null, true, " ", false, 1); @@ -219,7 +219,7 @@ function display_gl_items(&$supp_trans, $mode=0) { echo "
"; echo _("Quick Entry:")." "; - quick_entries_list('qid', null, QE_SUPPINV, true); + echo quick_entries_list('qid', null, QE_SUPPINV, true); $qid = get_quick_entry(get_post('qid')); if (list_updated('qid')) { unset($_POST['totamount']); // enable default diff --git a/purchasing/includes/ui/po_ui.inc b/purchasing/includes/ui/po_ui.inc index 9c1f667a..dcc5f058 100644 --- a/purchasing/includes/ui/po_ui.inc +++ b/purchasing/includes/ui/po_ui.inc @@ -119,7 +119,7 @@ function display_po_header(&$order) echo "" . _("Receive Into:") . ""; echo ""; - locations_list('StkLocation', null, false, true); + echo locations_list('StkLocation', null, false, true); echo ""; table_section(3); diff --git a/sales/allocations/customer_allocation_main.php b/sales/allocations/customer_allocation_main.php index 309bba50..ef40147e 100644 --- a/sales/allocations/customer_allocation_main.php +++ b/sales/allocations/customer_allocation_main.php @@ -30,7 +30,7 @@ start_form(); $_POST['customer_id'] = get_global_customer(); echo "
" . _("Select a customer: ") . "  "; - customer_list('customer_id', $_POST['customer_id'], true, true); + echo customer_list('customer_id', $_POST['customer_id'], true, true); echo "
"; check(_("Show Settled Items:"), 'ShowSettled', null, true); echo "


"; diff --git a/sales/manage/customer_branches.php b/sales/manage/customer_branches.php index 6897178b..3850e8ba 100644 --- a/sales/manage/customer_branches.php +++ b/sales/manage/customer_branches.php @@ -206,7 +206,7 @@ function select_link($row) { start_form(); echo "
" . _("Select a customer: ") . "  "; -customer_list('customer_id', null, false, true); +echo customer_list('customer_id', null, false, true); echo "

"; $num_branches = db_customer_has_branches($_POST['customer_id']);