mirror of
https://github.com/aclindsa/ofxgo.git
synced 2025-07-01 19:58:37 -04:00
Use CurrSymbol instead of String to represent currencies
This commit is contained in:
@ -60,10 +60,10 @@ func ccTransactions() {
|
||||
fmt.Println("Transactions:")
|
||||
for _, tran := range stmt.BankTranList.Transactions {
|
||||
currency := stmt.CurDef
|
||||
if len(tran.Currency) > 0 {
|
||||
currency = tran.Currency
|
||||
} else if len(tran.OrigCurrency) > 0 {
|
||||
if ok, _ := tran.Currency.Valid(); ok {
|
||||
currency = tran.Currency
|
||||
} else if ok, _ := tran.OrigCurrency.Valid(); ok {
|
||||
currency = tran.OrigCurrency
|
||||
}
|
||||
|
||||
var name string
|
||||
@ -77,7 +77,7 @@ func ccTransactions() {
|
||||
name = name + " - " + string(tran.Memo)
|
||||
}
|
||||
|
||||
fmt.Printf("%s %-15s %-11s %s\n", tran.DtPosted, tran.TrnAmt.String()+" "+string(currency), tran.TrnType, name)
|
||||
fmt.Printf("%s %-15s %-11s %s\n", tran.DtPosted, tran.TrnAmt.String()+" "+currency.String(), tran.TrnType, name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user