Bug 302388

Summary: Gnucash import failes
Product: [Applications] skrooge Reporter: Zsombor <renszarv07>
Component: generalAssignee: Stephane MANKOWSKI <stephane>
Status: RESOLVED FIXED    
Severity: normal CC: stephane
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Zsombor 2012-06-23 06:57:55 UTC
Importing a gnucash file fails with the following error message:
[ERR-5]: 'file:///media/sam/docs/gnucash/accounts-2.4.gnucash' fájl importálása sikertelen
[ERR-5]: 'SKGDocumentBank::addOrModifyUnitValue' művelet 'EUR' -n sikertelen
[ERR-8]: Pénznem értéke nem lehet negatív

Which means that the value of currency cannot be negative - which I generally agree, but I don't know how to fix it, where are the negative values in my gnucash accounts.

This is with skrooge 1.3.0 on KDE 4.8.3
Comment 1 Stephane MANKOWSKI 2012-06-23 08:35:10 UTC
Hi,

The price of a share or a currency can not be negative.
In your gnucash file, you should be able to find a tag <price:value> with a negative value.

Here is an example of a correct value:
<price:value>1023/100</price:value>

I hope this will help you.
Comment 2 Zsombor 2012-06-23 12:18:11 UTC
Thanks, that was the culprit: 
 <price:value>-1/0</price:value>
It would be nice, if skrooge could report the date, and the currencies involved if found something invalid.
Comment 3 Stephane MANKOWSKI 2012-06-23 13:29:36 UTC
Hi,

Normally, you should already have the currency.
Example: Here, the issue is on 'FCP Action Euro' because 'negative value'
[ERR-5]: Operation 'SKGDocumentBank::addOrModifyUnitValue' on 'FCP Action Euro' failed
[ERR-8]: Value of a currency cannot be a negative value

In any case, I will change this to add the date.