mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-25 06:51:08 +00:00
Fix #2876
This commit is contained in:
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>
|
</div>
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
|
<!-- -->
|
||||||
<amount
|
<amount
|
||||||
:source="transaction.source_account"
|
:source="transaction.source_account"
|
||||||
:destination="transaction.destination_account"
|
:destination="transaction.destination_account"
|
||||||
@@ -221,6 +222,10 @@
|
|||||||
}
|
}
|
||||||
return amount;
|
return amount;
|
||||||
},
|
},
|
||||||
|
roundNumber(amount, decimals) {
|
||||||
|
let multiplier = Math.pow(10, decimals);
|
||||||
|
return Math.round(amount * multiplier) / multiplier;
|
||||||
|
},
|
||||||
selectedSourceAccount(index, model) {
|
selectedSourceAccount(index, model) {
|
||||||
if (typeof model === 'string') {
|
if (typeof model === 'string') {
|
||||||
// cant change types, only name.
|
// cant change types, only name.
|
||||||
@@ -370,7 +375,7 @@
|
|||||||
transaction_journal_id: transaction.transaction_journal_id,
|
transaction_journal_id: transaction.transaction_journal_id,
|
||||||
description: transaction.description,
|
description: transaction.description,
|
||||||
date: transaction.date.substr(0, 10),
|
date: transaction.date.substr(0, 10),
|
||||||
amount: this.positiveAmount(transaction.amount),
|
amount: this.roundNumber(this.positiveAmount(transaction.amount), transaction.currency_decimal_places),
|
||||||
category: transaction.category_name,
|
category: transaction.category_name,
|
||||||
errors: {
|
errors: {
|
||||||
source_account: [],
|
source_account: [],
|
||||||
@@ -409,7 +414,7 @@
|
|||||||
notes: transaction.notes
|
notes: transaction.notes
|
||||||
},
|
},
|
||||||
foreign_amount: {
|
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
|
currency_id: transaction.foreign_currency_id
|
||||||
},
|
},
|
||||||
source_account: {
|
source_account: {
|
||||||
|
Reference in New Issue
Block a user