[GNC] Account Currency Screwed Up Again!

2020-01-27 Thread rsbrux via gnucash-user
Many years ago I set up in GC a bank account denominated in AUD to buy 
and sell securities in that currency.  While reconciling my end-of-year 
statements I only just noticed while attempting to enter a new price for 
one of the securities that all transactions in that account (not just 
securities, but also transactions with other accounts denominated in 
AUD, such as the income account I use for recording interest paid in 
AUD) are recorderd in CHF and are converted to CHF instead of AUD!!!  
How could this happen? More important (since it is unlikely that the 
cause can be reconstructed at this late date) how can I correct this 
without having to manually recreate all transactions in the account 
going back to 2013?


Based on previous experience with such problems, I will also have to 
recreate the AUD-denominated securities (fortunately there are only two) 
and their transactions in order to correct the erroneous currency (CHF) 
attached to them.  Please say it ain't so!


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Account Currency Screwed Up Again!

2020-02-03 Thread rsbrux via gnucash-user
I haven't see an answer to this on the distribution list, nor on Nabble 
<http://gnucash.1415818.n4.nabble.com/GNC-Account-Currency-Screwed-Up-Again-td4715785.html>. 


Can I fix this by editing the XML file?
I am using GC v2.6.19 under Ubuntu Studio 18.04.  Is there a function to 
change the currency of transactions in a newer version of GC?
If not, is there any hope that such a function might be provided in the 
future?


On 27.01.20 10:24, rsbrux wrote:
Many years ago I set up in GC a bank account denominated in AUD to buy 
and sell securities in that currency.  While reconciling my 
end-of-year statements I only just noticed while attempting to enter a 
new price for one of the securities that all transactions in that 
account (not just securities, but also transactions with other 
accounts denominated in AUD, such as the income account I use for 
recording interest paid in AUD) are recorderd in CHF and are converted 
to CHF instead of AUD!!!  How could this happen? More important (since 
it is unlikely that the cause can be reconstructed at this late date) 
how can I correct this without having to manually recreate all 
transactions in the account going back to 2013?


Based on previous experience with such problems, I will also have to 
recreate the AUD-denominated securities (fortunately there are only 
two) and their transactions in order to correct the erroneous currency 
(CHF) attached to them.  Please say it ain't so!



___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Account Currency Screwed Up Again!

2020-02-03 Thread David Cousens
Have you checked the default currency used Edit->Preferences, Accounts tab,
Default Currency. It is normally set to locale. I guess you are in Australia
so it should be AUD. If not, diid you possibly create the book originally
while overseas or the locale on your computer was not set to Australia.
AFAIK it is not possible to edit the currency of an account once it is
created in the Edit Account dialog only in the New Account dialog.

It should be possible to edit the file this but fraught with possible
problems.  Work on a copy of your original file and don't save it over the
original until you are really sure that the problem is fixed and other
problems haven't been created. I would keep a copy of the original even
after you reach this point just to be sure.

Your XML file will have to be uncompressed Edit ->Preferences General Tab
and uncheck the box which says compress files. You may then have to force a
Save. I did this by creating a dummy transaction in a register then hitting
the Save button in the toolbar, deleting the dummy transaction and clicking
Save again.

The section of the XMLfile which contains the commodity information for an
account is reproduced below for a SGD account I have.

  TravelMoney_CC_SGD
  *7db63ffa514d478191dea006748d7bd6*
  LIABILITY
  
CURRENCY
*SGD*
  

You will have to have the commodity you wish to change the account to
specified earlier in the file in a section like

  CURRENCY
  SGD
  
  currency
  


Each transaction to the account will have the commodity specified in a
 tag set. You would need to find all of these and change the
commodity similarly

  4ec8a9416b31469bb1eeaf79c5557092
  
CURRENCY
SGD
  
  
2019-03-17 10:59:00 +
  
  
2019-05-14 03:25:18 +
  
  XX 1897  BP-BOOKSACTUALLY
  

  date-posted
  
2019-03-17
  

  
  

  2bf944df822042849e1cbd5a2b6db3c8
  n
  6100/100
  6654/100
  7be97b5f738386fd2272881dc33a0272


  4ef42d767cc748f79ce09d6d8f2d3043
  y
  
2019-05-14 13:59:59 +
  
  -6100/100
  -6100/100
  *7db63ffa514d478191dea006748d7bd6*

  


Make sure the guid for the account matches up (bolded in the above examples)
in the transaction splits and the account you have modified the currency
for. 

AFAIK they are the only places you should need to modify the currency but I
only have a passing acquaintance with the file XML format and the data
structures so I cannot be sure.

The price database was the other section which had records containing the
currency
  
5b56177651ba48ffa9ce7410e4f3f355

  CURRENCY
  AUD


  CURRENCY
  SGD


  2019-03-21 14:00:00 +

user:price
7/77059
  
  

It may be easier edit that with the edit facilities in the Tools->Price
Database if necessary. None of this is really recommended but proceed with
extreme caution lots of backups and good luck.

David Cousens





-
David Cousens
--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Account Currency Screwed Up Again!

2020-02-03 Thread Adrien Monteleone
Would creating a new duplicate account with the proper assigned currency, then 
deleting the old account and choosing to transfer all transactions to the new 
currency work?

