1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2024-12-25 07:13:20 -05:00

gnucash: Successfully import currencies labeled CURRENCY

Older versions of gnucash labeled currencies as ISO4217, but it appears
the latest label them CURRENCY instead.
This commit is contained in:
Aaron Lindsay 2018-05-09 21:00:55 -04:00
parent b531174a6a
commit be8cec2179

View File

@ -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