mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix #2876
This commit is contained in:
parent
55175da316
commit
1e7de48f59
2
public/v1/js/app.js
vendored
2
public/v1/js/app.js
vendored
File diff suppressed because one or more lines are too long
@ -121,6 +121,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<!-- -->
|
||||
<amount
|
||||
:source="transaction.source_account"
|
||||
:destination="transaction.destination_account"
|
||||
@ -221,6 +222,10 @@
|
||||
}
|
||||
return amount;
|
||||
},
|
||||
roundNumber(amount, decimals) {
|
||||
let multiplier = Math.pow(10, decimals);
|
||||
return Math.round(amount * multiplier) / multiplier;
|
||||
},
|
||||
selectedSourceAccount(index, model) {
|
||||
if (typeof model === 'string') {
|
||||
// cant change types, only name.
|
||||
@ -367,20 +372,20 @@
|
||||
}
|
||||
|
||||
this.transactions.push({
|
||||
transaction_journal_id: transaction.transaction_journal_id,
|
||||
description: transaction.description,
|
||||
date: transaction.date.substr(0, 10),
|
||||
amount: this.positiveAmount(transaction.amount),
|
||||
category: transaction.category_name,
|
||||
errors: {
|
||||
source_account: [],
|
||||
destination_account: [],
|
||||
description: [],
|
||||
amount: [],
|
||||
date: [],
|
||||
budget_id: [],
|
||||
foreign_amount: [],
|
||||
category: [],
|
||||
transaction_journal_id: transaction.transaction_journal_id,
|
||||
description: transaction.description,
|
||||
date: transaction.date.substr(0, 10),
|
||||
amount: this.roundNumber(this.positiveAmount(transaction.amount), transaction.currency_decimal_places),
|
||||
category: transaction.category_name,
|
||||
errors: {
|
||||
source_account: [],
|
||||
destination_account: [],
|
||||
description: [],
|
||||
amount: [],
|
||||
date: [],
|
||||
budget_id: [],
|
||||
foreign_amount: [],
|
||||
category: [],
|
||||
piggy_bank: [],
|
||||
tags: [],
|
||||
// custom fields:
|
||||
@ -409,7 +414,7 @@
|
||||
notes: transaction.notes
|
||||
},
|
||||
foreign_amount: {
|
||||
amount: this.positiveAmount(transaction.foreign_amount),
|
||||
amount: this.roundNumber(this.positiveAmount(transaction.foreign_amount), transaction.foreign_currency_decimal_places),
|
||||
currency_id: transaction.foreign_currency_id
|
||||
},
|
||||
source_account: {
|
||||
|
Loading…
Reference in New Issue
Block a user