That would be significantly easier than manual editing.

I’m not sure how the use of Trading Accounts affects this, or if it should or 
should not be turned on.


Regards,
Adrien

> On Feb 3, 2020 w6d34, at 4:45 AM, David Cousens  
> wrote:
> 
> Have you checked the default currency used Edit->Preferences, Accounts tab,
> Default Currency. It is normally set to locale. I guess you are in Australia
> so it should be AUD. If not, diid you possibly create the book originally
> while overseas or the locale on your computer was not set to Australia.
> AFAIK it is not possible to edit the currency of an account once it is
> created in the Edit Account dialog only in the New Account dialog.
> 
> It should be possible to edit the file this but fraught with possible
> problems.  Work on a copy of your original file and don't save it over the
> original until you are really sure that the problem is fixed and other
> problems haven't been created. I would keep a copy of the original even
> after you reach this point just to be sure.
> 
> Your XML file will have to be uncompressed Edit ->Preferences General Tab
> and uncheck the box which says compress files. You may then have to force a
> Save. I did this by creating a dummy transaction in a register then hitting
> the Save button in the toolbar, deleting the dummy transaction and clicking
> Save again.
> 
> The section of the XMLfile which contains the commodity information for an
> account is reproduced below for a SGD account I have.
> 
>  TravelMoney_CC_SGD
>  *7db63ffa514d478191dea006748d7bd6*
>  LIABILITY
>  
>CURRENCY
>*SGD*
>  
> 
> You will have to have the commodity you wish to change the account to
> specified earlier in the file in a section like
> 
>  CURRENCY
>  SGD
>  
>  currency
>  
> 
> 
> Each transaction to the account will have the commodity specified in a
>  tag set. You would need to find all of these and change the
> commodity similarly
> 
>  4ec8a9416b31469bb1eeaf79c5557092
>  
>CURRENCY
>SGD
>  
>  
>2019-03-17 10:59:00 +
>  
>  
>2019-05-14 03:25:18 +
>  
>  XX 1897  BP-BOOKSACTUALLY
>  
>
>  date-posted
>  
>2019-03-17
>  
>
>  
>  
>
>  2bf944df822042849e1cbd5a2b6db3c8
>  n
>  6100/100
>  6654/100
>   type="guid">7be97b5f738386fd2272881dc33a0272
>
>
>  4ef42d767cc748f79ce09d6d8f2d3043
>  y
>  
>2019-05-14 13:59:59 +
>  
>  -6100/100
>  -6100/100
>   type="guid">*7db63ffa514d478191dea006748d7bd6*
>
>  
> 
> 
> Make sure the guid for the account matches up (bolded in the above examples)
> in the transaction splits and the account you have modified the currency
> for. 
> 
> AFAIK they are the only places you should need to modify the currency but I
> only have a passing acquaintance with the file XML format and the data
> structures so I cannot be sure.
> 
> The price database was the other section which had records containing the
> currency
>  
>5b56177651ba48ffa9ce7410e4f3f355
>
>  CURRENCY
>  AUD
>
>
>  CURRENCY
>  SGD
>
>
>  2019-03-21 14:00:00 +
>
>user:price
>7/77059
>  
>  
> 
> It may be easier edit that with the edit facilities in the Tools->Price
> Database if necessary. None of this is really recommended but proceed with
> extreme caution lots of backups and good luck.
> 
> David Cousens

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Account Currency Screwed Up Again!

2020-02-10 Thread rsbrux via gnucash-user

Many thanks to both of you for your suggestions!

@Adrien,

The accounts in question already had the correct currency (AUD) 
assigned.  The accounts in question are a foreign currency account in 
AUD, three accounts for AUD-denominated securities (which I bought/sold 
in the above-mentioned foreign currency account), various expense 
accounts in AUD and an income account in AUD for interest.  The 
transactions between the foreign currency account and the expense 
accounts were recoreded in AUD as expected.  All other transactions were 
recorded with CHF exchange rates, although no currency conversions were 
called for.  The prices of two of the three securities were also 
recorded in CHF.  SInce the GC UI shows all accounts in AUD (except for 
the securities accounts, which IIRC, do not have a currency) it was 
unclear to me which account(s) I should duplicate.


@David,

My default currency is CHF; I live in Switzerland.  Trading accounts are 
turned on.  I have tried to fix this in the XML based on the information 
you provided.  I tried to look up more information about the file 
structure, but the guide 
<https://www.gnucash.org/viewdoc.phtml?rev=2.6&lang=C&doc=guide> wasn't 
much help, and the wiki <https://wiki.gnucash.org/wiki/> appears to be down.


IAC, I edited the price records for the two securities which had 
incorrect price currencies, as well as all transactions which refenenced 
any of the three securities accounts, changing the currencies from CHF 
to AUD.  This appears to have fixed the problems, but I am keeping a 
couple of pre-edit backups, as you recommend.


Am I the only one to encounter problems like this?

SInce the problem seems to have been with the (implicitly determined) 
currencies of the prices and the transactions, would it be possible to 
add an option to the price editor dialog for each price and to the 
exchange rate editor for each transaction to change or select the 
currency?  From what I have learned about the data structure, this looks 
like the easiest way to provide a less dangerous way to fix such problems.



