From 4a620ca22cedf852f31848d82dfa9048da34fafc Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 13 Feb 2018 09:33:51 -0700 Subject: [PATCH] Update database_transaction_edit.php --- .../database_transaction_edit.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/database_transactions/database_transaction_edit.php b/app/database_transactions/database_transaction_edit.php index 4e9b5167e2..d31a7cbf9d 100644 --- a/app/database_transactions/database_transaction_edit.php +++ b/app/database_transactions/database_transaction_edit.php @@ -86,11 +86,13 @@ } //get the type if not provided - if (strlen($transaction_old) > 4) { - $transaction_type = 'add'; - } - else { - $transaction_type = 'update'; + if (strlen($transaction_type) == 0) { + if ($transaction_old == null || $transaction_old == "null") { + $transaction_type = 'add'; + } + else { + $transaction_type = 'update'; + } } //show the header