From: Janusz Dobrowolski Date: Sat, 19 Sep 2009 20:24:07 +0000 (+0000) Subject: Code cleanup after db_pager optimization. X-Git-Tag: v2.4.2~19^2~1228 X-Git-Url: https://delta.frontaccounting.com/gitweb/?p=fa-stable.git;a=commitdiff_plain;h=f0f460043b9bcb6153c0f6f82d4a74433efe4ad8 Code cleanup after db_pager optimization. --- diff --git a/admin/view_print_transaction.php b/admin/view_print_transaction.php index ec5e0f2d..90943fe7 100644 --- a/admin/view_print_transaction.php +++ b/admin/view_print_transaction.php @@ -137,10 +137,6 @@ function handle_search() } $table =& new_db_pager('transactions', $sql, $cols); - if (list_updated('filterType') || get_post('ProcessSearch')) { - $table->set_sql($sql); - $table->set_columns($cols); - } $table->width = "40%"; display_db_pager($table); } diff --git a/dimensions/inquiry/search_dimensions.php b/dimensions/inquiry/search_dimensions.php index ffb1e612..5498097a 100644 --- a/dimensions/inquiry/search_dimensions.php +++ b/dimensions/inquiry/search_dimensions.php @@ -187,10 +187,6 @@ if ($outstanding_only) { $table =& new_db_pager('dim_tbl', $sql, $cols); $table->set_marker('is_overdue', _("Marked dimensions are overdue.")); -if (get_post('SearchOrders')) { - $table->set_sql($sql); - $table->set_columns($cols); -} $table->width = "80%"; start_form(); diff --git a/gl/bank_account_reconcile.php b/gl/bank_account_reconcile.php index 1bc65300..b91bed9e 100644 --- a/gl/bank_account_reconcile.php +++ b/gl/bank_account_reconcile.php @@ -265,10 +265,7 @@ display_heading($act['bank_account_name']." - ".$act['bank_curr_code']); "X"=>array('insert'=>true, 'fun'=>'rec_checkbox') ); $table =& new_db_pager('trans_tbl', $sql, $cols); - if ($update_pager) { - $table->set_sql($sql); - $table->set_columns($cols); - } + $table->width = "60%"; display_db_pager($table); diff --git a/gl/inquiry/journal_inquiry.php b/gl/inquiry/journal_inquiry.php index 2eb935e7..1c140513 100644 --- a/gl/inquiry/journal_inquiry.php +++ b/gl/inquiry/journal_inquiry.php @@ -165,10 +165,6 @@ if (!check_value('AlsoClosed')) { $table =& new_db_pager('journal_tbl', $sql, $cols); -if (get_post('Search')) { - $table->set_sql($sql); - $table->set_columns($cols); -} $table->width = "80%"; start_form(); diff --git a/gl/manage/exchange_rates.php b/gl/manage/exchange_rates.php index dd2ee6e6..e7a7f574 100644 --- a/gl/manage/exchange_rates.php +++ b/gl/manage/exchange_rates.php @@ -207,10 +207,6 @@ else { br(1); - if (list_updated('curr_abrev')) { - $table->set_sql($sql); - $table->set_columns($cols); - } $table->width = "40%"; display_db_pager($table); br(1); diff --git a/manufacturing/inquiry/where_used_inquiry.php b/manufacturing/inquiry/where_used_inquiry.php index aeea81cf..4ad2ebc7 100644 --- a/manufacturing/inquiry/where_used_inquiry.php +++ b/manufacturing/inquiry/where_used_inquiry.php @@ -61,9 +61,6 @@ $sql = "SELECT $table =& new_db_pager('usage_table', $sql, $cols); -if (get_post('_stock_id_update')) - $table->set_sql($sql); - $table->width = "80%"; display_db_pager($table); diff --git a/manufacturing/search_work_orders.php b/manufacturing/search_work_orders.php index 353c3be6..b4e0d2f5 100644 --- a/manufacturing/search_work_orders.php +++ b/manufacturing/search_work_orders.php @@ -225,10 +225,6 @@ $cols = array( $table =& new_db_pager('orders_tbl', $sql, $cols); $table->set_marker('check_overdue', _("Marked orders are overdue.")); -if (get_post('SearchOrders')) { - $table->set_sql($sql); - $table->set_columns($cols); -} $table->width = "90%"; start_form(); diff --git a/purchasing/allocations/supplier_allocation_main.php b/purchasing/allocations/supplier_allocation_main.php index 06e24e4f..4796399d 100644 --- a/purchasing/allocations/supplier_allocation_main.php +++ b/purchasing/allocations/supplier_allocation_main.php @@ -117,10 +117,6 @@ if (isset($_POST['customer_id'])) { $table =& new_db_pager('alloc_tbl', $sql, $cols); $table->set_marker('check_settled', _("Marked items are settled."), 'settledbg', 'settledfg'); -if (get_post('_ShowSettled_update') || get_post('_supplier_id_update') ) { - $table->set_sql($sql); - $table->set_columns($cols); -} $table->width = "80%"; start_form(); diff --git a/purchasing/inquiry/po_search.php b/purchasing/inquiry/po_search.php index e8f9f0c6..39ba20d8 100644 --- a/purchasing/inquiry/po_search.php +++ b/purchasing/inquiry/po_search.php @@ -187,10 +187,6 @@ if (get_post('StockLocation') != $all_items) { $table =& new_db_pager('orders_tbl', $sql, $cols); $table->set_marker('check_overdue', _("Marked orders have overdue items.")); -if (get_post('SearchOrders')) { - $table->set_sql($sql); - $table->set_columns($cols); -} $table->width = "80%"; start_form(); diff --git a/purchasing/inquiry/po_search_completed.php b/purchasing/inquiry/po_search_completed.php index f13c95fd..aa2f269a 100644 --- a/purchasing/inquiry/po_search_completed.php +++ b/purchasing/inquiry/po_search_completed.php @@ -170,10 +170,6 @@ if (get_post('StockLocation') != $all_items) { $table =& new_db_pager('orders_tbl', $sql, $cols); -if (get_post('SearchOrders')) { - $table->set_sql($sql); - $table->set_columns($cols); -} $table->width = "80%"; start_form(); diff --git a/purchasing/inquiry/supplier_allocation_inquiry.php b/purchasing/inquiry/supplier_allocation_inquiry.php index 98e7e4d1..89383141 100644 --- a/purchasing/inquiry/supplier_allocation_inquiry.php +++ b/purchasing/inquiry/supplier_allocation_inquiry.php @@ -196,10 +196,6 @@ if ($_POST['supplier_id'] != ALL_TEXT) { $table =& new_db_pager('doc_tbl', $sql, $cols); $table->set_marker('check_overdue', _("Marked items are overdue.")); -if (get_post('RefreshInquiry')) { - $table->set_sql($sql); - $table->set_columns($cols); -} $table->width = "90%"; start_form(); diff --git a/purchasing/inquiry/supplier_inquiry.php b/purchasing/inquiry/supplier_inquiry.php index dff07c66..079faf1c 100644 --- a/purchasing/inquiry/supplier_inquiry.php +++ b/purchasing/inquiry/supplier_inquiry.php @@ -233,10 +233,6 @@ if ($_POST['supplier_id'] != ALL_TEXT) $table =& new_db_pager('trans_tbl', $sql, $cols); $table->set_marker('check_overdue', _("Marked items are overdue.")); -if (get_post('RefreshInquiry')) { - $table->set_sql($sql); - $table->set_columns($cols); -} $table->width = "85%"; start_form(); diff --git a/sales/allocations/customer_allocation_main.php b/sales/allocations/customer_allocation_main.php index 80783de4..ad031353 100644 --- a/sales/allocations/customer_allocation_main.php +++ b/sales/allocations/customer_allocation_main.php @@ -114,10 +114,6 @@ if (isset($_POST['customer_id'])) { $table =& new_db_pager('alloc_tbl', $sql, $cols); $table->set_marker('check_settled', _("Marked items are settled."), 'settledbg', 'settledfg'); -if (get_post('_ShowSettled_update') || get_post('_customer_id_update')) { - $table->set_sql($sql); - $table->set_columns($cols); -} $table->width = "75%"; display_db_pager($table); diff --git a/sales/inquiry/customer_allocation_inquiry.php b/sales/inquiry/customer_allocation_inquiry.php index 5fb9ad81..252e9611 100644 --- a/sales/inquiry/customer_allocation_inquiry.php +++ b/sales/inquiry/customer_allocation_inquiry.php @@ -224,10 +224,6 @@ if ($_POST['customer_id'] != ALL_TEXT) { $table =& new_db_pager('doc_tbl', $sql, $cols); $table->set_marker('check_overdue', _("Marked items are overdue.")); -if (get_post('RefreshInquiry')) { - $table->set_sql($sql); - $table->set_columns($cols); -} $table->width = "80%"; start_form(); diff --git a/sales/inquiry/customer_inquiry.php b/sales/inquiry/customer_inquiry.php index abfb73da..08021e26 100644 --- a/sales/inquiry/customer_inquiry.php +++ b/sales/inquiry/customer_inquiry.php @@ -295,10 +295,6 @@ if ($_POST['customer_id'] != ALL_TEXT) { $table =& new_db_pager('trans_tbl', $sql, $cols); $table->set_marker('check_overdue', _("Marked items are overdue.")); -if (get_post('RefreshInquiry')) { - $table->set_sql($sql); - $table->set_columns($cols); -} $table->width = "85%"; start_form(); diff --git a/sales/inquiry/sales_deliveries_view.php b/sales/inquiry/sales_deliveries_view.php index 4f601014..d39a733e 100644 --- a/sales/inquiry/sales_deliveries_view.php +++ b/sales/inquiry/sales_deliveries_view.php @@ -255,10 +255,6 @@ if (isset($_SESSION['Batch'])) $table =& new_db_pager('deliveries_tbl', $sql, $cols); $table->set_marker('check_overdue', _("Marked items are overdue.")); -if (get_post('SearchOrders')) { - $table->set_sql($sql); - $table->set_columns($cols); -} //$table->width = "92%"; start_form(); diff --git a/sales/inquiry/sales_orders_view.php b/sales/inquiry/sales_orders_view.php index e0d2f957..9ec7cc31 100644 --- a/sales/inquiry/sales_orders_view.php +++ b/sales/inquiry/sales_orders_view.php @@ -362,10 +362,6 @@ if ($_POST['order_view_mode'] == 'OutstandingOnly') { $table =& new_db_pager('orders_tbl', $sql, $cols); $table->set_marker('check_overdue', _("Marked items are overdue.")); -if (get_post('SearchOrders')) { - $table->set_sql($sql); - $table->set_columns($cols); -} $table->width = "80%"; start_form();