small fixes

This commit is contained in:
Arseni
2026-02-17 11:17:19 +03:00
parent 0eea39fb97
commit e2e2257167
13 changed files with 120 additions and 58 deletions

View File

@@ -5,6 +5,7 @@ import 'package:provider/provider.dart';
import 'package:pshared/controllers/balance_mask/ledger_accounts.dart';
import 'package:pshared/models/ledger/account.dart';
import 'package:pshared/utils/currency.dart';
import 'package:pshared/utils/money.dart';
import 'package:pweb/pages/dashboard/buttons/balance/config.dart';
import 'package:pweb/pages/dashboard/buttons/balance/header.dart';
@@ -25,8 +26,8 @@ class LedgerAccountCard extends StatelessWidget {
final money = account.balance?.balance;
if (money == null) return '--';
final amount = double.tryParse(money.amount);
if (amount == null) {
final amount = parseMoneyAmount(money.amount, fallback: double.nan);
if (amount.isNaN) {
return '${money.amount} ${money.currency}';
}