Date: Mon, 3 Feb 2020 10:31:58 -0600
From: Adrien Monteleone 
To: Gnucash Users 
Subject: Re: [GNC] Account Currency Screwed Up Again!
Message-ID: <821d9637-24ee-4c33-a1bf-792fe55e8...@lusfiber.net>
Content-Type: text/plain;   charset=utf-8

Would creating a new duplicate account with the proper assigned currency, then 
deleting the old account and choosing to transfer all transactions to the new 
currency work?

That would be significantly easier than manual editing.

I?m not sure how the use of Trading Accounts affects this, or if it should or 
should not be turned on.


Regards,
Adrien


On Feb 3, 2020 w6d34, at 4:45 AM, David Cousens  
wrote:

Have you checked the default currency used Edit->Preferences, Accounts tab,
Default Currency. It is normally set to locale. I guess you are in Australia
so it should be AUD. If not, diid you possibly create the book originally
while overseas or the locale on your computer was not set to Australia.
AFAIK it is not possible to edit the currency of an account once it is
created in the Edit Account dialog only in the New Account dialog.

It should be possible to edit the file this but fraught with possible
problems.  Work on a copy of your original file and don't save it over the
original until you are really sure that the problem is fixed and other
problems haven't been created. I would keep a copy of the original even
after you reach this point just to be sure.

Your XML file will have to be uncompressed Edit ->Preferences General Tab
and uncheck the box which says compress files. You may then have to force a
Save. I did this by creating a dummy transaction in a register then hitting
the Save button in the toolbar, deleting the dummy transaction and clicking
Save again.

The section of the XMLfile which contains the commodity information for an
account is reproduced below for a SGD account I have.

  TravelMoney_CC_SGD
  *7db63ffa514d478191dea006748d7bd6*
  LIABILITY
  
CURRENCY
*SGD*
  

You will have to have the commodity you wish to change the account to
specified earlier in the file in a section like

  CURRENCY
  SGD
  
  currency
  


Each transaction to the account will have the commodity specified in a
 tag set. You would need to find all of these and change the
commodity similarly

  4ec8a9416b31469bb1eeaf79c5557092
  
CURRENCY
SGD
  
  
2019-03-17 10:59:00 +
  
  
2019-05-14 03:25:18 +
  
  XX 1897  BP-BOOKSACTUALLY
  

  date-posted
  
2019-03-17
  

  
  

  2bf944df822042849e1cbd5a2b6db3c8
  n
  6100/100
  6654/100
  7be97b5f738386fd2272881dc33a0272


  4ef42d767cc748f79ce09d6d8f2d3043
  y
  
2019-05-14 13:59:59 +
  
  -6100/100
  -6100/100
  *7db63ffa514d478191dea006748d7bd6*

  


Make sure the guid for the accou

Re: [GNC] Account Currency Screwed Up Again!

2020-02-10 Thread Adrien Monteleone
Glad to hear you managed to fix the data, but that raises the question why 
retrieving prices is grabbing CHF instead of AUD.

Is the parent of the affected securities set for AUD? This is usually an 
account representing the brokerage that handles the individual securities for 
you.

Note, at this time, I don’t think you can have mixed currency accounts in one 
brokerage parent. You’ll have to create separate brokerage parent accounts for 
each currency.

Regards,
Adrien

> On Feb 10, 2020 w7d41, at 7:21 AM, rsbrux via gnucash-user 
>  wrote:
> 
> Many thanks to both of you for your suggestions!
> 
> @Adrien,
> 
> The accounts in question already had the correct currency (AUD) assigned.  
> The accounts in question are a foreign currency account in AUD, three 
> accounts for AUD-denominated securities (which I bought/sold in the 
> above-mentioned foreign currency account), various expense accounts in AUD 
> and an income account in AUD for interest.  The transactions between the 
> foreign currency account and the expense accounts were recoreded in AUD as 
> expected.  All other transactions were recorded with CHF exchange rates, 
> although no currency conversions were called for.  The prices of two of the 
> three securities were also recorded in CHF.  SInce the GC UI shows all 
> accounts in AUD (except for the securities accounts, which IIRC, do not have 
> a currency) it was unclear to me which account(s) I should duplicate.

> 
> @David,
> 
> My default currency is CHF; I live in Switzerland.  Trading accounts are 
> turned on.  I have tried to fix this in the XML based on the information you 
> provided.  I tried to look up more information about the file structure, but 
> the guide  
> wasn't much help, and the wiki  appears to be 
> down.
> 
> IAC, I edited the price records for the two securities which had incorrect 
> price currencies, as well as all transactions which refenenced any of the 
> three securities accounts, changing the currencies from CHF to AUD.  This 
> appears to have fixed the problems, but I am keeping a couple of pre-edit 
> backups, as you recommend.
> 
> Am I the only one to encounter problems like this?
> 
> SInce the problem seems to have been with the (implicitly determined) 
> currencies of the prices and the transactions, would it be possible to add an 
> option to the price editor dialog for each price and to the exchange rate 
> editor for each transaction to change or select the currency?  From what I 
> have learned about the data structure, this looks like the easiest way to 
> provide a less dangerous way to fix such problems.


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Account Currency Screwed Up Again!

