mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-25 14:58:40 +00:00
First steps for reconciliation fix.
This commit is contained in:
@@ -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]);
|
||||
|
@@ -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']) {
|
||||
|
@@ -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 */
|
||||
|
@@ -562,6 +562,7 @@ return [
|
||||
'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',
|
||||
|
Reference in New Issue
Block a user