New strings for reconciled transactions. #736

This commit is contained in:
James Cole 2017-11-08 09:40:38 +01:00
parent 8707bc6612
commit 78009c1cc0
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
4 changed files with 10 additions and 1 deletions

View File

@ -56,6 +56,7 @@ use Steam;
*
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings(PHPMD.TooManyPublicMethods)
*/
class JournalCollector implements JournalCollectorInterface
{

View File

@ -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);
}

View File

@ -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.');
});

View File

@ -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',