diff --git a/app/Http/Controllers/Account/ReconcileController.php b/app/Http/Controllers/Account/ReconcileController.php index 0fbb0be443..0b4fd5d40d 100644 --- a/app/Http/Controllers/Account/ReconcileController.php +++ b/app/Http/Controllers/Account/ReconcileController.php @@ -117,6 +117,7 @@ class ReconcileController extends Controller $startDate = clone $start; $startDate->subDay(); $startBalance = round(app('steam')->balance($account, $startDate), $currency->decimal_places); + $endBalance = round(app('steam')->balance($account, $end), $currency->decimal_places); $subTitleIcon = config(sprintf('firefly.subIconsByIdentifier.%s', $account->accountType->type)); $subTitle = (string)trans('firefly.reconcile_account', ['account' => $account->name]); diff --git a/app/Http/Controllers/Json/ReconcileController.php b/app/Http/Controllers/Json/ReconcileController.php index 25cd2e07e0..745efbab45 100644 --- a/app/Http/Controllers/Json/ReconcileController.php +++ b/app/Http/Controllers/Json/ReconcileController.php @@ -201,11 +201,16 @@ class ReconcileController extends Controller $inverse = true; } // transfer to this account? then positive amount: - if (TransactionType::TRANSFER === $journal['transaction_type_type'] - && $account->id === $journal['destination_account_id'] - ) { + if (TransactionType::TRANSFER === $journal['transaction_type_type'] && $account->id === $journal['destination_account_id']) { $inverse = true; } + + // reconciliation into account? then positive amount: + if (TransactionType::RECONCILIATION === $journal['transaction_type_type']) { + $inverse = true; + } + + if (true === $inverse) { $journal['amount'] = app('steam')->positive($journal['amount']); if (null !== $journal['foreign_amount']) { diff --git a/app/Support/Steam.php b/app/Support/Steam.php index 1290534d14..1333c22c71 100644 --- a/app/Support/Steam.php +++ b/app/Support/Steam.php @@ -55,7 +55,7 @@ class Steam $cache->addProperty('balance'); $cache->addProperty($date); if ($cache->has()) { - return $cache->get(); // @codeCoverageIgnore + //return $cache->get(); // @codeCoverageIgnore } // /** @var AccountRepositoryInterface $repository */ diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index 0c54476bf5..1216f10339 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -553,24 +553,25 @@ return [ 'login_with_new_email' => 'You can now login with your new email address.', 'login_with_old_email' => 'You can now login with your old email address again.', 'login_provider_local_only' => 'This action is not available when authenticating through ":login_provider".', - 'delete_local_info_only' => 'Because you authenticate through ":login_provider", this will only delete local Firefly III information.', + 'delete_local_info_only' => 'Because you authenticate through ":login_provider", this will only delete local Firefly III information.', // attachments - 'nr_of_attachments' => 'One attachment|:count attachments', - 'attachments' => 'Attachments', - 'edit_attachment' => 'Edit attachment ":name"', - 'update_attachment' => 'Update attachment', - 'delete_attachment' => 'Delete attachment ":name"', - 'attachment_deleted' => 'Deleted attachment ":name"', - 'attachment_updated' => 'Updated attachment ":name"', - 'upload_max_file_size' => 'Maximum file size: :size', - 'list_all_attachments' => 'List of all attachments', + 'nr_of_attachments' => 'One attachment|:count attachments', + 'attachments' => 'Attachments', + 'edit_attachment' => 'Edit attachment ":name"', + 'update_attachment' => 'Update attachment', + 'delete_attachment' => 'Delete attachment ":name"', + 'attachment_deleted' => 'Deleted attachment ":name"', + 'liabilities_deleted' => 'Deleted liability ":name"', + 'attachment_updated' => 'Updated attachment ":name"', + 'upload_max_file_size' => 'Maximum file size: :size', + 'list_all_attachments' => 'List of all attachments', // transaction index - 'title_expenses' => 'Expenses', - 'title_withdrawal' => 'Expenses', - 'title_revenue' => 'Revenue / income', - 'title_deposit' => 'Revenue / income', + 'title_expenses' => 'Expenses', + 'title_withdrawal' => 'Expenses', + 'title_revenue' => 'Revenue / income', + 'title_deposit' => 'Revenue / income', 'title_transfer' => 'Transfers', 'title_transfers' => 'Transfers',