From 00effcf79d2f17496dba8165a10bf3b7997af8ef Mon Sep 17 00:00:00 2001 From: o-psi Date: Fri, 13 Oct 2023 17:39:41 -0500 Subject: [PATCH] remove commas before trying to make a float --- post/expense.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/post/expense.php b/post/expense.php index 1881861a..bac1244f 100644 --- a/post/expense.php +++ b/post/expense.php @@ -166,7 +166,7 @@ if (isset($_POST['create_recurring_expense'])) { $frequency = intval($_POST['frequency']); $day = intval($_POST['day']); $month = intval($_POST['month']); - $amount = floatval($_POST['amount']); + $amount = floatval(str_replace(',', '', $_POST['amount'])); $account = intval($_POST['account']); $vendor = intval($_POST['vendor']); $client = intval($_POST['client']); @@ -195,7 +195,7 @@ if (isset($_POST['edit_recurring_expense'])) { $frequency = intval($_POST['frequency']); $day = intval($_POST['day']); $month = intval($_POST['month']); - $amount = floatval($_POST['amount']); + $amount = floatval(str_replace(',', '', $_POST['amount'])); $account = intval($_POST['account']); $vendor = intval($_POST['vendor']); $client = intval($_POST['client']);