Import and display Status
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-01-16 15:42:56 +00:00
parent 7fba9e7e4c
commit 663f247080
6 changed files with 66 additions and 12 deletions

View File

@ -165,12 +165,23 @@ func (ynab *YNABImport) ImportTransactions(r io.Reader) error {
return fmt.Errorf("could not parse amount from (%s/%s): %w", inflow, outflow, err)
}
statusEnum := TransactionStatusUncleared
status := record[10]
switch status {
case "Cleared":
statusEnum = TransactionStatusCleared
case "Reconciled":
statusEnum = TransactionStatusReconciled
case "Uncleared":
}
transaction := CreateTransactionParams{
Date: date,
Memo: memo,
AccountID: account.ID,
CategoryID: category,
Amount: amount,
Status: statusEnum,
}
payeeName := record[3]
@ -237,8 +248,6 @@ func (ynab *YNABImport) ImportTransactions(r io.Reader) error {
}
}
//status := record[10]
count++
}