Re: [GNC] Finance::Quote and TMX.pm

2022-11-12 Thread Ken Farley
If I remember correctly, when I made my own module to grab US EE Bond 
prices, in order for GnuCash to allow my module to be used, I had to add 
it to the MODULES list in Quote.pm. I'm working on a Mac, so your path 
might differ, but for me it's in /Library/Perl/5.30/Finance. I added a 
line between two of the entries in Quote.pm. For example, here's the 
chunk of that file for me, where I've added "USBonds" to reference my 
Perl module "USBonds.pm".


@MODULES = qw/
    AEX
    ... (many many modules)
    Troweprice
    USBonds
    USFedBonds
    Union
    YahooJSON
    ZA
/;

If that's not helpful, and something more has to be done, I don't know 
what it might be. I don't recall having to do anything else except 
restarting GnuCash.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote and TMX.pm

2022-11-12 Thread gnu Gord
Thanks for the suggestion but the TMX module is already listed in Quote.pm.
It existed before I started so there must be some other way GnuCash decides
whether a module is available for use or not... I just don't know how.

Thanks again,
Gord


On Sat, Nov 12, 2022 at 7:20 AM Ken Farley  wrote:

> If I remember correctly, when I made my own module to grab US EE Bond
> prices, in order for GnuCash to allow my module to be used, I had to add
> it to the MODULES list in Quote.pm. I'm working on a Mac, so your path
> might differ, but for me it's in /Library/Perl/5.30/Finance. I added a
> line between two of the entries in Quote.pm. For example, here's the
> chunk of that file for me, where I've added "USBonds" to reference my
> Perl module "USBonds.pm".
>
> @MODULES = qw/
>  AEX
>  ... (many many modules)
>  Troweprice
>  USBonds
>  USFedBonds
>  Union
>  YahooJSON
>  ZA
> /;
>
> If that's not helpful, and something more has to be done, I don't know
> what it might be. I don't recall having to do anything else except
> restarting GnuCash.
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> 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
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote and TMX.pm

2022-11-12 Thread john
There's a pair of hard-coded structures at 
https://github.com/Gnucash/gnucash/blob/e30c1fce70c04fab4507ac869351165b0d70ae48/libgnucash/engine/gnc-commodity.c#L177
 that lists the sources that GnuCash knows about; anything not in one of those 
two shows up in the third "unknown" list. The lists were last updated 5 years 
ago and are in need of another.

When GnuCash starts up it queries F::Q for the available sources using 
gnc-fq-check and bounces the two lists, enabling in the entries in the 
hard-coded structs for the matching sources from gnc-fq-check; after the bounce 
any remaining F::Q sources populate the Unknown list at the bottom of the 
dialog. Yes, it's obviously brittle, but that's necessary because there's at 
present no way to retrieve the exchange names for the sources nor to 
distinguish between single and multiple source names so the combos in the 
security editor can't be populated dynamically.

You'll notice that the Toronto Stock Exchange module is entered as tsx (line 
227), so it doesn't match the current name of the module, tmx, and it doesn't 
get enabled but tmx appears in the unknown list. If you add your modified TSX 
module to @MODULES in Quotes.pm and you've changed every instance of tmx to tsx 
as part of your modifications it should get added to the sources list from 
gnc-fq-check and enable the tsx item in GnuCash's security editor.

Regards,
John Ralls


> On Nov 12, 2022, at 9:07 AM, gnu Gord  wrote:
> 
> Thanks for the suggestion but the TMX module is already listed in Quote.pm.
> It existed before I started so there must be some other way GnuCash decides
> whether a module is available for use or not... I just don't know how.
> 
> Thanks again,
> Gord
> 
> 
> On Sat, Nov 12, 2022 at 7:20 AM Ken Farley  wrote:
> 
>> If I remember correctly, when I made my own module to grab US EE Bond
>> prices, in order for GnuCash to allow my module to be used, I had to add
>> it to the MODULES list in Quote.pm. I'm working on a Mac, so your path
>> might differ, but for me it's in /Library/Perl/5.30/Finance. I added a
>> line between two of the entries in Quote.pm. For example, here's the
>> chunk of that file for me, where I've added "USBonds" to reference my
>> Perl module "USBonds.pm".
>> 
>> @MODULES = qw/
>> AEX
>> ... (many many modules)
>> Troweprice
>> USBonds
>> USFedBonds
>> Union
>> YahooJSON
>> ZA
>> /;
>> 
>> If that's not helpful, and something more has to be done, I don't know
>> what it might be. I don't recall having to do anything else except
>> restarting GnuCash.
>> ___
>> gnucash-user mailing list
>> gnucash-user@gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> -
>> 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
> -
> 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
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote and TMX.pm

