Re: [GNC] Australian Foreign Investments Taxation

2020-04-07 Thread David H
Hi Ben,

Isn't Libre Office able to highlight a column and change the date format
from dd/mmm/ccyy to dd/mm/ccyy for instance ??

Cheers David H.

On Wed, 8 Apr 2020 at 00:54, Ben Stanley  wrote:

> Hello Gnucash Users,
>
> I have now downloaded the foreign exchange rates from the Reserve Bank
> of Australia:
> https://rba.gov.au/statistics/historical-data.html#exchange-rates
>
> Note that the exchange rate data is published in an Excel .xls file. I
> used LibreOffice to save it as a .csv for import into GnuCash.
>
> In this file, the dates are formatted as DD-Mon-. For example:
> 18-May-2019
>
> GnuCash cannot understand dates formatted this way. (I tested against
> git 3.9-19 on branch maint.)
>
> I made some modifications to gnucash/libgnucash/engine/gnc-datetime.cpp
> that allow GnuCash to import the RBA data with word date months. The
> changes are very rough, and do not include any internationalisation. I
> would appreciate constructive feedback. Flames -> /dev/null.
>
> I note here that I have not tested this patch with dates of format
> DD-MM-.
>
> Perhaps I should sign up to the gnucash-devel mailing list...
>
> Ben.
>
> On 7/4/20 7:28 pm, Christopher Lam wrote:
> > Yes, you can do that. File import prices from CSV.
> >
> > On Tue, 7 Apr 2020, 5:22 pm Ben Stanley,  > > wrote:
> >
> > I can get a CSV file of daily exchange rate data. Is there a way
> > of importing it into the price database?
> >
> > On 7 April 2020 7:17:54 pm Christopher Lam
> > mailto:christopher@gmail.com>>
> wrote:
> >
> >> The only report which is capable of using closest-to-date
> >> conversion is the Transaction Report from the
> >> Income:Dividends(USD) and Income:CapGains(USD) accounts, using a
> >> Report Currency of AUD. It will choose the USD/AUD price from the
> >> price editor list closest to each transaction's posting date.
> >>
> >> You'll have to ensure the price list has prices at your desired
> >> dates manually.
> >>
> >> On Tue, 7 Apr 2020 at 09:13, Ben Stanley  >> > wrote:
> >>
> >> Hello Gnucash people,
> >>
> >> This question may be more suited to Gnucash developers, but
> >> lets try it
> >> here first.
> >>
> >> I need to perform a tax calculation in accordance with
> >> instructions from
> >> the Australian Taxation Office. All foreign income,
> >> deductions and
> >> foreign tax paid must be converted to Australian Dollars for
> >> tax purposes.
> >>
> >>
> https://www.ato.gov.au/Business/International-tax-for-business/In-detail/Investing-overseas/Converting-foreign-income-to-Australian-dollars/
> >>
> >> The conversion used must correspond to the transaction date.
> >>
> >> In Gnucash, it would appear that the price editor could be
> >> used to enter
> >> the necessary conversion data, if it were easy to see all of
> >> the dates
> >> where conversions are required. However, this is tedious.
> >>
> >> Far better would be to use Finance::Quote to fetch the necessary
> >> conversion data for the dates it is required for. However, it
> >> seems that
> >> Finance::Quote is only capable of fetching "recent" data. (The
> >> documentation that I looked at seemed to be very old.)
> >>
> >> http://finance-quote.sourceforge.net/documentation.html
> >>
> >> What is needed is the ability to pass a date, or a range of
> >> dates, and
> >> request Finance::Quote to fetch prices for that date or date
> >> interval.
> >> This would make Finance::Quote far more useful than just
> >> fetching the
> >> most recent price data.
> >>
> >> Is there some feature in Gnucash that I have missed that
> >> would allow me
> >> to generate a report, with dividends and Capital Gains
> >> converted from
> >> USD -> AUD using the currency conversion as at the
> >> transaction dates?
> >>
> >> Thanks,
> >> Ben Stanley.
> >>
> >>
> >> ___
> >> 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:
> 

