All *_list() functions now does not display html directly - added echo when needed.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 15 Nov 2009 20:58:54 +0000 (20:58 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 15 Nov 2009 20:58:54 +0000 (20:58 +0000)
22 files changed:
admin/backups.php
admin/inst_module.php
admin/print_profiles.php
gl/includes/ui/gl_bank_ui.inc
gl/includes/ui/gl_journal_ui.inc
gl/manage/exchange_rates.php
includes/ui/ui_input.inc
inventory/cost_update.php
inventory/inquiry/stock_status.php
inventory/manage/item_codes.php
inventory/manage/items.php
inventory/manage/sales_kits.php
inventory/prices.php
inventory/purchasing_data.php
inventory/reorder_level.php
manufacturing/inquiry/where_used_inquiry.php
manufacturing/manage/bom_edit.php
purchasing/allocations/supplier_allocation_main.php
purchasing/includes/ui/invoice_ui.inc
purchasing/includes/ui/po_ui.inc
sales/allocations/customer_allocation_main.php
sales/manage/customer_branches.php

index 3f45f522872a00c5ff51528cb05881cb376513b4..efa78619d75a2fae547ad16be348bbf8b19a114e 100644 (file)
@@ -97,7 +97,7 @@ function compress_list_row($label, $name, $value=null)
        $ar_comps['gzip'] = "gzip";
 
        echo "<tr><td>$label</td><td>";
-       array_selector('comp', $value, $ar_comps);
+       echo array_selector('comp', $value, $ar_comps);
        echo "</td></tr>";
 }
 
index 067e83f0281aba94f5d4d0975ac569ef216d5b30..c465a55133e8cb9708d4c941c9adc110e29a1f1a 100644 (file)
@@ -348,7 +348,7 @@ if (list_updated('extset'))
        $Ajax->activate('_page_body');
 
 echo "<center>" . _('Extensions:') . "&nbsp;&nbsp;";
-extset_list('extset', null, true);
+echo extset_list('extset', null, true);
 echo "</center><br>";
 
 $set = get_post('extset', -1);
index 1df47c67f512ca3a8c8c96e81a4d84c2e2c2dff6..5b387534800efcf551e00e0e15f6d34872f7ba5a 100644 (file)
@@ -160,7 +160,7 @@ foreach(get_reports() as $rep => $descr)
     label_cell($descr == '' ? '???<sup>1)</sup>' : _($descr));
        $_POST['Prn'.$rep] = isset($prints[$rep]) ? $prints[$rep] : '';
     echo '<td>';
-       printers_list('Prn'.$rep, null, 
+       echo printers_list('Prn'.$rep, null, 
                $rep == '' ? _('Browser support') : _('Default'));
        echo '</td>';
        if ($descr == '') $unkn = 1;
index 4014426e97c47e492212225df99a390082e3ae15..46408216862749dd478d5064e7ad4f01f2976b99 100644 (file)
@@ -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)
index 04d703dda35f368e6ef9860506c7bea783dd7d29..3d0a97239f8d17048477bce42f83ceada78067ca 100644 (file)
@@ -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)
index 5bc3b25226e5aa84ef1bd97474e658a0ec991161..a22b71526814cb7dbb101ec1d4eba07c1172df1e 100644 (file)
@@ -172,7 +172,7 @@ if (!isset($_POST['curr_abrev']))
 
 echo "<center>";
 echo _("Select a currency :") . "  ";
-currencies_list('curr_abrev', null, true);
+echo currencies_list('curr_abrev', null, true);
 echo "</center>";
 
 // if currency sel has changed, clear the form
index 1b73f1a40397d848dca2c422dbc123c4637e6a96..b2a49e2b90a447cdb5848382d2f922ccd0ac205e 100644 (file)
@@ -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 "<center>";
+       if ($echo) echo "<center>";
        submit($name, $value, $echo, $title, $async, $icon);
