mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-22 02:34:26 +08:00
fix parsing amount for expense transaction
This commit is contained in:
@@ -187,7 +187,6 @@ func (t *gnucashTransactionDataRowIterator) parseTransaction(ctx core.Context, u
|
|||||||
toAccount = account1
|
toAccount = account1
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(fromAmount) > 0 && fromAmount[0] == '-' {
|
|
||||||
amount, err := utils.ParseAmount(fromAmount)
|
amount, err := utils.ParseAmount(fromAmount)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -195,7 +194,6 @@ func (t *gnucashTransactionDataRowIterator) parseTransaction(ctx core.Context, u
|
|||||||
}
|
}
|
||||||
|
|
||||||
fromAmount = utils.FormatAmount(-amount)
|
fromAmount = utils.FormatAmount(-amount)
|
||||||
}
|
|
||||||
|
|
||||||
data[datatable.TRANSACTION_DATA_TABLE_TRANSACTION_TYPE] = utils.IntToString(int(models.TRANSACTION_TYPE_EXPENSE))
|
data[datatable.TRANSACTION_DATA_TABLE_TRANSACTION_TYPE] = utils.IntToString(int(models.TRANSACTION_TYPE_EXPENSE))
|
||||||
data[datatable.TRANSACTION_DATA_TABLE_CATEGORY] = t.getCategoryName(toAccount)
|
data[datatable.TRANSACTION_DATA_TABLE_CATEGORY] = t.getCategoryName(toAccount)
|
||||||
|
|||||||
Reference in New Issue
Block a user