refactor of money utils with new money2 package

This commit is contained in:
Arseni
2026-03-13 03:17:29 +03:00
parent b4eb1437f6
commit 0091191d97
72 changed files with 453 additions and 982 deletions

View File

@@ -1,9 +1,7 @@
import 'package:flutter/material.dart';
import 'package:pshared/models/money.dart';
import 'package:pshared/models/payment/operation.dart';
import 'package:pshared/models/payment/status.dart';
import 'package:pshared/utils/currency.dart';
import 'package:pweb/pages/report/table/badge.dart';
import 'package:pweb/utils/money_display.dart';
@@ -38,13 +36,15 @@ class OperationRow {
label: Text(loc.downloadAct),
)
: Text(op.fileName ?? '');
final amountLabel = formatMoneyUiWithL10n(
loc,
Money(amount: amountToString(op.amount), currency: op.currency),
final amountLabel = formatAmountUi(
context,
amount: op.amount,
currency: op.currency,
);
final toAmountLabel = formatMoneyUiWithL10n(
loc,
Money(amount: amountToString(op.toAmount), currency: op.toCurrency),
final toAmountLabel = formatAmountUi(
context,
amount: op.toAmount,
currency: op.toCurrency,
);
return DataRow(