2020-02-10 Thread David Cousens
Not sure, but I don't understand why the prices of the securites were in CHF. 
Since you have AUD income and expense
accounts associated with the securities and you record their purchase/sale 
against an AUD foreign currency account I
would have thought the securities would have been in AUD if traded on the ASX.

A lot will depend upon what you are required to supply to your tax authorities, 
where tax is paid, and what rules apply
on timing of conversion from AUD to CHF for tax recording purposes. For that 
sort of info you will need a Swiss tax
accountant with foreign tax experience. 

In Australia companies operate under a company tax regime where tax paid on 
company profits is not normally taxed again
as a dividend in the hands of a shareholder. The shareholder receives a 
franking credit for the tax paid in the hands of
the company to offset against their income tax. Not all share dividends are 
franked however. This of course only applies
to Australian shareholders who pay income tax in Australia unless  some sort of 
reciprocal tax agreement between
countries exists covering these taxes.


On Mon, 2020-02-10 at 14:21 +0100, rsbrux via gnucash-user wrote:
> Many thanks to both of you for your suggestions!
> 
> @Adrien,
> 
> The accounts in question already had the correct currency (AUD) 
> assigned.  The accounts in question are a foreign currency account in 
> AUD, three accounts for AUD-denominated securities (which I bought/sold 
> in the above-mentioned foreign currency account), various expense 
> accounts in AUD and an income account in AUD for interest.  The 
> transactions between the foreign currency account and the expense 
> accounts were recoreded in AUD as expected.  All other transactions were 
> recorded with CHF exchange rates, although no currency conversions were 
> called for.  The prices of two of the three securities were also 
> recorded in CHF.  SInce the GC UI shows all accounts in AUD (except for 
> the securities accounts, which IIRC, do not have a currency) it was 
> unclear to me which account(s) I should duplicate.
> 
> @David,
> 
> My default currency is CHF; I live in Switzerland.  Trading accounts are 
> turned on.  I have tried to fix this in the XML based on the information 
> you provided.  I tried to look up more information about the file 
> structure, but the guide 
> <https://www.gnucash.org/viewdoc.phtml?rev=2.6&lang=C&doc=guide> wasn't 
> much help, and the wiki <https://wiki.gnucash.org/wiki/> appears to be down.
> 
> IAC, I edited the price records for the two securities which had 
> incorrect price currencies, as well as all transactions which refenenced 
> any of the three securities accounts, changing the currencies from CHF 
> to AUD.  This appears to have fixed the problems, but I am keeping a 
> couple of pre-edit backups, as you recommend.
> 
> Am I the only one to encounter problems like this?
> 
> SInce the problem seems to have been with the (implicitly determined) 
> currencies of the prices and the transactions, would it be possible to 
> add an option to the price editor dialog for each price and to the 
> exchange rate editor for each transaction to change or select the 
> currency?  From what I have learned about the data structure, this looks 
> like the easiest way to provide a less dangerous way to fix such problems.
> 
> > Date: Mon, 3 Feb 2020 10:31:58 -0600
> > From: Adrien Monteleone 
> > To: Gnucash Users 
> > Subject: Re: [GNC] Account Currency Screwed Up Again!
> > Message-ID: <821d9637-24ee-4c33-a1bf-792fe55e8...@lusfiber.net>
> > Content-Type: text/plain;   charset=utf-8
> > 
> > Would creating a new duplicate account with the proper assigned currency, 
> > then deleting the old account and choosing
> > to transfer all transactions to the new currency work?
> > 
> > That would be significantly easier than manual editing.
> > 
> > I?m not sure how the use of Trading Accounts affects this, or if it should 
> > or should not be turned on.
> > 
> > 
> > Regards,
> > Adrien
> > 
> > > On Feb 3, 2020 w6d34, at 4:45 AM, David Cousens 
> > >  wrote:
> > > 
> > > Have you checked the default currency used Edit->Preferences, Accounts 
> > > tab,
> > > Default Currency. It is normally set to locale. I guess you are in 
> > > Australia
> > > so it should be AUD. If not, diid you possibly create the book originally
> > > while overseas or the locale on your computer was not set to Australia.
> > > AFAIK it is not possible to edit the currency of an account once it is
> > > created in the Edit Account dialog only in the New Account dialog.
> > > 
> > >

Re: [GNC] Account Currency Screwed Up Again!

2020-02-10 Thread John Ralls
What is the parent account of the three stock accounts and what is the 
commodity of that parent account?

Regards,
John Ralls


