1
0
mirror of https://github.com/aclindsa/ofxgo.git synced 2025-06-15 05:58:38 -04:00

Bank Transactions: Use Currency structs, not CurrSymbol directly

This commit is contained in:
2017-04-18 20:17:44 -04:00
parent a3e42fc903
commit 8712be5a9d
4 changed files with 18 additions and 8 deletions

View File

@ -78,9 +78,9 @@ func bankTransactions() {
func printTransaction(defCurrency ofxgo.CurrSymbol, tran *ofxgo.Transaction) {
currency := defCurrency
if ok, _ := tran.Currency.Valid(); ok {
currency = tran.Currency
currency = tran.Currency.CurSym
} else if ok, _ := tran.OrigCurrency.Valid(); ok {
currency = tran.OrigCurrency
currency = tran.OrigCurrency.CurSym
}
var name string

View File

@ -61,9 +61,9 @@ func ccTransactions() {
for _, tran := range stmt.BankTranList.Transactions {
currency := stmt.CurDef
if ok, _ := tran.Currency.Valid(); ok {
currency = tran.Currency
currency = tran.Currency.CurSym
} else if ok, _ := tran.OrigCurrency.Valid(); ok {
currency = tran.OrigCurrency
currency = tran.OrigCurrency.CurSym
}
var name string