Re: [GNC] Australian Foreign Investments Taxation

2020-04-07 Thread Ben Stanley

Hello Gnucash Users,

I have now downloaded the foreign exchange rates from the Reserve Bank 
of Australia:

https://rba.gov.au/statistics/historical-data.html#exchange-rates

Note that the exchange rate data is published in an Excel .xls file. I 
used LibreOffice to save it as a .csv for import into GnuCash.


In this file, the dates are formatted as DD-Mon-. For example:
18-May-2019

GnuCash cannot understand dates formatted this way. (I tested against 
git 3.9-19 on branch maint.)


I made some modifications to gnucash/libgnucash/engine/gnc-datetime.cpp 
that allow GnuCash to import the RBA data with word date months. The 
changes are very rough, and do not include any internationalisation. I 
would appreciate constructive feedback. Flames -> /dev/null.


I note here that I have not tested this patch with dates of format 
DD-MM-.


Perhaps I should sign up to the gnucash-devel mailing list...

Ben.

On 7/4/20 7:28 pm, Christopher Lam wrote:

Yes, you can do that. File import prices from CSV.

On Tue, 7 Apr 2020, 5:22 pm Ben Stanley, > wrote:


I can get a CSV file of daily exchange rate data. Is there a way
of importing it into the price database?

On 7 April 2020 7:17:54 pm Christopher Lam
mailto:christopher@gmail.com>> wrote:


The only report which is capable of using closest-to-date
conversion is the Transaction Report from the
Income:Dividends(USD) and Income:CapGains(USD) accounts, using a
Report Currency of AUD. It will choose the USD/AUD price from the
price editor list closest to each transaction's posting date.

You'll have to ensure the price list has prices at your desired
dates manually.

On Tue, 7 Apr 2020 at 09:13, Ben Stanley mailto:ben.stan...@gmail.com>> wrote:

Hello Gnucash people,

This question may be more suited to Gnucash developers, but
lets try it
here first.

I need to perform a tax calculation in accordance with
instructions from
the Australian Taxation Office. All foreign income,
deductions and
foreign tax paid must be converted to Australian Dollars for
tax purposes.


https://www.ato.gov.au/Business/International-tax-for-business/In-detail/Investing-overseas/Converting-foreign-income-to-Australian-dollars/

The conversion used must correspond to the transaction date.

In Gnucash, it would appear that the price editor could be
used to enter
the necessary conversion data, if it were easy to see all of
the dates
where conversions are required. However, this is tedious.

Far better would be to use Finance::Quote to fetch the necessary
conversion data for the dates it is required for. However, it
seems that
Finance::Quote is only capable of fetching "recent" data. (The
documentation that I looked at seemed to be very old.)

http://finance-quote.sourceforge.net/documentation.html

What is needed is the ability to pass a date, or a range of
dates, and
request Finance::Quote to fetch prices for that date or date
interval.
This would make Finance::Quote far more useful than just
fetching the
most recent price data.

Is there some feature in Gnucash that I have missed that
would allow me
to generate a report, with dividends and Capital Gains
converted from
USD -> AUD using the currency conversion as at the
transaction dates?

Thanks,
Ben Stanley.


___
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.