> On Feb 10, 2020, at 5:21 AM, rsbrux via gnucash-user 
>  wrote:
> 
> Many thanks to both of you for your suggestions!
> 
> @Adrien,
> 
> The accounts in question already had the correct currency (AUD) assigned.  
> The accounts in question are a foreign currency account in AUD, three 
> accounts for AUD-denominated securities (which I bought/sold in the 
> above-mentioned foreign currency account), various expense accounts in AUD 
> and an income account in AUD for interest.  The transactions between the 
> foreign currency account and the expense accounts were recoreded in AUD as 
> expected.  All other transactions were recorded with CHF exchange rates, 
> although no currency conversions were called for.  The prices of two of the 
> three securities were also recorded in CHF.  SInce the GC UI shows all 
> accounts in AUD (except for the securities accounts, which IIRC, do not have 
> a currency) it was unclear to me which account(s) I should duplicate.
> 
> @David,
> 
> My default currency is CHF; I live in Switzerland.  Trading accounts are 
> turned on.  I have tried to fix this in the XML based on the information you 
> provided.  I tried to look up more information about the file structure, but 
> the guide <https://www.gnucash.org/viewdoc.phtml?rev=2.6&lang=C&doc=guide> 
> wasn't much help, and the wiki <https://wiki.gnucash.org/wiki/> appears to be 
> down.
> 
> IAC, I edited the price records for the two securities which had incorrect 
> price currencies, as well as all transactions which refenenced any of the 
> three securities accounts, changing the currencies from CHF to AUD.  This 
> appears to have fixed the problems, but I am keeping a couple of pre-edit 
> backups, as you recommend.
> 
> Am I the only one to encounter problems like this?
> 
> SInce the problem seems to have been with the (implicitly determined) 
> currencies of the prices and the transactions, would it be possible to add an 
> option to the price editor dialog for each price and to the exchange rate 
> editor for each transaction to change or select the currency?  From what I 
> have learned about the data structure, this looks like the easiest way to 
> provide a less dangerous way to fix such problems.
> 
>> Date: Mon, 3 Feb 2020 10:31:58 -0600
>> From: Adrien Monteleone 
>> To: Gnucash Users 
>> Subject: Re: [GNC] Account Currency Screwed Up Again!
>> Message-ID: <821d9637-24ee-4c33-a1bf-792fe55e8...@lusfiber.net>
>> Content-Type: text/plain;charset=utf-8
>> 
>> Would creating a new duplicate account with the proper assigned currency, 
>> then deleting the old account and choosing to transfer all transactions to 
>> the new currency work?
>> 
>> That would be significantly easier than manual editing.
>> 
>> I?m not sure how the use of Trading Accounts affects this, or if it should 
>> or should not be turned on.
>> 
>> 
>> Regards,
>> Adrien
>> 
>>> On Feb 3, 2020 w6d34, at 4:45 AM, David Cousens  
>>> wrote:
>>> 
>>> Have you checked the default currency used Edit->Preferences, Accounts tab,
>>> Default Currency. It is normally set to locale. I guess you are in Australia
>>> so it should be AUD. If not, diid you possibly create the book originally
>>> while overseas or the locale on your computer was not set to Australia.
>>> AFAIK it is not possible to edit the currency of an account once it is
>>> created in the Edit Account dialog only in the New Account dialog.
>>> 
>>> It should be possible to edit the file this but fraught with possible
>>> problems.  Work on a copy of your original file and don't save it over the
>>> original until you are really sure that the problem is fixed and other
>>> problems haven't been created. I would keep a copy of the original even
>>> after you reach this point just to be sure.
>>> 
>>> Your XML file will have to be uncompressed Edit ->Preferences General Tab
>>> and uncheck the box which says compress files. You may then have to force a
>>> Save. I did this by creating a dummy transaction in a register then hitting
>>> the Save button in the toolbar, deleting the dummy transaction and clicking
>>> Save again.
>>> 
>>> The section of the XMLfile which contains the commodity information for an
>>> account is reproduced below for a SGD account I have.
>>> 
>>>  TravelMoney_CC_SGD
>>>  *7db63ffa514d478191dea006748d7b

Re: [GNC] Account Currency Screwed Up Again!

2020-02-11 Thread rsbrux via gnucash-user
There were two different parent accounts, both in CHF.  I guess that is 
the source of my problems, although I had previously managed to have 
securities with different currencies under them. ISTR reading somewhere 
that securities in GC take their currency from the account in which the 
first transaction is entered.  In that case, my problems are probably 
due to entering the initial transactions in the securities account 
(which presumably takes its currency from the parent account) instead of 
in the account from which the money comes (which would have the correct 
currency). Because of the columns and labels provided, securities 
transactions are easier to enter in a securities account.


To me, the resulting confusion still argues in favor of explicitly 
associating a currency with each security, something which is apparently 
not foreseen in the data structure.


Thanks for your help!

On 11.02.20 05:43, John Ralls wrote:

What is the parent account of the three stock accounts and what is the 
commodity of that parent account?

Regards,
John Ralls



On Feb 10, 2020, at 5:21 AM, rsbrux via gnucash-user  
wrote:

Many thanks to both of you for your suggestions!

@Adrien,

The accounts in question already had the correct currency (AUD) assigned.  The 
accounts in question are a foreign currency account in AUD, three accounts for 
AUD-denominated securities (which I bought/sold in the above-mentioned foreign 
currency account), various expense accounts in AUD and an income account in AUD 
for interest.  The transactions between the foreign currency account and the 
expense accounts were recoreded in AUD as expected.  All other transactions 
were recorded with CHF exchange rates, although no currency conversions were 
called for.  The prices of two of the three securities were also recorded in 
CHF.  SInce the GC UI shows all accounts in AUD (except for the securities 
accounts, which IIRC, do not have a currency) it was unclear to me which 
account(s) I should duplicate.

@David,

