This commit is contained in:
Arseni
2026-03-11 18:26:21 +03:00
parent fdd8dd8845
commit 0172176978
46 changed files with 678 additions and 643 deletions

View File

@@ -1,7 +1,7 @@
import 'dart:collection';
import 'package:flutter/material.dart';
import 'package:collection/collection.dart';
import 'package:pshared/models/payment/operation.dart';
import 'package:pshared/models/payment/payment.dart';
import 'package:pshared/models/payment/source_type.dart';
@@ -131,16 +131,14 @@ class ReportOperationsController extends ChangeNotifier {
bool _matchesCurrentSource(Payment payment) {
final sourceType = _sourceType;
if (sourceType == null || _sourceRefs.isEmpty) return true;
for (final sourceRef in _sourceRefs) {
if (paymentMatchesSource(
payment,
sourceType: sourceType,
sourceRef: sourceRef,
)) {
return true;
}
}
return false;
return _sourceRefs.firstWhereOrNull(
(sourceRef) => paymentMatchesSource(
payment,
sourceType: sourceType,
sourceRef: sourceRef,
),
) !=
null;
}
Set<String> _normalizeRefs(List<String> refs) {