-       echo "</center>";
+       if ($echo) echo "</center>";
 }
 
 function submit_center_first($name, $value, $title=false, $async=false, $icon=false)
index 1c05c3bbecffd04dbf38e8af870aefb747c1ea11..2ce775fc66c439681abba877375a998e465d954a 100644 (file)
@@ -83,7 +83,7 @@ if (!isset($_POST['stock_id']))
        $_POST['stock_id'] = get_global_stock_item();
 
 echo "<center>" . _("Item:"). "&nbsp;";
-stock_costable_items_list('stock_id', $_POST['stock_id'], false, true);
+echo stock_costable_items_list('stock_id', $_POST['stock_id'], false, true);
 
 echo "</center><hr>";
 set_global_stock_item($_POST['stock_id']);
index ee0e58716551cc5cfc0164cde0222a841ce91995..d3d8781a05836e5e7cd7b87239585b9aba93dd5b 100644 (file)
@@ -39,7 +39,7 @@ if (!isset($_POST['stock_id']))
        $_POST['stock_id'] = get_global_stock_item();
 
 echo "<center> " . _("Item:"). " ";
-stock_items_list('stock_id', $_POST['stock_id'], false, true);
+echo stock_items_list('stock_id', $_POST['stock_id'], false, true);
 echo "<br>";
 
 echo "<hr></center>";
index af88a52044a021b059f8e00fbdb02a14636d94e6..a731d9ed5336078555ff2aeb6c0b2753753994e3 100644 (file)
@@ -103,7 +103,7 @@ if (!isset($_POST['stock_id']))
        $_POST['stock_id'] = get_global_stock_item();
 
 echo "<center>" . _("Item:"). "&nbsp;";
-stock_purchasable_items_list('stock_id', $_POST['stock_id'], false, true);
+echo stock_purchasable_items_list('stock_id', $_POST['stock_id'], false, true);
 
 echo "<hr></center>";
 
index 59fc76713f3435ed915d3582c7ec91213570a86f..ac04293321b4b714c559cc374521a942a9c7ead4 100644 (file)
@@ -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']))) {
 
index 30fcc48aff0cec88467782ab7e9f86cefc388765..005af381f9d9418587d62e0bf08dffb72d4a9c27 100644 (file)
@@ -183,7 +183,7 @@ if ($Mode == 'RESET')
 start_form();
 
 echo "<center>" . _("Select a sale kit:") . "&nbsp;";
-sales_kits_list('item_code', null, _('New kit'), true);
+echo sales_kits_list('item_code', null, _('New kit'), true);
 echo "</center><br>";
 $props = get_kit_props($_POST['item_code']);
 
index 70bec34ec9fa4b4d570d9150f920c2852ef442d5..40dd11f793dab99bfd143c79d95e6d145659c5b0 100644 (file)
@@ -54,7 +54,7 @@ if (!isset($_POST['stock_id']))
        $_POST['stock_id'] = get_global_stock_item();
 
 echo "<center>" . _("Item:"). "&nbsp;";
-sales_items_list('stock_id', $_POST['stock_id'], false, true);
+echo sales_items_list('stock_id', $_POST['stock_id'], false, true);
 echo "<hr></center>";
 
 set_global_stock_item($_POST['stock_id']);
index 1970481ac52cce36506c54187bf2ce46fe0f6410..b77a92bdac5778e94ac3dc058d942146e2c2d6aa 100644 (file)
@@ -115,7 +115,7 @@ if (!isset($_POST['stock_id']))
        $_POST['stock_id'] = get_global_stock_item();
 
 echo "<center>" . _("Item:"). "&nbsp;";
-stock_purchasable_items_list('stock_id', $_POST['stock_id'], false, true);
+echo stock_purchasable_items_list('stock_id', $_POST['stock_id'], false, true);
 
 echo "<hr></center>";
 