Author: Ben Stanley   2020-04-08 00:32:32
Committer: Ben Stanley   2020-04-08 00:32:32
Parent: 2bdc9366958c243d9d3910921a0dc77ff3186cb7 (Merge Jean Laroche's '797006_subaccounts' into maint.)
Branch: GncDate_with_named_month
Follows: 3.9
Precedes: 

Add support for named months in GncDate.
This is useful for importing data from external sources.
This preliminary patch works for months named in English.
No internationalisation support has been added.
The burden of enumerating month names and conversion
should be delegated to the boost library. This may simplify
internationalisation.

-- libgnucash/engine/gnc-datetime.cpp --
index 2192ffd3f..641891145 100644
@@ -80,6 +80,9 @@ static constexpr auto ticks_per_second = INT64_C(100);
 static 

Re: [GNC] Australian Foreign Investments Taxation

2020-04-07 Thread pobox . deva
Ben,

I use the CSV Price Importer for loading stock/mutual fund prices every month 
(all in INR).

Though I haven’t used this in the context of currency exchange rates, I think 
it should be possible because you are essentially converting price from one 
commodity to another in both scenarios.

The CSV Price Importer works very well and it even has a Save Template option, 
which you can reuse on future imports.

Easy, peasy!

Cheers,
Deva

> On 07-Apr-2020, at 2:52 PM, gnucash-user-requ...@gnucash.org wrote:
> 
> Message: 12
> Date: Tue, 07 Apr 2020 19:22:19 +1000
> From: Ben Stanley mailto:ben.stan...@gmail.com>>
> To: Christopher Lam  <mailto:christopher@gmail.com>>
> Cc: GnuCash users group  <mailto:gnucash-user@gnucash.org>>
> Subject: Re: [GNC] Australian Foreign Investments Taxation
> Message-ID:
>   <17153f294f8.27d0.e122910561de4a0ea07b2811c86c2...@gmail.com 
> <mailto:17153f294f8.27d0.e122910561de4a0ea07b2811c86c2...@gmail.com>>
> Content-Type: text/plain; format=flowed; charset="us-ascii"
> 
> I can get a CSV file of daily exchange rate data. Is there a way of 
> importing it into the price database?
> 
> On 7 April 2020 7:17:54 pm Christopher Lam  <mailto:christopher@gmail.com>> wrote:
>> The only report which is capable of using closest-to-date conversion is the 
>> Transaction Report from the Income:Dividends(USD) and Income:CapGains(USD) 
>> accounts, using a Report Currency of AUD. It will choose the USD/AUD price 
>> from the price editor list closest to each transaction's posting date.
>> 
>> You'll have to ensure the price list has prices at your desired dates 
>> manually.
>> 
>> 
>> 
>> On Tue, 7 Apr 2020 at 09:13, Ben Stanley > <mailto:ben.stan...@gmail.com>> wrote:
>> 
>> Hello Gnucash people,
>> 
>> This question may be more suited to Gnucash developers, but lets try it
>> here first.
>> 
>> I need to perform a tax calculation in accordance with instructions from
>> the Australian Taxation Office. All foreign income, deductions and
>> foreign tax paid must be converted to Australian Dollars for tax purposes.
>> 
>> https://www.ato.gov.au/Business/International-tax-for-business/In-detail/Investing-overseas/Converting-foreign-income-to-Australian-dollars/
>>  
>> <https://www.ato.gov.au/Business/International-tax-for-business/In-detail/Investing-overseas/Converting-foreign-income-to-Australian-dollars/>
>> 
>> The conversion used must correspond to the transaction date.
>> 
>> In Gnucash, it would appear that the price editor could be used to enter
>> the necessary conversion data, if it were easy to see all of the dates
>> where conversions are required. However, this is tedious.
>> 
>> Far better would be to use Finance::Quote to fetch the necessary
>> conversion data for the dates it is required for. However, it seems that
>> Finance::Quote is only capable of fetching "recent" data. (The
>> documentation that I looked at seemed to be very old.)
>> 
>> http://finance-quote.sourceforge.net/documentation.html 
>> <http://finance-quote.sourceforge.net/documentation.html>
>> 
>> What is needed is the ability to pass a date, or a range of dates, and
>> request Finance::Quote to fetch prices for that date or date interval.
>> This would make Finance::Quote far more useful than just fetching the
>> most recent price data.
>> 
>> Is there some feature in Gnucash that I have missed that would allow me
>> to generate a report, with dividends and Capital Gains converted from
>> USD -> AUD using the currency conversion as at the transaction dates?
>> 
>> Thanks,
>> Ben Stanley.
>> 

___
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] Australian Foreign Investments Taxation