My default currency is CHF; I live in Switzerland.  Trading accounts are turned on.  I have tried 
to fix this in the XML based on the information you provided.  I tried to look up more information 
about the file structure, but the guide 
<https://www.gnucash.org/viewdoc.phtml?rev=2.6&lang=C&doc=guide> wasn't much help, 
and the wiki <https://wiki.gnucash.org/wiki/> appears to be down.

IAC, I edited the price records for the two securities which had incorrect 
price currencies, as well as all transactions which refenenced any of the three 
securities accounts, changing the currencies from CHF to AUD.  This appears to 
have fixed the problems, but I am keeping a couple of pre-edit backups, as you 
recommend.

Am I the only one to encounter problems like this?

SInce the problem seems to have been with the (implicitly determined) 
currencies of the prices and the transactions, would it be possible to add an 
option to the price editor dialog for each price and to the exchange rate 
editor for each transaction to change or select the currency?  From what I have 
learned about the data structure, this looks like the easiest way to provide a 
less dangerous way to fix such problems.


Date: Mon, 3 Feb 2020 10:31:58 -0600
From: Adrien Monteleone 
To: Gnucash Users 
Subject: Re: [GNC] Account Currency Screwed Up Again!
Message-ID: <821d9637-24ee-4c33-a1bf-792fe55e8...@lusfiber.net>
Content-Type: text/plain;   charset=utf-8

Would creating a new duplicate account with the proper assigned currency, then 
deleting the old account and choosing to transfer all transactions to the new 
currency work?

That would be significantly easier than manual editing.

I?m not sure how the use of Trading Accounts affects this, or if it should or 
should not be turned on.


Regards,
Adrien


On Feb 3, 2020 w6d34, at 4:45 AM, David Cousens  
wrote:

Have you checked the default currency used Edit->Preferences, Accounts tab,
Default Currency. It is normally set to locale. I guess you are in Australia
so it should be AUD. If not, diid you possibly create the book originally
while overseas or the locale on your computer was not set to Australia.
AFAIK it is not possible to edit the currency of an account once it is
created in the Edit Account dialog only in the New Account dialog.

It should be possible to edit the file this but fraught with possible
problems.  Work on a copy of your original file and don't save it over the
original until you are really sure that the problem is fixed and other
problems haven't been created. I would keep a copy of the original even
after you reach this point just to be sure.

Your XML file will have to be uncompressed Edit ->Preferences General Tab
and uncheck the box which says compress files. You may then have to force a
Save. I did this by creating a dummy transaction in a register then hitting
the Save button in the toolbar, deleting the dummy transaction and clickin

Re: [GNC] Account Currency Screwed Up Again!

2020-02-11 Thread rsbrux via gnucash-user
ve learned about the data structure, this looks
like the easiest way to provide a less dangerous way to fix such problems.


Date: Mon, 3 Feb 2020 10:31:58 -0600
From: Adrien Monteleone 
To: Gnucash Users 
Subject: Re: [GNC] Account Currency Screwed Up Again!
Message-ID: <821d9637-24ee-4c33-a1bf-792fe55e8...@lusfiber.net>
Content-Type: text/plain;   charset=utf-8

Would creating a new duplicate account with the proper assigned currency, then 
deleting the old account and choosing
to transfer all transactions to the new currency work?

That would be significantly easier than manual editing.

I?m not sure how the use of Trading Accounts affects this, or if it should or 
should not be turned on.


Regards,
Adrien


On Feb 3, 2020 w6d34, at 4:45 AM, David Cousens  
wrote:

Have you checked the default currency used Edit->Preferences, Accounts tab,
Default Currency. It is normally set to locale. I guess you are in Australia
so it should be AUD. If not, diid you possibly create the book originally
while overseas or the locale on your computer was not set to Australia.
AFAIK it is not possible to edit the currency of an account once it is
created in the Edit Account dialog only in the New Account dialog.

It should be possible to edit the file this but fraught with possible
problems.  Work on a copy of your original file and don't save it over the
original until you are really sure that the problem is fixed and other
problems haven't been created. I would keep a copy of the original even
after you reach this point just to be sure.

Your XML file will have to be uncompressed Edit ->Preferences General Tab
and uncheck the box which says compress files. You may then have to force a
Save. I did this by creating a dummy transaction in a register then hitting
the Save button in the toolbar, deleting the dummy transaction and clicking
Save again.

The section of the XMLfile which contains the commodity information for an
account is reproduced below for a SGD account I have.

   TravelMoney_CC_SGD
   *7db63ffa514d478191dea006748d7bd6*
   LIABILITY
   
 CURRENCY
 *SGD*
   

You will have to have the commodity you wish to change the account to
specified earlier in the file in a section like

   CURRENCY
   SGD
   
   currency
   


Each transaction to the account will have the commodity specified in a
 tag set. You would need to find all of these and change the
commodity similarly

   4ec8a9416b31469bb1eeaf79c5557092
   
 CURRENCY
 SGD
   
   
 2019-03-17 10:59:00 +
   
   
 2019-05-14 03:25:18 +
   
   XX 1897  BP-BOOKSACTUALLY
   
 
   date-posted
   
 2019-03-17
   
 
   
   
 
   2bf944df822042849e1cbd5a2b6db3c8
   n
   6100/100
   6654/100
   7be97b5f738386fd2272881dc33a0272
 
 
   4ef42d767cc748f79ce09d6d8f2d3043
   y
   
 2019-05-14 13:59:59 +
   
   -6100/100
   -6100/100
   *7db63ffa514d478191dea006748d7bd6*
 
   


Make sure the guid for the account matches up (bolded in the above examples)
in the transaction splits and the account you have modified the currency
for.

AFAIK they are the only places you should need to modify the currency but I
only have a passing acquaintance with the file XML format and the data
structures so I cannot be sure.

The price database was the other section which had records containing the
currency
   
 5b56177651ba48ffa9ce7410e4f3f355
 
   CURRENCY
   AUD
 
 
   CURRENCY
   SGD
 
 
   2019-03-21 14:00:00 +
 
 user:price
 7/77059
   
   

It may be easier edit that with the edit facilities in the Tools->Price
Database if necessary. None of this is really recommended but proceed with
extreme caution lots of backups and good luck.

David Cousens






___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Account Currency Screwed Up Again!

2020-02-11 Thread Adrien Monteleone
My understanding is that the controlling factor is the currency of the parent, 
not where you enter the transaction. But I could be mistaken.

The tree organization is really user dependent.

I think the Guide uses a slightly different organization where bank/brokerage 
lies below  with a separate  per currency, that 
would eliminate one nesting level, but may not be to your liking or use case. 
So the result would be:

Assets -  - Investments -  -  - 

You could also do the following:

Assets -  - Investments -  - 
 - 

But neither may feel or look as clean as using a currency level by itself.

Regards,
Adrien



> On Feb 11, 2020 w7d42, at 3:52 AM, rsbrux via gnucash-user 
>  wrote:
> 
> It was probabably due to my placing the securities accounts under accounts in 
> CHF and entering the first transactions in the securities accounts instead of 
> in the associated accounts for purchase & sale (see my reply to John Rails).  
> Stock quotes retrieved from Yahoo as json do show the correct currency, but 
> my AUD investments have been in bonds and ETFs, for which I haven't found any 
> online quote sources,  The price editor does in fact have a currency 
> settting, however, it doesn't have any effect on prices which were taken from 
> transactions.  I can edit such a price and change the currency in the dialog, 
> but when I click "Apply" and "Close", nothing is changed.  Going through the 
> price database has uncovered several other cases where securities 
> transactions were entered with incorrect currencies.  To prevent future 
> occurences I have now inserted additonal account levels for currencies where 
> they were previously missing, even though the resulting account structure is 
> even unwieldie
 r than before:
> 
> Assets - Investments -  -  -  - 
> 
> where  dispense with the  level.
> 
> I did find one price in CHF for a security under a GBP account, but it is 
> possible that I had entered the purchase transaction before introducing the 
> currency-specific subaccount structure.
> 
> Our tax authorities insist on reporting produced by the banks (which costs us 
> extra), so the mistakes in my accounting are irrelevant for tax purposes.  We 
> do have a well-versed Swiss tax accountant and don't have to worry about 
> foreign taxes because they are reported in the bank data and generally 
> deducted at the origin.
> 
> Unfortunately for us, dividends are taxed as income in Switzerland, unless 
> they are paid out of corporate reserves as "return of capital".
> 


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Account Currency Screwed Up Again!

2020-02-11 Thread John Ralls
The transaction currency in which the value field of every split is denominated 
is determined by the account in whose register one creates the transaction. If 
that account is in a non-currency commodity then the currency of first parent 
account denominated in a currency is used. So in rsbrux's case where he had a 
stock XYZ under a CHF parent and bought using AUD, the stock split will have an 
amount in XYZ and a value in CHF and the cash split will have an amount in AUD 
and a value in CHF. That's a three-way transaction with two prices: XYZ->CHF 
and AUD->CHF. Both should be recorded in the price database. If he used basic 
view or was careless about entering the price and values the AUD->CHF price 
might be 1 and the XYZ->CHF price might have the value of XYZ's price in AUD.

Had he instead had the parent of the XYZ account in AUD as he should have or if 
had created the transaction starting in the cash account then the transaction 
currency would be AUD and only the stock split would have a price.

Regards,
John Ralls

> On Feb 11, 2020, at 9:42 AM, Adrien Monteleone 
>  wrote:
> 
> My understanding is that the controlling factor is the currency of the 
> parent, not where you enter the transaction. But I could be mistaken.
> 
> The tree organization is really user dependent.
> 
> I think the Guide uses a slightly different organization where bank/brokerage 
> lies below  with a separate  per currency, that 
> would eliminate one nesting level, but may not be to your liking or use case. 
> So the result would be:
> 
> Assets -  - Investments -  type> -  - 
> 
> You could also do the following:
> 
> Assets -  - Investments -  - 
>  - 
> 
> But neither may feel or look as clean as using a currency level by itself.
> 
> Regards,
> Adrien
> 
> 
> 
>> On Feb 11, 2020 w7d42, at 3:52 AM, rsbrux via gnucash-user 
>>  wrote:
>> 
>> It was probabably due to my placing the securities accounts under accounts 
>> in CHF and entering the first transactions in the securities accounts 
>> instead of in the associated accounts for purchase & sale (see my reply to 
>> John Rails).  Stock quotes retrieved from Yahoo as json do show the correct 
>> currency, but my AUD investments have been in bonds and ETFs, for which I 
>> haven't found any online quote sources,  The price editor does in fact have 
>> a currency settting, however, it doesn't have any effect on prices which 
>> were taken from transactions.  I can edit such a price and change the 
>> currency in the dialog, but when I click "Apply" and "Close", nothing is 
>> changed.  Going through the price database has uncovered several other cases 
>> where securities transactions were entered with incorrect currencies.  To 
>> prevent future occurences I have now inserted additonal account levels for 
>> currencies where they were previously missing, even though the resulting 
>> account structure is even unwieldi
 e
