Correct converted expense amount
This commit is contained in:
parent
f95de34713
commit
f304939d8d
|
|
@ -57,6 +57,7 @@ class ExpenseFields {
|
||||||
static const String categoryId = 'category_id';
|
static const String categoryId = 'category_id';
|
||||||
static const String category = 'category';
|
static const String category = 'category';
|
||||||
static const String netAmount = 'net_amount';
|
static const String netAmount = 'net_amount';
|
||||||
|
static const String convertedAmount = 'converted_amount';
|
||||||
static const String amount = 'amount';
|
static const String amount = 'amount';
|
||||||
static const String taxAmount = 'tax_amount';
|
static const String taxAmount = 'tax_amount';
|
||||||
static const String expenseDate = 'date';
|
static const String expenseDate = 'date';
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ class RecurringExpenseFields {
|
||||||
static const String categoryId = 'category_id';
|
static const String categoryId = 'category_id';
|
||||||
static const String category = 'category';
|
static const String category = 'category';
|
||||||
static const String netAmount = 'net_amount';
|
static const String netAmount = 'net_amount';
|
||||||
|
static const String convertedAmount = 'converted_amount';
|
||||||
static const String amount = 'amount';
|
static const String amount = 'amount';
|
||||||
static const String taxAmount = 'tax_amount';
|
static const String taxAmount = 'tax_amount';
|
||||||
static const String paymentDate = 'payment_date';
|
static const String paymentDate = 'payment_date';
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@ class ExpenseListItem extends StatelessWidget {
|
||||||
),
|
),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
Text(
|
Text(
|
||||||
formatNumber(expense.convertedAmount, context,
|
formatNumber(expense.amount, context,
|
||||||
currencyId: expense.currencyId),
|
currencyId: expense.currencyId),
|
||||||
style: textStyle,
|
style: textStyle,
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
|
|
@ -216,7 +216,7 @@ class ExpenseListItem extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
formatNumber(expense.convertedAmount, context,
|
formatNumber(expense.amount, context,
|
||||||
currencyId: expense.currencyId),
|
currencyId: expense.currencyId),
|
||||||
style: Theme.of(context).textTheme.headline6),
|
style: Theme.of(context).textTheme.headline6),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,9 @@ class ExpensePresenter extends EntityPresenter {
|
||||||
case ExpenseFields.amount:
|
case ExpenseFields.amount:
|
||||||
return Text(formatNumber(expense.grossAmount, context,
|
return Text(formatNumber(expense.grossAmount, context,
|
||||||
currencyId: expense.currencyId));
|
currencyId: expense.currencyId));
|
||||||
|
case ExpenseFields.convertedAmount:
|
||||||
|
return Text(formatNumber(expense.convertedAmount, context,
|
||||||
|
currencyId: expense.invoiceCurrencyId));
|
||||||
case ExpenseFields.taxAmount:
|
case ExpenseFields.taxAmount:
|
||||||
return Text(formatNumber(expense.taxAmount, context,
|
return Text(formatNumber(expense.taxAmount, context,
|
||||||
currencyId: expense.currencyId));
|
currencyId: expense.currencyId));
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,9 @@ class RecurringExpensePresenter extends EntityPresenter {
|
||||||
case RecurringExpenseFields.amount:
|
case RecurringExpenseFields.amount:
|
||||||
return Text(formatNumber(expense.grossAmount, context,
|
return Text(formatNumber(expense.grossAmount, context,
|
||||||
currencyId: expense.currencyId));
|
currencyId: expense.currencyId));
|
||||||
|
case RecurringExpenseFields.convertedAmount:
|
||||||
|
return Text(formatNumber(expense.convertedAmount, context,
|
||||||
|
currencyId: expense.invoiceCurrencyId));
|
||||||
case RecurringExpenseFields.taxAmount:
|
case RecurringExpenseFields.taxAmount:
|
||||||
return Text(formatNumber(expense.taxAmount, context,
|
return Text(formatNumber(expense.taxAmount, context,
|
||||||
currencyId: expense.currencyId));
|
currencyId: expense.currencyId));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue