diff --git a/app/Helpers/Collector/JournalCollector.php b/app/Helpers/Collector/JournalCollector.php index 218c69a5d5..62bc80789f 100644 --- a/app/Helpers/Collector/JournalCollector.php +++ b/app/Helpers/Collector/JournalCollector.php @@ -56,6 +56,7 @@ use Steam; * * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.TooManyPublicMethods) */ class JournalCollector implements JournalCollectorInterface { diff --git a/app/Http/Controllers/Transaction/MassController.php b/app/Http/Controllers/Transaction/MassController.php index 55ba4bf140..a88b9620ca 100644 --- a/app/Http/Controllers/Transaction/MassController.php +++ b/app/Http/Controllers/Transaction/MassController.php @@ -159,6 +159,13 @@ class MassController extends Controller $messages[] = trans('firefly.cannot_edit_opening_balance'); continue; } + + // cannot edit reconciled transactions / journals: + if($journal->transactions->first()->reconciled) { + $messages[] = trans('firefly.cannot_edit_reconciled', ['description' => $journal->description, 'id' => $journal->id]); + continue; + } + $filtered->push($journal); } diff --git a/public/js/ff/transactions/list.js b/public/js/ff/transactions/list.js index a537436c8e..f58eb6c703 100644 --- a/public/js/ff/transactions/list.js +++ b/public/js/ff/transactions/list.js @@ -72,7 +72,7 @@ function goToReconcile() { } $.post(baseHref + 'transactions/reconcile', {transactions: ids}).done(function () { - alert('OK then.'); + window.location.reload(true); }).fail(function () { alert('Could not reconcile transactions: please check the logs and try again later.'); }); diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index 36db837878..66e3a5891b 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -1007,6 +1007,7 @@ return [ 'split_this_transfer' => 'Split this transfer', 'cannot_edit_multiple_source' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple source accounts.', 'cannot_edit_multiple_dest' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple destination accounts.', + 'cannot_edit_reconciled' => 'You cannot edit transaction #:id with description ":description" because it has been marked as reconciled.', 'cannot_edit_opening_balance' => 'You cannot edit the opening balance of an account.', 'no_edit_multiple_left' => 'You have selected no valid transactions to edit.', 'cannot_convert_split_journal' => 'Cannot convert a split transaction',