From fbd19f9da4e4faa9e2ff1cfbbdd2ade1453f80a5 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Mon, 28 Oct 2024 22:44:03 +0800 Subject: [PATCH] support comma as decimal point --- pkg/converters/ofx/ofx_transaction_table.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/converters/ofx/ofx_transaction_table.go b/pkg/converters/ofx/ofx_transaction_table.go index b522b216..9d16a79d 100644 --- a/pkg/converters/ofx/ofx_transaction_table.go +++ b/pkg/converters/ofx/ofx_transaction_table.go @@ -126,7 +126,7 @@ func (t *ofxTransactionDataRowIterator) parseTransaction(ctx core.Context, user data[datatable.TRANSACTION_DATA_TABLE_TRANSACTION_TIME] = datetime data[datatable.TRANSACTION_DATA_TABLE_TRANSACTION_TIMEZONE] = timezone - amount, err := utils.ParseAmount(ofxTransaction.Amount) + amount, err := utils.ParseAmount(strings.ReplaceAll(ofxTransaction.Amount, ",", ".")) // ofx supports decimal point or comma to indicate the start of the fractional amount if err != nil { return nil, errs.ErrAmountInvalid