mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix #5510
This commit is contained in:
parent
a9e92d4fa6
commit
b5f095dd91
@ -141,7 +141,7 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface
|
|||||||
)
|
)
|
||||||
->with(['source', 'destination', 'source.transactions'])
|
->with(['source', 'destination', 'source.transactions'])
|
||||||
->leftJoin('link_types', 'link_types.id', '=', 'journal_links.link_type_id')
|
->leftJoin('link_types', 'link_types.id', '=', 'journal_links.link_type_id')
|
||||||
->get(['journal_links.*', 'link_types.inward', 'link_types.outward']);
|
->get(['journal_links.*', 'link_types.inward', 'link_types.outward', 'link_types.editable']);
|
||||||
/** @var TransactionJournalLink $entry */
|
/** @var TransactionJournalLink $entry */
|
||||||
foreach ($set as $entry) {
|
foreach ($set as $entry) {
|
||||||
$journalId = in_array($entry->source_id, $journals, true) ? $entry->source_id : $entry->destination_id;
|
$journalId = in_array($entry->source_id, $journals, true) ? $entry->source_id : $entry->destination_id;
|
||||||
@ -155,6 +155,7 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface
|
|||||||
'link' => $entry->outward,
|
'link' => $entry->outward,
|
||||||
'group' => $entry->destination->transaction_group_id,
|
'group' => $entry->destination->transaction_group_id,
|
||||||
'description' => $entry->destination->description,
|
'description' => $entry->destination->description,
|
||||||
|
'editable' => 1===$entry->editable,
|
||||||
'amount' => $amount,
|
'amount' => $amount,
|
||||||
'foreign_amount' => $foreignAmount,
|
'foreign_amount' => $foreignAmount,
|
||||||
];
|
];
|
||||||
@ -167,6 +168,7 @@ class TransactionGroupRepository implements TransactionGroupRepositoryInterface
|
|||||||
'link' => $entry->inward,
|
'link' => $entry->inward,
|
||||||
'group' => $entry->source->transaction_group_id,
|
'group' => $entry->source->transaction_group_id,
|
||||||
'description' => $entry->source->description,
|
'description' => $entry->source->description,
|
||||||
|
'editable' => 1===$entry->editable,
|
||||||
'amount' => $amount,
|
'amount' => $amount,
|
||||||
'foreign_amount' => $foreignAmount,
|
'foreign_amount' => $foreignAmount,
|
||||||
];
|
];
|
||||||
|
@ -362,7 +362,13 @@
|
|||||||
<a href="{{ route('transactions.link.delete', [link.id]) }}" class="btn btn-danger"><span class="fa fa-trash"></span></a>
|
<a href="{{ route('transactions.link.delete', [link.id]) }}" class="btn btn-danger"><span class="fa fa-trash"></span></a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>{{ trans('firefly.'~link.link) }} "<a href="{{ route('transactions.show', link.group) }}"
|
<td>
|
||||||
|
{% if link.editable %}
|
||||||
|
{{ link.link }}
|
||||||
|
{% else %}
|
||||||
|
{{ trans('firefly.'~link.link) }}
|
||||||
|
{% endif %}
|
||||||
|
"<a href="{{ route('transactions.show', link.group) }}"
|
||||||
title="{{ link.description }}">{{ link.description }}</a>"
|
title="{{ link.description }}">{{ link.description }}</a>"
|
||||||
|
|
||||||
({{ link.amount|raw }})
|
({{ link.amount|raw }})
|
||||||
|
Loading…
Reference in New Issue
Block a user