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