From be8cec21792db0ccecae21ee93b1c5657a73301b Mon Sep 17 00:00:00 2001 From: Aaron Lindsay Date: Wed, 9 May 2018 21:00:55 -0400 Subject: [PATCH] gnucash: Successfully import currencies labeled CURRENCY Older versions of gnucash labeled currencies as ISO4217, but it appears the latest label them CURRENCY instead. --- internal/handlers/gnucash.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/handlers/gnucash.go b/internal/handlers/gnucash.go index 7a80c69..8c4c17a 100644 --- a/internal/handlers/gnucash.go +++ b/internal/handlers/gnucash.go @@ -36,7 +36,7 @@ func (gc *GnucashCommodity) UnmarshalXML(d *xml.Decoder, start xml.StartElement) gc.AlternateId = gxc.XCode gc.Security.Type = models.Stock // assumed default - if gxc.Type == "ISO4217" { + if gxc.Type == "ISO4217" || gxc.Type == "CURRENCY" { gc.Security.Type = models.Currency // Get the number from our templates for the AlternateId because // Gnucash uses 'id' (our Name) to supply the string ISO4217 code