index 49f5f5ca12f5abc8f0e41aa9817c2f4955de914d..25e849554dbba04f5aae19a4105979687c7cfbc4 100644 (file)
@@ -41,7 +41,7 @@ if (!isset($_POST['stock_id']))
        $_POST['stock_id'] = get_global_stock_item();
 
 echo "<center>" . _("Item:"). "&nbsp;";
-stock_costable_items_list('stock_id', $_POST['stock_id'], false, true);
+echo stock_costable_items_list('stock_id', $_POST['stock_id'], false, true);
 
 echo "<hr></center>";
 
index 016c336f73535e1dbab3b274c2a427b412faffd2..14286c0acebf3f5c8f0edd24c7e0802d87f371ef 100644 (file)
@@ -26,7 +26,7 @@ if (!isset($_POST['stock_id']))
        $_POST['stock_id'] = get_global_stock_item();
 
 echo "<center>" . _("Select an item to display its parent item(s).") . "&nbsp;";
-stock_items_list('stock_id', $_POST['stock_id'], false, true);
+echo stock_items_list('stock_id', $_POST['stock_id'], false, true);
 echo "<hr></center>";
 
 set_global_stock_item($_POST['stock_id']);
index dc89783a68452d63df10a7f58b94d1f23f33c037..742c2b1a8c5f72e2ac6ad028949bd5e37587f2ca 100644 (file)
@@ -266,7 +266,7 @@ start_form();
                label_cell(_("Component:"));
 
                echo "<td>";
-               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');
index a14565946c0fc42463653043705c6ee1bd6c6d6d..3487767544f025f0dea620d3b5fdd2e1c012c49a 100644 (file)
@@ -34,7 +34,7 @@ start_form();
        $_POST['supplier_id'] = get_global_supplier();
 
     echo "<center>" . _("Select a Supplier: ") . "&nbsp;&nbsp;";
-       supplier_list('supplier_id', $_POST['supplier_id'], true, true);
+       echo supplier_list('supplier_id', $_POST['supplier_id'], true, true);
     echo "<br>";
     check(_("Show Settled Items:"), 'ShowSettled', null, true);
        echo "</center><br><br>";
index 4f419d533fc2c6436c87e17afa532dbe520ee5a1..baf2ceb5fa281f390a920d1eb1a198921bc9e77f 100644 (file)
@@ -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 "<div style='float:right;'>";
                        echo _("Quick Entry:")."&nbsp;"; 
-                       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
index 9c1f667a82b899a692e650fbcf1c8a776889947a..dcc5f0583bb239c6796322012802f983ac3b9c3f 100644 (file)
@@ -119,7 +119,7 @@ function display_po_header(&$order)
 
        echo "<tr><td>" . _("Receive Into:") . "</td>";
        echo "<td>";
-    locations_list('StkLocation', null, false, true);
+    echo locations_list('StkLocation', null, false, true);
        echo "</td></tr>";
 
        table_section(3);
index 309bba50a92e06328a490c40bd5deca3c43af59a..ef40147e2a8490753961653b0d1d4e1ab9e15b3b 100644 (file)
@@ -30,7 +30,7 @@ start_form();
        $_POST['customer_id'] = get_global_customer();
 
     echo "<center>" . _("Select a customer: ") . "&nbsp;&nbsp;";
-       customer_list('customer_id', $_POST['customer_id'], true, true);
+       echo customer_list('customer_id', $_POST['customer_id'], true, true);
     echo "<br>";
     check(_("Show Settled Items:"), 'ShowSettled', null, true);
        echo "</center><br><br>";
index 6897178b85ede0d7f54adbe0ebee65933604e8ce..3850e8baa59738fcfa299ac1f2d264cb1c24044e 100644 (file)
@@ -206,7 +206,7 @@ function select_link($row) {
 start_form();
 
 echo "<center>" . _("Select a customer: ") . "&nbsp;&nbsp;";
-customer_list('customer_id', null, false, true);
+echo customer_list('customer_id', null, false, true);
 echo "</center><br>";
 
 $num_branches = db_customer_has_branches($_POST['customer_id']);