fixes
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user