Skip to content

Commit

Permalink
Added fields to payment report
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed Dec 5, 2024
1 parent ddc805b commit e2d33d1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/ui/app/presenters/entity_presenter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ class EntityPresenter {
'withdrawal',
'deposit',
'documents',
'applied',
'refunded',
].contains(field);

return value;
Expand Down
12 changes: 12 additions & 0 deletions lib/ui/reports/payment_report.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ enum PaymentReportFields {
invoices,
credits,
record_state,
refunded,
applied,
status,
}

var memoizedPaymentReport = memo8(
Expand Down Expand Up @@ -277,6 +280,15 @@ ReportResult paymentReport(
value = AppLocalization.of(navigatorKey.currentContext!)!
.lookup(payment.entityState);
break;
case PaymentReportFields.refunded:
value = payment.refunded;
break;
case PaymentReportFields.applied:
value = payment.applied;
break;
case PaymentReportFields.status:
value = kPaymentStatuses[payment.calculatedStatusId] ?? '';
break;
}

if (!ReportResult.matchField(
Expand Down

0 comments on commit e2d33d1

Please sign in to comment.