diff --git a/accounts.php b/accounts.php
index 25b4a4fd..c750c3e3 100644
--- a/accounts.php
+++ b/accounts.php
@@ -88,7 +88,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
Archive
diff --git a/budget.php b/budget.php
index f794a38c..8a532397 100644
--- a/budget.php
+++ b/budget.php
@@ -121,7 +121,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
Edit
-
+
Delete
diff --git a/categories.php b/categories.php
index 721a54a6..fd14a4a4 100644
--- a/categories.php
+++ b/categories.php
@@ -106,7 +106,7 @@ $colors_diff = array_diff($colors_array, $colors_used_array);
Edit
-
+
Archive
diff --git a/client_assets.php b/client_assets.php
index ec69ac82..14404dc7 100644
--- a/client_assets.php
+++ b/client_assets.php
@@ -347,11 +347,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
Archive
-
+
Delete
diff --git a/client_documents.php b/client_documents.php
index 82571d25..201ebe2e 100644
--- a/client_documents.php
+++ b/client_documents.php
@@ -121,7 +121,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
Delete
@@ -205,11 +205,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
Archive
-
+
Delete
diff --git a/client_files.php b/client_files.php
index 56e74086..11fee12b 100644
--- a/client_files.php
+++ b/client_files.php
@@ -120,7 +120,7 @@ $num_of_files = mysqli_num_rows($sql);
-
+
Delete
@@ -276,7 +276,7 @@ $num_of_files = mysqli_num_rows($sql);
Move
-
+
Archive
diff --git a/client_invoices.php b/client_invoices.php
index a36e1e25..dabaf39d 100644
--- a/client_invoices.php
+++ b/client_invoices.php
@@ -142,7 +142,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
Copy
-
+
Delete
diff --git a/client_locations.php b/client_locations.php
index 85ef0752..11ecef0c 100644
--- a/client_locations.php
+++ b/client_locations.php
@@ -119,11 +119,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
Archive
-
+
Delete
diff --git a/client_quotes.php b/client_quotes.php
index 9c7c698e..951e0bd5 100644
--- a/client_quotes.php
+++ b/client_quotes.php
@@ -136,7 +136,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
Delete
diff --git a/client_recurring_invoices.php b/client_recurring_invoices.php
index 4b19c7dd..74d47c76 100644
--- a/client_recurring_invoices.php
+++ b/client_recurring_invoices.php
@@ -119,7 +119,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
Edit
-
+
Delete
diff --git a/client_scheduled_tickets.php b/client_scheduled_tickets.php
index 5577a42b..31b00919 100644
--- a/client_scheduled_tickets.php
+++ b/client_scheduled_tickets.php
@@ -109,7 +109,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
Delete
diff --git a/client_services.php b/client_services.php
index a104b24b..3dfda37a 100644
--- a/client_services.php
+++ b/client_services.php
@@ -99,7 +99,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
Delete
diff --git a/client_shared_items.php b/client_shared_items.php
index e02f16a5..895fc294 100644
--- a/client_shared_items.php
+++ b/client_shared_items.php
@@ -100,7 +100,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
diff --git a/client_software.php b/client_software.php
index ed45aead..374baeef 100644
--- a/client_software.php
+++ b/client_software.php
@@ -173,11 +173,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
Edit
-
+
Archive and
Remove Licenses
-
+
Delete and
Remove Licenses
diff --git a/client_tickets.php b/client_tickets.php
index ee3110cf..d29dd751 100644
--- a/client_tickets.php
+++ b/client_tickets.php
@@ -180,7 +180,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
Delete
diff --git a/client_trips.php b/client_trips.php
index 8a0d3000..717a4feb 100644
--- a/client_trips.php
+++ b/client_trips.php
@@ -116,7 +116,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
Copy
-
+
Delete
diff --git a/client_vendors.php b/client_vendors.php
index 2ee80058..31d000b4 100644
--- a/client_vendors.php
+++ b/client_vendors.php
@@ -142,11 +142,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
Archive
-
+
Delete
diff --git a/expenses.php b/expenses.php
index 19e18888..c91309fd 100644
--- a/expenses.php
+++ b/expenses.php
@@ -166,7 +166,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
Refund
-
+
Delete
diff --git a/inc_client_top_head.php b/inc_client_top_head.php
index ceb4fd5e..0461bd48 100644
--- a/inc_client_top_head.php
+++ b/inc_client_top_head.php
@@ -19,11 +19,11 @@
Export Data
-
+
Archive Client
-
+
Delete Client
diff --git a/invoices.php b/invoices.php
index af4eb1bc..9711ee50 100644
--- a/invoices.php
+++ b/invoices.php
@@ -289,7 +289,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
Delete
diff --git a/products.php b/products.php
index 2cadcf11..3626fe06 100644
--- a/products.php
+++ b/products.php
@@ -89,11 +89,11 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
Edit
-
+
Archive
-
+
Delete
diff --git a/quotes.php b/quotes.php
index 9f783406..8d65c3d4 100644
--- a/quotes.php
+++ b/quotes.php
@@ -169,7 +169,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
Delete
diff --git a/recurring_expenses.php b/recurring_expenses.php
index 41bfea25..1195920f 100644
--- a/recurring_expenses.php
+++ b/recurring_expenses.php
@@ -161,7 +161,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
Edit
-
+
Delete
diff --git a/recurring_invoices.php b/recurring_invoices.php
index bfae2e17..4213e858 100644
--- a/recurring_invoices.php
+++ b/recurring_invoices.php
@@ -154,7 +154,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
Edit
-
+
Delete
diff --git a/revenues.php b/revenues.php
index 28650fe7..fc427c48 100644
--- a/revenues.php
+++ b/revenues.php
@@ -131,7 +131,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
Edit
-
+
Delete
diff --git a/scheduled_tickets.php b/scheduled_tickets.php
index 8027586a..085b01e1 100644
--- a/scheduled_tickets.php
+++ b/scheduled_tickets.php
@@ -139,7 +139,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
Delete
diff --git a/settings_alerts.php b/settings_alerts.php
index 6af018e4..82008434 100644
--- a/settings_alerts.php
+++ b/settings_alerts.php
@@ -23,7 +23,7 @@ require_once("inc_all_settings.php"); ?>
diff --git a/settings_api.php b/settings_api.php
index f12c30bc..1197cb23 100644
--- a/settings_api.php
+++ b/settings_api.php
@@ -51,7 +51,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
@@ -126,7 +126,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
diff --git a/settings_custom_fields.php b/settings_custom_fields.php
index a22fb5e4..eeaa56b5 100644
--- a/settings_custom_fields.php
+++ b/settings_custom_fields.php
@@ -89,7 +89,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
Edit
-
+
Delete
diff --git a/settings_software_templates.php b/settings_software_templates.php
index 829087ed..4c3027a0 100644
--- a/settings_software_templates.php
+++ b/settings_software_templates.php
@@ -91,7 +91,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
Delete
diff --git a/settings_tags.php b/settings_tags.php
index bb3570e0..e22c02fc 100644
--- a/settings_tags.php
+++ b/settings_tags.php
@@ -80,7 +80,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
Edit
-
+
Delete
diff --git a/settings_taxes.php b/settings_taxes.php
index a29305b1..cab6989d 100644
--- a/settings_taxes.php
+++ b/settings_taxes.php
@@ -59,7 +59,7 @@ $num_rows = mysqli_num_rows($sql);
Edit
-
+
Archive
diff --git a/settings_vendor_templates.php b/settings_vendor_templates.php
index 1389ddbe..1002eddd 100644
--- a/settings_vendor_templates.php
+++ b/settings_vendor_templates.php
@@ -135,7 +135,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
-
+
Delete
diff --git a/tickets.php b/tickets.php
index 24338fcb..c092467e 100644
--- a/tickets.php
+++ b/tickets.php
@@ -360,7 +360,7 @@ $user_active_assigned_tickets = intval($row['total_tickets_assigned']);
-
+
Delete
diff --git a/transfers.php b/transfers.php
index 353d2f39..311b3997 100644
--- a/transfers.php
+++ b/transfers.php
@@ -145,7 +145,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
Edit
-
+
Delete
diff --git a/trip_edit_modal.php b/trip_edit_modal.php
index bde873e2..7fee31da 100644
--- a/trip_edit_modal.php
+++ b/trip_edit_modal.php
@@ -103,7 +103,7 @@
'$trip_created_at' OR trip_archived_at IS NULL ORDER BY client_archived_at ASC, client_name ASC");
+ $sql_clients = mysqli_query($mysqli, "SELECT * FROM clients WHERE client_archived_at > '$trip_created_at' OR client_archived_at IS NULL ORDER BY client_archived_at ASC, client_name ASC");
while ($row = mysqli_fetch_array($sql_clients)) {
$client_id_select = intval($row['client_id']);
$client_name_select = nullable_htmlentities($row['client_name']);
diff --git a/trips.php b/trips.php
index ee0314a8..21a3f15c 100644
--- a/trips.php
+++ b/trips.php
@@ -16,6 +16,7 @@ $sql = mysqli_query(
LEFT JOIN users ON trip_user_id = user_id
WHERE (trip_purpose LIKE '%$q%' OR trip_source LIKE '%$q%' OR trip_destination LIKE '%$q%' OR trip_miles LIKE '%$q%' OR client_name LIKE '%$q%' OR user_name LIKE '%$q%')
AND DATE(trip_date) BETWEEN '$dtf' AND '$dtt'
+ AND trip_archived_at IS NULL
ORDER BY $sort $order LIMIT $record_from, $record_to"
);
@@ -109,6 +110,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
$trip_miles = floatval($row['trip_miles']);
$trip_user_id = intval($row['trip_user_id']);
$trip_created_at = nullable_htmlentities($row['trip_created_at']);
+ $trip_archived_at = nullable_htmlentities($row['trip_archived_at']);
$round_trip = nullable_htmlentities($row['round_trip']);
$client_id = intval($row['client_id']);
$client_name = nullable_htmlentities($row['client_name']);
@@ -155,7 +157,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
Copy
-
+
Delete
diff --git a/vendors.php b/vendors.php
index 37ad6f46..490c68e5 100644
--- a/vendors.php
+++ b/vendors.php
@@ -160,7 +160,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
Edit
-
+
Archive