Skip to content

Firefly III: a personal finances manager

Fix some views.

James Cole118e4b5e1a91
diff --git a/app/Helpers/Functions/helpers.php b/app/Helpers/Functions/helpers.php
index fad0941f9c..3d324f842f 100644
--- a/app/Helpers/Functions/helpers.php
+++ b/app/Helpers/Functions/helpers.php
@@ -301,8 +301,9 @@ if (!function_exists('get_app_configuration')) {
}
if (!function_exists('format_amount_by_symbol')) {
- function format_amount_by_symbol(string $amount, ?string $symbol = null, ?int $decimalPlaces = null, ?bool $coloured = null): string
+ function format_amount_by_symbol(string|null $amount, ?string $symbol = null, ?int $decimalPlaces = null, ?bool $coloured = null): string
{
+ $amount = null === $amount ? '0' : $amount;
return Steam::formatAmountBySymbol($amount, $symbol, $decimalPlaces, $coloured);
}
}
diff --git a/resources/assets/v3/sass/app.scss b/resources/assets/v3/sass/app.scss
index fa636b7071..fb1ce6670b 100644
--- a/resources/assets/v3/sass/app.scss
+++ b/resources/assets/v3/sass/app.scss
@@ -61,6 +61,11 @@ $success: #64B624;
body.waiting * {
cursor: progress;
}
+
+.money-neutral {
+ color: #999;
+}
+
/* some borders and lines */
.top-light-border {border-top:1px #aaa solid;}
.top-dark-border {border-top:1px #777 solid;}
diff --git a/resources/views/components/elements/transaction-running-balance.blade.php b/resources/views/components/elements/transaction-running-balance.blade.php
index 4e2caceb5a..f7b0beb531 100644
--- a/resources/views/components/elements/transaction-running-balance.blade.php
+++ b/resources/views/components/elements/transaction-running-balance.blade.php
@@ -17,9 +17,9 @@
{{-- withdrawal into a liability --}}
@if(in_array($destination['type'], ['Mortgage','Debt','Loan'], true))
@if($account?->id === $source['id'])
- A <span title="Withdrawal, liab, source">{!! format_amount_by_symbol($source['balance_after'], $currency['symbol'], $currency['decimal_places']) !!}</span>
+ <span title="Withdrawal, liab, source">{!! format_amount_by_symbol($source['balance_after'], $currency['symbol'], $currency['decimal_places']) !!}</span>
@elseif($account?->id === $destination['id'])
- B <span title="Withdrawal, liab, dest">{!! format_amount_by_symbol($destination['balance_after'], $currency['symbol'], $currency['decimal_places']) !!}</span>
+ <span title="Withdrawal, liab, dest">{!! format_amount_by_symbol($destination['balance_after'], $currency['symbol'], $currency['decimal_places']) !!}</span>
@else
-
@endif