From 66f9e2b10f04d768269cfd30fe0cf39b37806997 Mon Sep 17 00:00:00 2001 From: "johnny@pittpc.com" Date: Wed, 10 Feb 2021 13:40:28 -0500 Subject: [PATCH] Removed Records per page as a setting and added it as session variable define at 10 by default when logged in DB Structure Updated --- accounts.php | 6 +++--- alerts_archived.php | 6 +++--- assets.php | 6 +++--- categories.php | 6 +++--- client_assets.php | 6 +++--- client_certificates.php | 6 +++--- client_contacts.php | 6 +++--- client_documents.php | 6 +++--- client_domains.php | 6 +++--- client_invoices.php | 6 +++--- client_locations.php | 6 +++--- client_logins.php | 6 +++--- client_networks.php | 6 +++--- client_payments.php | 6 +++--- client_quotes.php | 6 +++--- client_recurring.php | 6 +++--- client_software.php | 6 +++--- client_tickets.php | 6 +++--- client_trips.php | 6 +++--- client_vendors.php | 6 +++--- clients.php | 6 +++--- companies.php | 6 +++--- db.sql | 3 +-- expenses.php | 6 +++--- get_settings.php | 1 - header.php | 5 +++++ invoices.php | 6 +++--- logs.php | 6 +++--- pagination.php | 14 +++++++------- payments.php | 6 +++--- post.php | 6 ++---- products.php | 6 +++--- quotes.php | 6 +++--- recurring.php | 6 +++--- revenues.php | 6 +++--- setup.php | 2 +- test_client_payments_by_invoice.php | 6 +++--- test_contacts.php | 6 +++--- test_domains.php | 6 +++--- tickets.php | 6 +++--- transfers.php | 6 +++--- trips.php | 6 +++--- user_logs.php | 6 +++--- users.php | 6 +++--- vendors.php | 6 +++--- 45 files changed, 133 insertions(+), 132 deletions(-) diff --git a/accounts.php b/accounts.php index 4ad2995a..bbc8b942 100644 --- a/accounts.php +++ b/accounts.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/alerts_archived.php b/alerts_archived.php index d3519787..cc3f5515 100644 --- a/alerts_archived.php +++ b/alerts_archived.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/assets.php b/assets.php index a4f7b727..46944194 100644 --- a/assets.php +++ b/assets.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/categories.php b/categories.php index f0a45bba..6bd05333 100644 --- a/categories.php +++ b/categories.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/client_assets.php b/client_assets.php index f12c7dd4..26cff128 100644 --- a/client_assets.php +++ b/client_assets.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/client_certificates.php b/client_certificates.php index 166d8341..e4bb20c3 100644 --- a/client_certificates.php +++ b/client_certificates.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/client_contacts.php b/client_contacts.php index 64cf9ef3..e17f5a08 100644 --- a/client_contacts.php +++ b/client_contacts.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/client_documents.php b/client_documents.php index f779f18c..bc2cd88b 100644 --- a/client_documents.php +++ b/client_documents.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/client_domains.php b/client_domains.php index 04335e2a..797a8a6d 100644 --- a/client_domains.php +++ b/client_domains.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/client_invoices.php b/client_invoices.php index 27d03899..a562c11e 100644 --- a/client_invoices.php +++ b/client_invoices.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/client_locations.php b/client_locations.php index d51c40d0..5fd82c8d 100644 --- a/client_locations.php +++ b/client_locations.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/client_logins.php b/client_logins.php index 7115dd20..421fb3d6 100644 --- a/client_logins.php +++ b/client_logins.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/client_networks.php b/client_networks.php index c56e3af8..a3eb9185 100644 --- a/client_networks.php +++ b/client_networks.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/client_payments.php b/client_payments.php index 83893681..ada705b9 100644 --- a/client_payments.php +++ b/client_payments.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/client_quotes.php b/client_quotes.php index ec8285cb..cced16f6 100644 --- a/client_quotes.php +++ b/client_quotes.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/client_recurring.php b/client_recurring.php index aaceb729..07d644c9 100644 --- a/client_recurring.php +++ b/client_recurring.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/client_software.php b/client_software.php index 0673c4f9..cfa61512 100644 --- a/client_software.php +++ b/client_software.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/client_tickets.php b/client_tickets.php index aaf2359a..bc98b57d 100644 --- a/client_tickets.php +++ b/client_tickets.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/client_trips.php b/client_trips.php index f13b46fd..905b7690 100644 --- a/client_trips.php +++ b/client_trips.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/client_vendors.php b/client_vendors.php index 555bba5b..29730b90 100644 --- a/client_vendors.php +++ b/client_vendors.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/clients.php b/clients.php index b8237305..7d8e88ff 100644 --- a/clients.php +++ b/clients.php @@ -10,11 +10,11 @@ if($session_permission_level == 2){ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/companies.php b/companies.php index 1755c1c3..bc52d959 100644 --- a/companies.php +++ b/companies.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/db.sql b/db.sql index 8f2faf67..77c11ce9 100644 --- a/db.sql +++ b/db.sql @@ -729,7 +729,6 @@ CREATE TABLE `settings` ( `config_default_expense_payment_method` varchar(200) DEFAULT NULL, `config_default_calendar` int(11) DEFAULT NULL, `config_default_net_terms` int(11) DEFAULT NULL, - `config_records_per_page` int(10) NOT NULL, `config_invoice_prefix` varchar(200) DEFAULT NULL, `config_invoice_next_number` int(11) DEFAULT NULL, `config_invoice_footer` text DEFAULT NULL, @@ -970,4 +969,4 @@ CREATE TABLE `vendors` ( /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2021-02-08 20:00:18 +-- Dump completed on 2021-02-10 13:39:33 diff --git a/expenses.php b/expenses.php index ae9abbd1..bbe59557 100644 --- a/expenses.php +++ b/expenses.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/get_settings.php b/get_settings.php index 833d1c99..c9d4f818 100644 --- a/get_settings.php +++ b/get_settings.php @@ -26,7 +26,6 @@ $config_default_payment_method = $row['config_default_payment_method']; $config_default_expense_payment_method = $row['config_default_expense_payment_method']; $config_default_calendar = $row['config_default_calendar']; $config_default_net_terms = $row['config_default_net_terms']; -$config_records_per_page = $row['config_records_per_page']; //Invoice/Quote $config_invoice_prefix = $row['config_invoice_prefix']; diff --git a/header.php b/header.php index 2c7a623a..0638bc4e 100644 --- a/header.php +++ b/header.php @@ -76,4 +76,9 @@ scratch. This page gets rid of all links and provides the needed markup only. } + //Set Records Per Page + if(empty($_SESSION['records_per_page'])){ + $_SESSION['records_per_page'] = 10; + } + ?> \ No newline at end of file diff --git a/invoices.php b/invoices.php index 08d709c7..5cf6fa61 100644 --- a/invoices.php +++ b/invoices.php @@ -54,11 +54,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/logs.php b/logs.php index c0bea253..e5261689 100644 --- a/logs.php +++ b/logs.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/pagination.php b/pagination.php index 3e4001f7..736f5e51 100644 --- a/pagination.php +++ b/pagination.php @@ -1,7 +1,7 @@ 10) { $i=0; @@ -14,12 +14,12 @@ if ($total_found_rows > 10) {
diff --git a/payments.php b/payments.php index ed45a6c5..4e587ecb 100644 --- a/payments.php +++ b/payments.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/post.php b/post.php index af4b18a9..cc518420 100644 --- a/post.php +++ b/post.php @@ -18,9 +18,7 @@ use PHPMailer\PHPMailer\Exception; if(isset($_POST['change_records_per_page'])){ - $records_per_page = intval($_POST['change_records_per_page']); - - mysqli_query($mysqli,"UPDATE settings SET config_records_per_page = $records_per_page WHERE company_id = $session_company_id"); + $_SESSION['records_per_page'] = intval($_POST['change_records_per_page']); header("Location: " . $_SERVER["HTTP_REFERER"]); @@ -255,7 +253,7 @@ if(isset($_POST['add_company'])){ } - mysqli_query($mysqli,"INSERT INTO settings SET company_id = $company_id, config_invoice_prefix = 'INV-', config_invoice_next_number = 1, config_recurring_prefix = 'REC-', config_recurring_next_number = 1, config_invoice_overdue_reminders = '1,3,7', config_quote_prefix = 'QUO-', config_quote_next_number = 1, config_api_key = '$config_api_key', config_recurring_auto_send_invoice = 1, config_default_net_terms = 7, config_records_per_page = 10, config_send_invoice_reminders = 0, config_enable_cron = 0, config_ticket_next_number = 1, config_base_url = '$config_base_url'"); + mysqli_query($mysqli,"INSERT INTO settings SET company_id = $company_id, config_invoice_prefix = 'INV-', config_invoice_next_number = 1, config_recurring_prefix = 'REC-', config_recurring_next_number = 1, config_invoice_overdue_reminders = '1,3,7', config_quote_prefix = 'QUO-', config_quote_next_number = 1, config_api_key = '$config_api_key', config_recurring_auto_send_invoice = 1, config_default_net_terms = 7, config_send_invoice_reminders = 0, config_enable_cron = 0, config_ticket_next_number = 1, config_base_url = '$config_base_url'"); //logging mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Company', log_action = 'Create', log_description = '$name', log_created_at = NOW()"); diff --git a/products.php b/products.php index 3e41febe..812c475d 100644 --- a/products.php +++ b/products.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/quotes.php b/quotes.php index 246441b0..1cd9d01d 100644 --- a/quotes.php +++ b/quotes.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/recurring.php b/recurring.php index 58e7e7aa..46255355 100644 --- a/recurring.php +++ b/recurring.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/revenues.php b/revenues.php index 4d909932..c9861b2d 100644 --- a/revenues.php +++ b/revenues.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/setup.php b/setup.php index bd6563c0..4fafe8e2 100644 --- a/setup.php +++ b/setup.php @@ -209,7 +209,7 @@ if(isset($_POST['add_company_settings'])){ //Create Permissions mysqli_query($mysqli,"INSERT INTO permissions SET permission_level = 5, permission_default_company = $company_id, permission_companies = $company_id, user_id = $user_id"); - mysqli_query($mysqli,"INSERT INTO settings SET company_id = $company_id, config_invoice_prefix = 'INV-', config_invoice_next_number = 1, config_recurring_prefix = 'REC-', config_recurring_next_number = 1, config_invoice_overdue_reminders = '1,3,7', config_quote_prefix = 'QUO-', config_quote_next_number = 1, config_api_key = '$config_api_key', config_recurring_auto_send_invoice = 1, config_default_net_terms = 7, config_records_per_page = 10, config_send_invoice_reminders = 0, config_enable_cron = 0, config_ticket_next_number = 1, config_base_url = '$config_base_url'"); + mysqli_query($mysqli,"INSERT INTO settings SET company_id = $company_id, config_invoice_prefix = 'INV-', config_invoice_next_number = 1, config_recurring_prefix = 'REC-', config_recurring_next_number = 1, config_invoice_overdue_reminders = '1,3,7', config_quote_prefix = 'QUO-', config_quote_next_number = 1, config_api_key = '$config_api_key', config_recurring_auto_send_invoice = 1, config_default_net_terms = 7, config_send_invoice_reminders = 0, config_enable_cron = 0, config_ticket_next_number = 1, config_base_url = '$config_base_url'"); //Create Some Data diff --git a/test_client_payments_by_invoice.php b/test_client_payments_by_invoice.php index 0a8faf95..b8c9dcc0 100644 --- a/test_client_payments_by_invoice.php +++ b/test_client_payments_by_invoice.php @@ -7,11 +7,11 @@ $url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/test_contacts.php b/test_contacts.php index a530edaa..dd93d03f 100644 --- a/test_contacts.php +++ b/test_contacts.php @@ -7,11 +7,11 @@ $url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/test_domains.php b/test_domains.php index c070f2cc..f7eecdbf 100644 --- a/test_domains.php +++ b/test_domains.php @@ -7,11 +7,11 @@ $url_query_strings_sb = http_build_query(array_merge($_GET,array('sb' => $sb, 'o //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/tickets.php b/tickets.php index 20ba90b0..fc4288ac 100644 --- a/tickets.php +++ b/tickets.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/transfers.php b/transfers.php index 6604fe96..3aaee9d3 100644 --- a/transfers.php +++ b/transfers.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/trips.php b/trips.php index 927963f0..478d571d 100644 --- a/trips.php +++ b/trips.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/user_logs.php b/user_logs.php index 46bdeee3..da8e604b 100644 --- a/user_logs.php +++ b/user_logs.php @@ -7,11 +7,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/users.php b/users.php index 1db03043..0e41a291 100644 --- a/users.php +++ b/users.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; } diff --git a/vendors.php b/vendors.php index 109cc71b..65887ff1 100644 --- a/vendors.php +++ b/vendors.php @@ -3,11 +3,11 @@ //Paging if(isset($_GET['p'])){ $p = intval($_GET['p']); - $record_from = (($p)-1)*$config_records_per_page; - $record_to = $config_records_per_page; + $record_from = (($p)-1)*$_SESSION['records_per_page']; + $record_to = $_SESSION['records_per_page']; }else{ $record_from = 0; - $record_to = $config_records_per_page; + $record_to = $_SESSION['records_per_page']; $p = 1; }