use the expense and revenue account names as category names if the transaction has not category when importing Firefly III transactions

This commit is contained in:
MaysWind
2025-07-13 01:51:27 +08:00
parent ca5c451d36
commit 0413f8c0aa
8 changed files with 107 additions and 64 deletions
@@ -122,6 +122,8 @@ func (t *mt940TransactionDataRowIterator) parseTransaction(ctx core.Context, use
data[datatable.TRANSACTION_DATA_TABLE_ACCOUNT_CURRENCY] = mt940Data.OpeningBalance.Currency
} else if mt940Data.ClosingBalance != nil && mt940Data.ClosingBalance.Currency != "" {
data[datatable.TRANSACTION_DATA_TABLE_ACCOUNT_CURRENCY] = mt940Data.ClosingBalance.Currency
} else {
return nil, errs.ErrAccountCurrencyInvalid
}
amountValue := strings.ReplaceAll(statement.Amount, ",", ".") // decimal separator is comma in mt data