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

@@ -1,3 +1,5 @@
import 'package:pshared/utils/money.dart';
import 'package:pweb/models/multiple_payouts/csv_row.dart';
@@ -79,8 +81,8 @@ class MultipleCsvParser {
throw FormatException('CSV row ${i + 1}: amount is required');
}
final parsedAmount = double.tryParse(amount);
if (parsedAmount == null || parsedAmount <= 0) {
final parsedAmount = parseMoneyAmount(amount, fallback: double.nan);
if (parsedAmount.isNaN || parsedAmount <= 0) {
throw FormatException(
'CSV row ${i + 1}: amount must be greater than 0',
);