mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-15 23:47:33 +08:00
support comma as decimal point
This commit is contained in:
@@ -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_TIME] = datetime
|
||||||
data[datatable.TRANSACTION_DATA_TABLE_TRANSACTION_TIMEZONE] = timezone
|
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 {
|
if err != nil {
|
||||||
return nil, errs.ErrAmountInvalid
|
return nil, errs.ErrAmountInvalid
|
||||||
|
|||||||
Reference in New Issue
Block a user