mirror of
https://github.com/aclindsa/moneygo.git
synced 2025-07-01 12:08:37 -04:00
Add direct OFX imports
This commit is contained in:
16
ofx.go
16
ofx.go
@ -113,9 +113,11 @@ func (i *OFXImport) importOFXBank(stmt *ofxgo.StatementResponse) error {
|
||||
Type: Bank,
|
||||
}
|
||||
|
||||
for _, tran := range stmt.BankTranList.Transactions {
|
||||
if err := i.AddTransaction(&tran, &account); err != nil {
|
||||
return err
|
||||
if stmt.BankTranList != nil {
|
||||
for _, tran := range stmt.BankTranList.Transactions {
|
||||
if err := i.AddTransaction(&tran, &account); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,9 +141,11 @@ func (i *OFXImport) importOFXCC(stmt *ofxgo.CCStatementResponse) error {
|
||||
}
|
||||
i.Accounts = append(i.Accounts, account)
|
||||
|
||||
for _, tran := range stmt.BankTranList.Transactions {
|
||||
if err := i.AddTransaction(&tran, &account); err != nil {
|
||||
return err
|
||||
if stmt.BankTranList != nil {
|
||||
for _, tran := range stmt.BankTranList.Transactions {
|
||||
if err := i.AddTransaction(&tran, &account); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user