mirror of
				https://github.com/aclindsa/moneygo.git
				synced 2025-11-04 02:23:26 -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:
		@@ -36,7 +36,7 @@ func (gc *GnucashCommodity) UnmarshalXML(d *xml.Decoder, start xml.StartElement)
 | 
				
			|||||||
	gc.AlternateId = gxc.XCode
 | 
						gc.AlternateId = gxc.XCode
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	gc.Security.Type = models.Stock // assumed default
 | 
						gc.Security.Type = models.Stock // assumed default
 | 
				
			||||||
	if gxc.Type == "ISO4217" {
 | 
						if gxc.Type == "ISO4217" || gxc.Type == "CURRENCY" {
 | 
				
			||||||
		gc.Security.Type = models.Currency
 | 
							gc.Security.Type = models.Currency
 | 
				
			||||||
		// Get the number from our templates for the AlternateId because
 | 
							// Get the number from our templates for the AlternateId because
 | 
				
			||||||
		// Gnucash uses 'id' (our Name) to supply the string ISO4217 code
 | 
							// Gnucash uses 'id' (our Name) to supply the string ISO4217 code
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user