Fix amount display

This commit is contained in:
James Cole
2025-08-22 07:28:09 +02:00
parent b905efd0aa
commit ebc7ea0eb6
4 changed files with 72 additions and 51 deletions

View File

@@ -75,7 +75,7 @@
<ul class="list-unstyled list-no-margin">
<template x-for="transaction in group.transactions">
<li>
@include('partials.elements.amount', ['convertToPrimary' => true,'type' => 'transaction.type','amount' => 'transaction.amount','primary' => 'transaction.amount'])
@include('partials.elements.amount', ['convertToPrimary' => $convertToPrimary,'type' => 'transaction.type','amount' => 'transaction.amount', 'primary' => 'transaction.pc_amount'])
</li>
</template>
</ul>

View File

@@ -57,20 +57,31 @@
</template>
@else
<template x-if="{{ $amount }}_raw < 0">
<span class="text-danger">
<span x-text="{{ $amount }}"></span>
</span>
<span>
<template x-if="'transfer' === {{ $type }}">
<span class="text-primary">
<span x-text="{{ $amount }}"></span>
</span>
</template>
<template x-if="'transfer' !== {{ $type }}">
<span class="text-danger">
<span x-text="{{ $amount }}"></span>
</span>
</template>
</span>
</template>
<template x-if="{{ $amount }}_raw >= 0">
<template x-if="'transfer' === {{ $type }}">
<span class="text-primary">
<span x-text="{{ $amount }}"></span>
<span>
<template x-if="'transfer' === {{ $type }}">
<span class="text-primary">
<span x-text="{{ $amount }}"></span>
</span>
</template>
<template x-if="'transfer' !== {{ $type }}">
<span class="text-success">
<span x-text="{{ $amount }}"></span>
</span>
</template>
</span>
</template>
<template x-if="'transfer' !== {{ $type }}">
<span class="text-success">
<span x-text="{{ $amount }}"></span>
</span>
</template>
</template>
@endif