few fixes and made sure ledger widget displays the name of ledger wallet
This commit is contained in:
@@ -5,8 +5,7 @@ import 'package:pshared/models/payment/status.dart';
|
||||
import 'package:pshared/utils/money.dart';
|
||||
|
||||
import 'package:pweb/models/report/operation/document.dart';
|
||||
import 'package:pweb/utils/payment/operation_code.dart';
|
||||
|
||||
import 'package:pweb/utils/report/operations/document_rule.dart';
|
||||
|
||||
OperationItem mapPaymentToOperation(Payment payment) {
|
||||
final debit = payment.lastQuote?.amounts?.sourceDebitTotal;
|
||||
@@ -63,9 +62,7 @@ OperationDocumentInfo? _resolveOperationDocument(Payment payment) {
|
||||
if (operationRef == null || operationRef.isEmpty) continue;
|
||||
if (gatewayService == null || gatewayService.isEmpty) continue;
|
||||
|
||||
final pair = parseOperationCodePair(operation.code);
|
||||
if (pair == null) continue;
|
||||
if (pair.operation != 'card_payout' || pair.action != 'send') continue;
|
||||
if (!isOperationDocumentEligible(operation.code)) continue;
|
||||
|
||||
return OperationDocumentInfo(
|
||||
operationRef: operationRef,
|
||||
@@ -133,4 +130,4 @@ String? _firstNonEmpty(List<String?> values) {
|
||||
if (trimmed != null && trimmed.isNotEmpty) return trimmed;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user