mirror of
https://github.com/aclindsa/moneygo.git
synced 2024-12-26 23:42:29 -05:00
OFX imports: Remove restriction about account types
...but still update imported Credit Card account type to Liability
This commit is contained in:
parent
0095015053
commit
ecf271732e
@ -66,13 +66,6 @@ func ofxImportHelper(r io.Reader, w http.ResponseWriter, user *User, accountid i
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if account.Type != importedAccount.Type {
|
|
||||||
sqltransaction.Rollback()
|
|
||||||
WriteError(w, 3 /*Invalid Request*/)
|
|
||||||
log.Printf("Expected %s account, found %s in OFX file", account.Type.String(), importedAccount.Type.String())
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find matching existing securities or create new ones for those
|
// Find matching existing securities or create new ones for those
|
||||||
// referenced by the OFX import. Also create a map from placeholder import
|
// referenced by the OFX import. Also create a map from placeholder import
|
||||||
// SecurityIds to the actual SecurityIDs
|
// SecurityIds to the actual SecurityIDs
|
||||||
|
2
ofx.go
2
ofx.go
@ -137,7 +137,7 @@ func (i *OFXImport) importOFXCC(stmt *ofxgo.CCStatementResponse) error {
|
|||||||
ExternalAccountId: stmt.CCAcctFrom.AcctID.String(),
|
ExternalAccountId: stmt.CCAcctFrom.AcctID.String(),
|
||||||
SecurityId: security.SecurityId,
|
SecurityId: security.SecurityId,
|
||||||
ParentAccountId: -1,
|
ParentAccountId: -1,
|
||||||
Type: Bank,
|
Type: Liability,
|
||||||
}
|
}
|
||||||
i.Accounts = append(i.Accounts, account)
|
i.Accounts = append(i.Accounts, account)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user