From 5afacf78cf14b8e1d01f9e26b13096dc6960f09a Mon Sep 17 00:00:00 2001 From: johnnyq Date: Sun, 28 Jan 2024 15:23:58 -0500 Subject: [PATCH] Convert strip Percentage Decimal from decimal vlaue to percentage value on view form and then reconvert from Percent back to Decimal value on POST --- post/setting.php | 2 +- settings_online_payment.php | 119 +++++++++++++++++++----------------- 2 files changed, 63 insertions(+), 58 deletions(-) diff --git a/post/setting.php b/post/setting.php index 631b8af2..220a132f 100644 --- a/post/setting.php +++ b/post/setting.php @@ -375,7 +375,7 @@ if (isset($_POST['edit_online_payment_settings'])) { $config_stripe_account = intval($_POST['config_stripe_account']); $config_stripe_expense_vendor = intval($_POST['config_stripe_expense_vendor']); $config_stripe_expense_category = intval($_POST['config_stripe_expense_category']); - $config_stripe_percentage_fee = floatval($_POST['config_stripe_percentage_fee']); + $config_stripe_percentage_fee = floatval($_POST['config_stripe_percentage_fee']) / 100; $config_stripe_flat_fee = floatval($_POST['config_stripe_flat_fee']); $config_stripe_client_pays_fees = intval($_POST['config_stripe_client_pays_fees']); diff --git a/settings_online_payment.php b/settings_online_payment.php index fe674b39..33425dfb 100644 --- a/settings_online_payment.php +++ b/settings_online_payment.php @@ -23,7 +23,6 @@ require_once "inc_all_settings.php";
"> -
@@ -67,67 +66,13 @@ require_once "inc_all_settings.php";
-
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- -
- value="1" id="clientPaysFeesSwitch"> - -
-
-
- +
@@ -137,10 +82,70 @@ require_once "inc_all_settings.php";
- +
+
+ +
+ value="1" id="clientPaysFeesSwitch"> + +
+
+ +
"> + +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+