2020-04-07 Thread Christopher Lam
Yes, you can do that. File import prices from CSV.

On Tue, 7 Apr 2020, 5:22 pm Ben Stanley,  wrote:

> I can get a CSV file of daily exchange rate data. Is there a way of
> importing it into the price database?
>
> On 7 April 2020 7:17:54 pm Christopher Lam 
> wrote:
>
>> The only report which is capable of using closest-to-date conversion is
>> the Transaction Report from the Income:Dividends(USD) and
>> Income:CapGains(USD) accounts, using a Report Currency of AUD. It will
>> choose the USD/AUD price from the price editor list closest to each
>> transaction's posting date.
>>
>> You'll have to ensure the price list has prices at your desired dates
>> manually.
>>
>> On Tue, 7 Apr 2020 at 09:13, Ben Stanley  wrote:
>>
>>> Hello Gnucash people,
>>>
>>> This question may be more suited to Gnucash developers, but lets try it
>>> here first.
>>>
>>> I need to perform a tax calculation in accordance with instructions from
>>> the Australian Taxation Office. All foreign income, deductions and
>>> foreign tax paid must be converted to Australian Dollars for tax
>>> purposes.
>>>
>>>
>>> https://www.ato.gov.au/Business/International-tax-for-business/In-detail/Investing-overseas/Converting-foreign-income-to-Australian-dollars/
>>>
>>> The conversion used must correspond to the transaction date.
>>>
>>> In Gnucash, it would appear that the price editor could be used to enter
>>> the necessary conversion data, if it were easy to see all of the dates
>>> where conversions are required. However, this is tedious.
>>>
>>> Far better would be to use Finance::Quote to fetch the necessary
>>> conversion data for the dates it is required for. However, it seems that
>>> Finance::Quote is only capable of fetching "recent" data. (The
>>> documentation that I looked at seemed to be very old.)
>>>
>>> http://finance-quote.sourceforge.net/documentation.html
>>>
>>> What is needed is the ability to pass a date, or a range of dates, and
>>> request Finance::Quote to fetch prices for that date or date interval.
>>> This would make Finance::Quote far more useful than just fetching the
>>> most recent price data.
>>>
>>> Is there some feature in Gnucash that I have missed that would allow me
>>> to generate a report, with dividends and Capital Gains converted from
>>> USD -> AUD using the currency conversion as at the transaction dates?
>>>
>>> Thanks,
>>> Ben Stanley.
>>>
>>>
>>> ___
>>> 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] Australian Foreign Investments Taxation

2020-04-07 Thread Ben Stanley
I can get a CSV file of daily exchange rate data. Is there a way of 
importing it into the price database?


On 7 April 2020 7:17:54 pm Christopher Lam  wrote:
The only report which is capable of using closest-to-date conversion is the 
Transaction Report from the Income:Dividends(USD) and Income:CapGains(USD) 
accounts, using a Report Currency of AUD. It will choose the USD/AUD price 
from the price editor list closest to each transaction's posting date.


You'll have to ensure the price list has prices at your desired dates manually.



On Tue, 7 Apr 2020 at 09:13, Ben Stanley  wrote:

Hello Gnucash people,

This question may be more suited to Gnucash developers, but lets try it
here first.

I need to perform a tax calculation in accordance with instructions from
the Australian Taxation Office. All foreign income, deductions and
foreign tax paid must be converted to Australian Dollars for tax purposes.

https://www.ato.gov.au/Business/International-tax-for-business/In-detail/Investing-overseas/Converting-foreign-income-to-Australian-dollars/

The conversion used must correspond to the transaction date.

In Gnucash, it would appear that the price editor could be used to enter
the necessary conversion data, if it were easy to see all of the dates
where conversions are required. However, this is tedious.

