mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Merge branch 'develop' into 5.8-dev
This commit is contained in:
commit
acd9685578
@ -480,7 +480,7 @@ trait TransactionValidation
|
|||||||
}
|
}
|
||||||
$type = $this->getTransactionType($transactionGroup, $transactions);
|
$type = $this->getTransactionType($transactionGroup, $transactions);
|
||||||
|
|
||||||
// compare source ID's, destination ID's, source names and destination names.
|
// compare source IDs, destination IDs, source names and destination names.
|
||||||
// I think I can get away with one combination being equal, as long as the rest
|
// I think I can get away with one combination being equal, as long as the rest
|
||||||
// of the code picks up on this as well.
|
// of the code picks up on this as well.
|
||||||
// either way all fields must be blank or all equal
|
// either way all fields must be blank or all equal
|
||||||
|
@ -128,6 +128,7 @@
|
|||||||
v-model="transaction.amount"
|
v-model="transaction.amount"
|
||||||
:destination="transaction.destination_account"
|
:destination="transaction.destination_account"
|
||||||
:error="transaction.errors.amount"
|
:error="transaction.errors.amount"
|
||||||
|
:index="index"
|
||||||
:source="transaction.source_account"
|
:source="transaction.source_account"
|
||||||
:transactionType="transactionType"
|
:transactionType="transactionType"
|
||||||
></amount>
|
></amount>
|
||||||
@ -548,16 +549,24 @@ export default {
|
|||||||
transactionType = 'deposit';
|
transactionType = 'deposit';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// get currency from first transaction. overrule the rest
|
||||||
|
let currencyId = this.transactions[0].source_account.currency_id;
|
||||||
|
|
||||||
|
if ('deposit' === transactionType) {
|
||||||
|
currencyId = this.transactions[0].destination_account.currency_id;
|
||||||
|
}
|
||||||
|
console.log('Overruled currency ID to ' + currencyId);
|
||||||
|
|
||||||
for (let key in this.transactions) {
|
for (let key in this.transactions) {
|
||||||
if (this.transactions.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
|
if (this.transactions.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
|
||||||
data.transactions.push(this.convertDataRow(this.transactions[key], key, transactionType));
|
data.transactions.push(this.convertDataRow(this.transactions[key], key, transactionType, currencyId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//console.log(data);
|
//console.log(data);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
convertDataRow(row, index, transactionType) {
|
convertDataRow(row, index, transactionType, currencyId) {
|
||||||
let tagList = [];
|
let tagList = [];
|
||||||
let foreignAmount = null;
|
let foreignAmount = null;
|
||||||
let foreignCurrency = null;
|
let foreignCurrency = null;
|
||||||
@ -573,14 +582,17 @@ export default {
|
|||||||
destName = row.destination_account.name;
|
destName = row.destination_account.name;
|
||||||
|
|
||||||
// depends on the transaction type, where we get the currency.
|
// depends on the transaction type, where we get the currency.
|
||||||
if ('withdrawal' === transactionType || 'transfer' === transactionType) {
|
// if ('withdrawal' === transactionType || 'transfer' === transactionType) {
|
||||||
row.currency_id = row.source_account.currency_id;
|
// row.currency_id = row.source_account.currency_id;
|
||||||
// console.log('Overruled currency ID to ' + row.currency_id);
|
// console.log('Overruled currency ID to ' + row.currency_id);
|
||||||
}
|
// }
|
||||||
if ('deposit' === transactionType) {
|
// if ('deposit' === transactionType) {
|
||||||
row.currency_id = row.destination_account.currency_id;
|
// row.currency_id = row.destination_account.currency_id;
|
||||||
// console.log('Overruled currency ID to ' + row.currency_id);
|
// console.log('Overruled currency ID to ' + row.currency_id);
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
row.currency_id = currencyId;
|
||||||
|
console.log('Final currency ID = ' + currencyId);
|
||||||
|
|
||||||
date = row.date;
|
date = row.date;
|
||||||
if (index > 0) {
|
if (index > 0) {
|
||||||
|
1
resources/lang/da_DK/locales.json
Normal file
1
resources/lang/da_DK/locales.json
Normal file
File diff suppressed because one or more lines are too long
1
resources/lang/ko_KR/locales.json
Normal file
1
resources/lang/ko_KR/locales.json
Normal file
File diff suppressed because one or more lines are too long
1
resources/lang/th_TH/locales.json
Normal file
1
resources/lang/th_TH/locales.json
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user