Bug 302388 - Gnucash import failes
Summary: Gnucash import failes
Status: RESOLVED FIXED
Alias: None
Product: skrooge
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Stephane MANKOWSKI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-23 06:57 UTC by Zsombor
Modified: 2012-06-23 20:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.