> r than before:
>> 
>> Assets - Investments -  -  -  - 
>> 
>> where > dispense with the  level.
>> 
>> I did find one price in CHF for a security under a GBP account, but it is 
>> possible that I had entered the purchase transaction before introducing the 
>> currency-specific subaccount structure.
>> 
>> Our tax authorities insist on reporting produced by the banks (which costs 
>> us extra), so the mistakes in my accounting are irrelevant for tax purposes. 
>>  We do have a well-versed Swiss tax accountant and don't have to worry about 
>> foreign taxes because they are reported in the bank data and generally 
>> deducted at the origin.
>> 
>> Unfortunately for us, dividends are taxed as income in Switzerland, unless 
>> they are paid out of corporate reserves as "return of capital".
>> 
> 
> 
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see 
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Account Currency Screwed Up Again!

2020-02-11 Thread Adrien Monteleone
Thanks for the explanation.

Regards,
Adrien

> On Feb 11, 2020 w7d42, at 1:20 PM, John Ralls  wrote:
> 
> The transaction currency in which the value field of every split is 
> denominated is determined by the account in whose register one creates the 
> transaction. If that account is in a non-currency commodity then the currency 
> of first parent account denominated in a currency is used. So in rsbrux's 
> case where he had a stock XYZ under a CHF parent and bought using AUD, the 
> stock split will have an amount in XYZ and a value in CHF and the cash split 
> will have an amount in AUD and a value in CHF. That's a three-way transaction 
> with two prices: XYZ->CHF and AUD->CHF. Both should be recorded in the price 
> database. If he used basic view or was careless about entering the price and 
> values the AUD->CHF price might be 1 and the XYZ->CHF price might have the 
> value of XYZ's price in AUD.
> 
> Had he instead had the parent of the XYZ account in AUD as he should have or 
> if had created the transaction starting in the cash account then the 
> transaction currency would be AUD and only the stock split would have a price.
> 
> Regards,
> John Ralls

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Account Currency Screwed Up Again!

2020-02-12 Thread rsbrux via gnucash-user

Thanks to all for your patient explanations and help.

@Adrien,

For the time being I have just inserted currency account levels in my 
existing tree as recommended here:


https://wiki.gnucash.org/wiki/Stocks/add_stock#Stocks_noted_in_foreign_currency

You have raised some interesting considerations which might move me to 
adopt a different structure, but I couldn't find the part of the guide 
you were referring to.  Can you provide a link?



Date: Tue, 11 Feb 2020 14:39:01 -0600
From: Adrien Monteleone 
To: Gnucash Users 
Subject: Re: [GNC] Account Currency Screwed Up Again!
Message-ID: 
Content-Type: text/plain;   charset=us-ascii

Thanks for the explanation.

Regards,
Adrien


On Feb 11, 2020 w7d42, at 1:20 PM, John Ralls 

wrote:

The transaction currency in which the value field of every split is

denominated is determined by the account in whose register one creates the
transaction. If that account is in a non-currency commodity then the
currency of first parent account denominated in a currency is used. So in
rsbrux's case where he had a stock XYZ under a CHF parent and bought using
AUD, the stock split will have an amount in XYZ and a value in CHF and the
cash split will have an amount in AUD and a value in CHF. That's a
three-way transaction with two prices: XYZ->CHF and AUD->CHF. Both should
be recorded in the price database. If he used basic view or was careless
about entering the price and values the AUD->CHF price might be 1 and the
XYZ->CHF price might have the value of XYZ's price in AUD.

Had he instead had the parent of the XYZ account in AUD as he should

have or if had created the transaction starting in the cash account then
the transaction currency would be AUD and only the stock split would have
a price.

Regards,
John Ralls



___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Account Currency Screwed Up Again!

2020-02-12 Thread Adrien Monteleone
Sorry, I meant to include it and forgot.

It is in Chapter 9: Investments, specifically: 
https://www.gnucash.org/docs/v3/C/gnucash-guide/invest_accounts1.html

Section 9.2.2 covers the currency issues, including multi-currency, and 9.2.3 
gives an example of an intricate custom tree. (not necessarily multi-currency 
though)

Regards,
Adrien

> On Feb 12, 2020 w7d43, at 9:03 AM, rsbrux via gnucash-user 
>  wrote:
> 
> Thanks to all for your patient explanations and help.
> 
> @Adrien,
> 
> For the time being I have just inserted currency account levels in my 
> existing tree as recommended here:
> 
> https://wiki.gnucash.org/wiki/Stocks/add_stock#Stocks_noted_in_foreign_currency
> 
> You have raised some interesting considerations which might move me to adopt 
> a different structure, but I couldn't find the part of the guide you were 
> referring to.  Can you provide a link?


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.