[Kmymoney] Delete/Correct Account Currency Entries

Jack ostroffjh at frontier.com
Wed Sep 9 15:59:13 UTC 2015


On editing XML files - xml is a plain text format, so you are best off  
using a text editor (emacs or vi or notepad, for example).  If  
libreoffice thinks it is some sort of spreadsheet or excel file, it  
will never work.  If you use libreoffice writer, I think you should be  
able to save as plain text.  libreoffice calc would probably not be a  
good choice for this work.

On 2015.09.09 09:55, timothy wrote:
> Hi
> 
> Thanks Allan and Thomas for your helpful replies.
> Sorry for the delay, but I have been in and out.
> 
> I have attached the output of the Tools/Update Stock and Currency  
> Prices
> showing
> the two entries that throw up the error. SNMM and AGMM are money  
> market
> investments accounts. The E0000... appear to have become the  
> currencies,
> but do not show in the ledgers or anywhere else. The correct currency  
> is
> shown for these accounts in ledgers, reports and investments.
> 
> I have followed Allan's instructions, but cannot save the modified  
> .xml
> in a format that kmymoney will accept. Either 'Unknown format' or 'old
> binary format'.
> 
> I am running kmymoney version  4.7.90-601bc8c80c. My O/S is lmde2  
> (linux
> mint debian edition) and I am using Libre Office to edit the .xml  
> file.
> It has various choices for formats of excel to save, but none of them
> are acceptable.
> It is not the editing that is the problem because I tried saving the
> file without any editing and still could not read it into kmm.
> 
> If you have any advice on what format of excel to save please let me
> know. Also I am opening the .xml file in libre in fixed format with no
> separators, utf8.
> 
> Timothy
> 
> PS There are many more E0000.. currencies in the kmy file, but only  
> the
> two shown are being picked up. Here are other entries for E000028
> 
>   <SECURITY saf="1000" trading-currency="ZAR" symbol="AGMM" type="1"
> id="E000028" name="AG Money Market" trading-market="FUND"/>
> 
>   <PRICEPAIR from="ZAR" to="E000028">
>    <PRICE price="1/1" source="Yahoo Currency" date="2014-12-23"/>
>    <PRICE price="1/1" source="Yahoo Currency" date="2015-01-02"/>
>    <PRICE price="1/1" source="Yahoo Currency" date="2015-02-02"/>
>    <PRICE price="1/1" source="Yahoo Currency" date="2015-03-27"/>
>    <PRICE price="1/1" source="Yahoo Currency" date="2015-04-01"/>
>    <PRICE price="1/1" source="Yahoo Currency" date="2015-04-24"/>
>    <PRICE price="1/1" source="Yahoo Currency" date="2015-05-04"/>
>    <PRICE price="1/1" source="Yahoo Currency" date="2015-06-01"/>
>    <PRICE price="1/1" source="Yahoo Currency" date="2015-06-26"/>
>    <PRICE price="1/1" source="User" date="2015-07-29"/>
>    <PRICE price="1/1" source="Yahoo Currency" date="2015-08-03"/>
>    <PRICE price="1/1" source="Yahoo Currency" date="2015-08-27"/>
>   </PRICEPAIR>
> 
> 
> 
> On Wed, 2015-09-09 at 12:38 +0200, Thomas Baumgart wrote:
> > Hi,
> >
> > On Tuesday 08 September 2015 11:30:53 aga wrote:
> >
> > > On 08/09/15 10:11, timothy wrote:
> > > > Hi
> > > >
> > > > I have a problem with spurious currencies. I saved my .kmy file  
> to .xml
> > > > and identified the entries which are similar to below:-
> > > >
> > > >   <ACCOUNT currency="E000027" description=""  
> parentaccount="A000353"
> > > >
> > > > opened="2008-05-07" number="" lastmodified="2014-08-08"  
> type="15"
> > > > id="A000388" lastreconciled="" institution=""  
> name="............">
> > > >
> > > > The currency "E000027" is not valid and throws up errors in the  
> Tools >
> > > > Update Stock and Currency Prices option.
> > > >
> > > > How would I go about changing the E0000.. to the base currency  
> in
> > > > the .kmy file? There is no way that I can see to delete these  
> entries.
> > > > They only show up in the Tools > Update Stock and Currency  
> Prices and
> > > > cannot be deleted there.
> > > >
> > > > Any help would be appreciated.
> > > > Regards
> > > >
> > > > Timothy
> ---------------------
> > > From Allan
> > >
> > > Hi Timothy
> > >
> > > Apart from the errors in the Tools/Update Stock and Currency  
> Prices
> > > option, does everything else appear to work normally?.
> > >
> > > I would have expected the Consistency check to have flagged a  
> problem
> > > like this, assuming you have done one.  It might be as well to  
> ensure
> > > you keep a copy of that file in case any investigation of that  
> aspect is
> > > necessary.
> > >
> > > Does the currency ID "E000027" show up elsewhere in your file?   
> Can you
> > > see what it relates to?
> > >
> > > Before anything else, ensure you have good working backup.  Bear  
> in mind
> > > that editing the file involves some risk, so take your time.   
> Change the
> > > currency ID to that of your base currency, for just one of these
> > > records, then save as XML, and you can then load that into KMM as  
> usual.
> > >   Run a Consistency check and then look for this account and see  
> if all
> > > looks normal.  Then, if OK, repeat the process for the other  
> errors,
> > > with your fingers crossed.
> > ----------------------------------------
> > From Thomas
> > I don't repeat the security hints about keeping backups.
> >
> > A type="15" account is a stock account so E000027 must be a  
> security of some
> > stock. It should be somewhere in the file. If not, I wonder how you  
> deleted
> > it. Are there transactions referencing this security?
> >
> > If you don't see E000027 elsewhere in your file, I would create a  
> dummy
> > security or currency, figure out its ID in the XML file and change  
> E000027 to
> > that ID. Then start removing this stuff. It is certainly not valid  
> if E000027
> > is missing.
> >
> > Hope that helps. If instructions are unclear, please let us know.
> >
> >
> > _______________________________________________
> > KMyMoney mailing list
> > KMyMoney at kde.org
> > https://mail.kde.org/mailman/listinfo/kmymoney
> 
> 

------quoted attachment------
> _______________________________________________
> KMyMoney mailing list
> KMyMoney at kde.org
> https://mail.kde.org/mailman/listinfo/kmymoney
> 



More information about the KMyMoney mailing list