2022-11-12 Thread Ken Farley
Yeah I just messed about a bit with my install of GnuCash (v4.12) and 
Toronto Stock Exchange is grayed out.


I looked at the module and the only thing I changed was that there was a 
reference to TSX.pm in the header. I changed it to TMX.pm, then ran the 
quoting update script provided with GnuCash (gnc-fq-update), and now 
"tmx" shows up in the "Unknown" listing.


No matter what I do, the Toronto Exchange entry in the "normal" quote 
source list stays greyed out. I don't know what quote source (i.e. what 
is its name) that one is looking for.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Split Credit card transaction w/ two currencies

2022-11-12 Thread Fred Tydeman
I am running Linux Fedora 36.
I am running GnuCash 4.12 (2022-09-24)
My main currency is USD (US dollars).
I am using Trading Accounts.

I had a meal in Colombia with a friend.
I paid for everything with a credit card,
and the friend gave me pesos for their part.

If I enter the two parts as two separate transactions,
all is OK.  That is, when I enter the USD of the COP part,
I get a popup asking for the exchange rate, which I enter
and the correct amount is transferred to the COP account.

In a credit card account, when I enter a split transaction
that has part of the charge be in USD and the other part
in COP (Colombia Pesos), I am getting bad results in the
COP account.  While I get a popup asking about the
exchange rate, the results are wrong in the COP account.

The parts are:
26.63 Liabilities:Credit Cards:visa   == total charge
14.78 Expenses:meals == mine
11.85 Assets:Investments:$colombia => 50,000 COP  == theirs

There are 4219.41 COP per 1 USD on that date.

Assets:Investments:$colombia is a Cash account with
COP currency.

My guess about the problem is: GnuCash in adding the
splits for Trading:CURRENCY:USD and Trading:CURRENCY:COP
has problems with a credit card transaction that has
splits.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote and TMX.pm

2022-11-12 Thread gnu Gord
Thank you very much, that worked!!
I'm not sure how this is going to be dealt with if/when the repaired
version of the TMX module is approved.

Gord


On Sat, Nov 12, 2022 at 11:07 AM john  wrote:

> There's a pair of hard-coded structures at
> https://github.com/Gnucash/gnucash/blob/e30c1fce70c04fab4507ac869351165b0d70ae48/libgnucash/engine/gnc-commodity.c#L177
>  that
> lists the sources that GnuCash knows about; anything not in one of those
> two shows up in the third "unknown" list. The lists were last updated 5
> years ago and are in need of another.
>
> When GnuCash starts up it queries F::Q for the available sources using
> gnc-fq-check and bounces the two lists, enabling in the entries in the
> hard-coded structs for the matching sources from gnc-fq-check; after the
> bounce any remaining F::Q sources populate the Unknown list at the bottom
> of the dialog. Yes, it's obviously brittle, but that's necessary because
> there's at present no way to retrieve the exchange names for the sources
> nor to distinguish between single and multiple source names so the combos
> in the security editor can't be populated dynamically.
>
> You'll notice that the Toronto Stock Exchange module is entered as tsx
> (line 227), so it doesn't match the current name of the module, tmx, and it
> doesn't get enabled but tmx appears in the unknown list. If you add your
> modified TSX module to @MODULES in Quotes.pm and you've changed every
> instance of tmx to tsx as part of your modifications it should get added to
> the sources list from gnc-fq-check and enable the tsx item in GnuCash's
> security editor.
>
> Regards,
> John Ralls
>
>
> On Nov 12, 2022, at 9:07 AM, gnu Gord  wrote:
>
> Thanks for the suggestion but the TMX module is already listed in Quote.pm.
> It existed before I started so there must be some other way GnuCash decides
> whether a module is available for use or not... I just don't know how.
>
> Thanks again,
> Gord
>
>
> On Sat, Nov 12, 2022 at 7:20 AM Ken Farley  wrote:
>
> If I remember correctly, when I made my own module to grab US EE Bond
> prices, in order for GnuCash to allow my module to be used, I had to add
> it to the MODULES list in Quote.pm. I'm working on a Mac, so your path
> might differ, but for me it's in /Library/Perl/5.30/Finance. I added a
> line between two of the entries in Quote.pm. For example, here's the
> chunk of that file for me, where I've added "USBonds" to reference my
> Perl module "USBonds.pm".
>
> @MODULES = qw/
> AEX
> ... (many many modules)
> Troweprice
> USBonds
> USFedBonds
> Union
> YahooJSON
> ZA
> /;
>
> If that's not helpful, and something more has to be done, I don't know
> what it might be. I don't recall having to do anything else except
> restarting GnuCash.
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> 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
> -
> 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
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote and TMX.pm

