diff --git a/admin_category.php b/admin_category.php index 4370b5d4..177df25d 100644 --- a/admin_category.php +++ b/admin_category.php @@ -77,13 +77,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); } else { echo 'btn-default'; } ?>">Referral - Payment - Method Fee + + Saved Payment Methods + Action @@ -73,6 +76,9 @@ $num_rows = mysqli_num_rows($sql); $percent_fee = floatval($row['payment_provider_expense_percentage_fee']) * 100; $flat_fee = floatval($row['payment_provider_expense_flat_fee']); + $row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('saved_payment_id') AS saved_payment_count FROM client_saved_payment_methods WHERE saved_payment_provider_id = $provider_id")); + $saved_payment_count = intval($row['saved_payment_count']); + ?> @@ -90,6 +96,7 @@ $num_rows = mysqli_num_rows($sql); + + + + +
+
+ + +
+
+ + "> + + + + + + + + + + + + + + + + + + + + + + + No Records Here"; + } + + ?> + + +
+ + Client + + + + Provider + + + + Details + + + + Provider Client ID + + + + Provider Payment Method ID + + + + Created + + Action
() () + + Delete + +
+ +
+ + + + CURRENT_DATABASE_VERSION) { PRIMARY KEY (`payment_provider_id`) )"); - mysqli_query($mysqli, "CREATE TABLE `cient_saved_payment_methods` ( + mysqli_query($mysqli, "CREATE TABLE `client_saved_payment_methods` ( `saved_payment_id` INT(11) NOT NULL AUTO_INCREMENT, `saved_payment_provider_client` VARCHAR(200) NOT NULL, `saved_payment_provider_method` VARCHAR(200) NOT NULL, @@ -3749,10 +3749,38 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) { mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.3'"); } - // if (CURRENT_DATABASE_VERSION == '2.2.3') { - // // Insert queries here required to update to DB version 2.2.4 + if (CURRENT_DATABASE_VERSION == '2.2.3') { + + // Delete all Recurring Payments that are Stripe + mysqli_query($mysqli, "DELETE FROM recurring_payments WHERE recurring_payment_method = 'Stripe'"); + + // Delete Stripe Specific ITFlow Client Stripe Client Relationship Table + mysqli_query($mysqli, "DROP TABLE client_stripe"); + + // Delete Unused Stripe and AI Settings now in their own tables + mysqli_query($mysqli, "ALTER TABLE `settings` + DROP `config_stripe_enable`, + DROP `config_stripe_publishable`, + DROP `config_stripe_secret`, + DROP `config_stripe_account`, + DROP `config_stripe_expense_vendor`, + DROP `config_stripe_expense_category`, + DROP `config_stripe_percentage_fee`, + DROP `config_stripe_flat_fee`, + DROP `config_ai_enable`, + DROP `config_ai_provider`, + DROP `config_ai_model`, + DROP `config_ai_url`, + DROP `config_ai_api_key` + "); + + mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.4'"); + } + + // if (CURRENT_DATABASE_VERSION == '2.2.4') { + // // Insert queries here required to update to DB version 2.2.5 // // Then, update the database to the next sequential version - // mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.4'"); + // mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '2.2.5'"); // } } else { diff --git a/includes/admin_side_nav.php b/includes/admin_side_nav.php index 44056eed..1ba4c7e5 100644 --- a/includes/admin_side_nav.php +++ b/includes/admin_side_nav.php @@ -66,6 +66,12 @@

Payment Providers

+