Far better would be to use Finance::Quote to fetch the necessary
conversion data for the dates it is required for. However, it seems that
Finance::Quote is only capable of fetching "recent" data. (The
documentation that I looked at seemed to be very old.)

http://finance-quote.sourceforge.net/documentation.html

What is needed is the ability to pass a date, or a range of dates, and
request Finance::Quote to fetch prices for that date or date interval.
This would make Finance::Quote far more useful than just fetching the
most recent price data.

Is there some feature in Gnucash that I have missed that would allow me
to generate a report, with dividends and Capital Gains converted from
USD -> AUD using the currency conversion as at the transaction dates?

Thanks,
Ben Stanley.


___
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] Australian Foreign Investments Taxation

2020-04-07 Thread Christopher Lam
The only report which is capable of using closest-to-date conversion is the
Transaction Report from the Income:Dividends(USD) and Income:CapGains(USD)
accounts, using a Report Currency of AUD. It will choose the USD/AUD price
from the price editor list closest to each transaction's posting date.

You'll have to ensure the price list has prices at your desired dates
manually.

On Tue, 7 Apr 2020 at 09:13, Ben Stanley  wrote:

> Hello Gnucash people,
>
> This question may be more suited to Gnucash developers, but lets try it
> here first.
>
> I need to perform a tax calculation in accordance with instructions from
> the Australian Taxation Office. All foreign income, deductions and
> foreign tax paid must be converted to Australian Dollars for tax purposes.
>
>
> https://www.ato.gov.au/Business/International-tax-for-business/In-detail/Investing-overseas/Converting-foreign-income-to-Australian-dollars/
>
> The conversion used must correspond to the transaction date.
>
> In Gnucash, it would appear that the price editor could be used to enter
> the necessary conversion data, if it were easy to see all of the dates
> where conversions are required. However, this is tedious.
>
> Far better would be to use Finance::Quote to fetch the necessary
> conversion data for the dates it is required for. However, it seems that
> Finance::Quote is only capable of fetching "recent" data. (The
> documentation that I looked at seemed to be very old.)
>
> http://finance-quote.sourceforge.net/documentation.html
>
> What is needed is the ability to pass a date, or a range of dates, and
> request Finance::Quote to fetch prices for that date or date interval.
> This would make Finance::Quote far more useful than just fetching the
> most recent price data.
>
> Is there some feature in Gnucash that I have missed that would allow me
> to generate a report, with dividends and Capital Gains converted from
> USD -> AUD using the currency conversion as at the transaction dates?
>
> Thanks,
> Ben Stanley.
>
>
> ___
> 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.


[GNC] Australian Foreign Investments Taxation

2020-04-07 Thread Ben Stanley

Hello Gnucash people,

This question may be more suited to Gnucash developers, but lets try it 
here first.


I need to perform a tax calculation in accordance with instructions from 
the Australian Taxation Office. All foreign income, deductions and 
foreign tax paid must be converted to Australian Dollars for tax purposes.


https://www.ato.gov.au/Business/International-tax-for-business/In-detail/Investing-overseas/Converting-foreign-income-to-Australian-dollars/

The conversion used must correspond to the transaction date.

In Gnucash, it would appear that the price editor could be used to enter 
the necessary conversion data, if it were easy to see all of the dates 
where conversions are required. However, this is tedious.


Far better would be to use Finance::Quote to fetch the necessary 
conversion data for the dates it is required for. However, it seems that 
Finance::Quote is only capable of fetching "recent" data. (The 
documentation that I looked at seemed to be very old.)


http://finance-quote.sourceforge.net/documentation.html

What is needed is the ability to pass a date, or a range of dates, and 
request Finance::Quote to fetch prices for that date or date interval. 
This would make Finance::Quote far more useful than just fetching the 
most recent price data.


Is there some feature in Gnucash that I have missed that would allow me 
to generate a report, with dividends and Capital Gains converted from 
USD -> AUD using the currency conversion as at the transaction dates?


Thanks,
Ben Stanley.


___
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.