2022-11-12 Thread john
Only if you fix it in your PR. Otherwise GnuCash needs to be updated to look 
for tmx instead of tsx.

Regards,
John Ralls


> On Nov 12, 2022, at 2:23 PM, gnu Gord  wrote:
> 
> Thank you very much, that worked!!
> I'm not sure how this is going to be dealt with if/when the repaired version 
> of the TMX module is approved. 
> 
> Gord
> 
> 
> On Sat, Nov 12, 2022 at 11:07 AM john  > wrote:
>> There's a pair of hard-coded structures at 
>> https://github.com/Gnucash/gnucash/blob/e30c1fce70c04fab4507ac869351165b0d70ae48/libgnucash/engine/gnc-commodity.c#L177
>>  that lists the sources that GnuCash knows about; anything not in one of 
>> those two shows up in the third "unknown" list. The lists were last updated 
>> 5 years ago and are in need of another.
>> 
>> When GnuCash starts up it queries F::Q for the available sources using 
>> gnc-fq-check and bounces the two lists, enabling in the entries in the 
>> hard-coded structs for the matching sources from gnc-fq-check; after the 
>> bounce any remaining F::Q sources populate the Unknown list at the bottom of 
>> the dialog. Yes, it's obviously brittle, but that's necessary because 
>> there's at present no way to retrieve the exchange names for the sources nor 
>> to distinguish between single and multiple source names so the combos in the 
>> security editor can't be populated dynamically.
>> 
>> You'll notice that the Toronto Stock Exchange module is entered as tsx (line 
>> 227), so it doesn't match the current name of the module, tmx, and it 
>> doesn't get enabled but tmx appears in the unknown list. If you add your 
>> modified TSX module to @MODULES in Quotes.pm and you've changed every 
>> instance of tmx to tsx as part of your modifications it should get added to 
>> the sources list from gnc-fq-check and enable the tsx item in GnuCash's 
>> security editor.
>> 
>> Regards,
>> John Ralls
>> 
>> 
>>> On Nov 12, 2022, at 9:07 AM, gnu Gord >> > wrote:
>>> 
>>> Thanks for the suggestion but the TMX module is already listed in Quote.pm.
>>> It existed before I started so there must be some other way GnuCash decides
>>> whether a module is available for use or not... I just don't know how.
>>> 
>>> Thanks again,
>>> Gord
>>> 
>>> 
>>> On Sat, Nov 12, 2022 at 7:20 AM Ken Farley >> > wrote:
>>> 
 If I remember correctly, when I made my own module to grab US EE Bond
 prices, in order for GnuCash to allow my module to be used, I had to add
 it to the MODULES list in Quote.pm. I'm working on a Mac, so your path
 might differ, but for me it's in /Library/Perl/5.30/Finance. I added a
 line between two of the entries in Quote.pm. For example, here's the
 chunk of that file for me, where I've added "USBonds" to reference my
 Perl module "USBonds.pm".
 
 @MODULES = qw/
 AEX
 ... (many many modules)
 Troweprice
 USBonds
 USFedBonds
 Union
 YahooJSON
 ZA
 /;
 
 If that's not helpful, and something more has to be done, I don't know
 what it might be. I don't recall having to do anything else except
 restarting GnuCash.
 ___
 gnucash-user mailing list
 gnucash-user@gnucash.org 
 To update your subscription preferences or to unsubscribe:
 https://lists.gnucash.org/mailman/listinfo/gnucash-user
 -
 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
>>> -
>>> 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
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.