multiple payout page and small fixes
This commit is contained in:
20
frontend/pweb/lib/controllers/upload_history_table.dart
Normal file
20
frontend/pweb/lib/controllers/upload_history_table.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
import 'package:pshared/models/payment/payment.dart';
|
||||
|
||||
|
||||
class UploadHistoryTableController {
|
||||
const UploadHistoryTableController();
|
||||
|
||||
String amountText(Payment payment) {
|
||||
final receivedAmount = payment.lastQuote?.expectedSettlementAmount;
|
||||
if (receivedAmount != null) {
|
||||
return '${receivedAmount.amount} ${receivedAmount.currency}';
|
||||
}
|
||||
|
||||
final fallbackAmount = payment.lastQuote?.debitAmount;
|
||||
if (fallbackAmount != null) {
|
||||
return '${fallbackAmount.amount} ${fallbackAmount.currency}';
|
||||
}
|
||||
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user