Expenses
This commit is contained in:
parent
6c96cec2ed
commit
658a1a3a1a
|
|
@ -50,5 +50,3 @@ dependencies {
|
|||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
||||
implementation 'com.google.firebase:firebase-core:16.0.5'
|
||||
}
|
||||
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
|
|
|
|||
|
|
@ -326,6 +326,8 @@ abstract class ExpenseEntity extends Object
|
|||
}
|
||||
}
|
||||
|
||||
double get convertedAmount => round(amount * exchangeRate, 2);
|
||||
|
||||
double get convertedAmountWithTax => round(amountWithTax * exchangeRate, 2);
|
||||
|
||||
bool get isInvoiced => invoiceId != null && invoiceId > 0;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ InvoiceItemEntity convertExpenseToInvoiceItem({ExpenseEntity expense}) {
|
|||
..expenseId = expense.id
|
||||
..notes = expense.publicNotes
|
||||
..qty = 1
|
||||
..cost = expense.amount
|
||||
..cost = expense.convertedAmount
|
||||
..taxName1 = expense.taxName1
|
||||
..taxRate1 = expense.taxRate1
|
||||
..taxName2 = expense.taxName2
|
||||
|
|
|
|||
Loading…
Reference in New Issue