Link source expense/invoice from account transaction rows
Each transaction that was posted from an expense or invoice now shows an 'Open expense →' or 'Open invoice →' link to the source record's detail page. The sourceExpenseId/sourceInvoiceId fields were already loaded — just needed the UI affordance. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -347,6 +347,22 @@
|
|||||||
Counterparty: {txn.counterpartyName}
|
Counterparty: {txn.counterpartyName}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
{#if txn.sourceExpenseId}
|
||||||
|
<a
|
||||||
|
href={`/companies/${data.company.id}/expenses/${txn.sourceExpenseId}`}
|
||||||
|
class="mt-0.5 inline-block text-xs font-medium text-blue-600 hover:text-blue-700 dark:text-blue-400"
|
||||||
|
>
|
||||||
|
Open expense →
|
||||||
|
</a>
|
||||||
|
{/if}
|
||||||
|
{#if txn.sourceInvoiceId}
|
||||||
|
<a
|
||||||
|
href={`/companies/${data.company.id}/invoices/${txn.sourceInvoiceId}`}
|
||||||
|
class="mt-0.5 inline-block text-xs font-medium text-blue-600 hover:text-blue-700 dark:text-blue-400"
|
||||||
|
>
|
||||||
|
Open invoice →
|
||||||
|
</a>
|
||||||
|
{/if}
|
||||||
{#if txn.fxRate && txn.fxAmount}
|
{#if txn.fxRate && txn.fxAmount}
|
||||||
<div class="text-xs text-amber-600 dark:text-amber-400">
|
<div class="text-xs text-amber-600 dark:text-amber-400">
|
||||||
FX: {txn.fxAmount} @ {Number(txn.fxRate).toFixed(4)}
|
FX: {txn.fxAmount} @ {Number(txn.fxRate).toFixed(4)}
|
||||||
|
|||||||
Reference in New Issue
Block a user