After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 125711 - mutual fund purchase doesn't reduce cash balance
mutual fund purchase doesn't reduce cash balance
Status: VERIFIED DUPLICATE of bug 116353
Product: GnuCash
Classification: Other
Component: General
1.8.x
Other Mac OS
: Normal normal
: ---
Assigned To: Chris Lyttle
Chris Lyttle
Depends on:
Blocks:
 
 
Reported: 2003-10-28 18:27 UTC by gnucash
Modified: 2018-06-29 20:38 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description gnucash 2003-10-28 18:27:14 UTC
[I posted about this bug to the gnucash-user mailing list on 2003-Oct-25
with subject "mutual fund purchase doesn't reduce cash balance".  This bug
report is a summary of the relevant details from the thread.]

I record a mutual fund purchase by transfering money from a bank account
(currency=CAD) to a mutual fund account (currency=FOO).  If I enter the
transaction in the bank account ledger, the Transfer Funds dialog appears,
letting me set the currency exchange rate, and afterwards the bank balance
is reduced appropriately (and the mutual fund balance is increased).  But
if I instead enter the transaction in the mutual fund account ledger, the
Transfer Funds dialog does not appear, and the bank balance is not reduced
(although the mutual fund balance is increased).

Here's an example of how it looks when the transaction doesn't complete
successfully.

Suppose I have C$10 in the Cash account, and 10 shares in the FOO965
account. Then I buy C$10 worth of shares (at C$2 each) of FOO965, and
represent this in gnucash by transferring C$10 from Cash to FOO965.
Here's how the two split-mode ledger entries look:

Mutual Fund Account:

Description Transfer                Shares Price Buy Sell Balance
Buy         <blank>                 5            5        15
Buy         Assets:Broker:FOO965    5      2     10
<blank>     Assets:Broker:Cash                       10
<blank>     <blank>                        1

Bank Account:

Description Transfer                Deposit Withdrawal Balance
Buy         <blank>                                    10
Buy         Assets:Broker:FOO965
<blank>     Assets:Broker:Cash
<blank>     <blank>
Comment 1 hychan 2003-11-22 08:41:15 UTC
Stock account transactions also show the same problem, and it only
affects new transactions that are not copied from an old transaction
entered prior to upgrading to 1.8.x release.

My case is that when entering a new transaction from the Stock account
register:

<main line>
11/23/03   Sell 30 SUNW at 5.00
<splits>
Account                   shares      price      buy     sell
Stock accounts:SUNW       -30         5                  150
Bank account: Broker cash                        150
Stock accounts:SUNW                                      200
Income account: Stock gain                       200

/* The last two lines are used to track stock gains */

After entering, the registry of SUNW seems normal:
Desc          Transfer          Shares    Price     Buy      Sell
Sell 30 SUNW  -- split transac  -30       5                  150
Sell 30 SUNW  -- split transac                               200

However, the register of broker cash account and income are all blank:

Bank account:
Desc          Transfer          Deposit      Withdraw     Balance
Sell 30 SUNW  -- split transac                            <no change>

Stock income account:
Desc          Transfer          Charge       Income       Balance
Sell 30 SUNW  -- split transac                            <no change>

When show split on both accounts, it shows:
Account                          Charge/Deposit     Income/Withdraw
Stock accounts:SUNW       
Bank account: Broker cash 
Stock accounts:SUNW                              
Income account: Stock gain      

When enter anything into the charge/deposit or income/withdraw area
the system will say the transaction is not balanced but nothing will
be shown

However, if there's an existing entry that I entered before upgrading
to 1.8.x (eg when using 1.6 or 1.4 release) and I edit it everything
will be OK.

The bug also does not show up if the registry copied an old entry when
I entered a partial description.

Finally, I can work around the bug by doing the following:

1. Enter the transaction from the bank account side
2. After entering the transaction, the amounts will show up in all
releated accounts
3. Go to the stock account registry and edit the number of shares.

I encountered the problem in gnucash 1.8.7 and 1.8.8 on Linux
Comment 2 hychan 2003-11-22 17:23:25 UTC
Again more information:

Here is the XML of the transaction in question:

<gnc:transaction version="2.0.0">
  <trn:id type="guid">9f6ffa4350709714d6689593a581fe48</trn:id>
  <trn:currency>
    <cmdty:space>ISO4217</cmdty:space>
    <cmdty:id>HKD</cmdty:id>
  </trn:currency>
  <trn:date-posted>
    <ts:date>2003-11-22 00:00:00 +0800</ts:date>
  </trn:date-posted>
  <trn:date-entered>
    <ts:date>2003-11-22 17:16:05 +0800</ts:date>
  </trn:date-entered>
  <trn:description>Sell 30 GE</trn:description>
  <trn:splits>
    <trn:split>
      <split:id type="guid">36da128b092910ea30182372b4a5671a</split:id>
      <split:reconciled-state>n</split:reconciled-state>
      <split:value>87000/100</split:value>
      <split:quantity>0/100</split:quantity>
      <split:account
type="guid">03ed25121a4b90e8e69598f44325ce55</split:account>
    </trn:split>
    <trn:split>
      <split:id type="guid">558026736655eb3ccc1b6a75c8d16883</split:id>
      <split:action>Sell</split:action>
      <split:reconciled-state>n</split:reconciled-state>
      <split:value>-87000/100</split:value>
      <split:quantity>-30/1</split:quantity>
      <split:account
type="guid">c549b216bfa7ed0d869ab0b9b67225bc</split:account>
    </trn:split>
  </trn:splits>
</gnc:transaction>

Here is an XML of the transaction that works (it is created in the
funding account and then change the share and price in the stock account):

<gnc:transaction version="2.0.0">
  <trn:id type="guid">64cf9ab74358866f7af35fa88c82b564</trn:id>
  <trn:currency>
    <cmdty:space>ISO4217</cmdty:space>
    <cmdty:id>USD</cmdty:id>
  </trn:currency>
  <trn:date-posted>
    <ts:date>2003-11-21 00:00:00 +0800</ts:date>
  </trn:date-posted>
  <trn:date-entered>
    <ts:date>2003-11-22 15:15:55 +0800</ts:date>
  </trn:date-entered>
  <trn:description>Sell 18 EVG @ 27.70</trn:description>
  <trn:splits>
    <trn:split>
      <split:id type="guid">b52cee3faf14721189cba99a346355b0</split:id>
      <split:reconciled-state>n</split:reconciled-state>
      <split:value>48759/100</split:value>
      <split:quantity>48759/100</split:quantity>
      <split:account
type="guid">03ed25121a4b90e8e69598f44325ce55</split:account>
    </trn:split>
    <trn:split>
      <split:id type="guid">d04c4607cedd492db20cb176c2e79a85</split:id>
      <split:reconciled-state>n</split:reconciled-state>
      <split:value>11218/100</split:value>
      <split:quantity>0/1</split:quantity>
      <split:account
type="guid">17f9d85acc80abc37533faacf9faca22</split:account>
    </trn:split>
    <trn:split>
      <split:id type="guid">75739d7ad6c2bd9af05ff1b78cb6e1f8</split:id>
      <split:reconciled-state>n</split:reconciled-state>
      <split:value>-11218/100</split:value>
      <split:quantity>-11218/100</split:quantity>
      <split:account
type="guid">481c7142bd61dab687c1d7bc2811e870</split:account>
    </trn:split>
    <trn:split>
      <split:id type="guid">94270b2d6103b64f2566b68bc50dbc00</split:id>
      <split:action>Sell</split:action>
      <split:reconciled-state>n</split:reconciled-state>
      <split:value>-48759/100</split:value>
      <split:quantity>-18/1</split:quantity>
      <split:account
type="guid">17f9d85acc80abc37533faacf9faca22</split:account>
    </trn:split>
  </trn:splits>
</gnc:transaction>

I have HKD as my default currency for account creation.

The transactions should be done in USD. Both the funding account and
the stock trading are in USD. However, I notice that the transaction
with problem has the currency marked in "HKD", which is not correct.

I further tried the following scenarios:

Case 1:
Default Currency: USD
Funding account currency: USD
Stock: USD

Everything works correctly

Case 2:
Default Currency: HKD
Funding account currency: USD
Stock: USD (trading at NYSE)

bug hit

When purchase 200 shares at price 10, the register in the stock
account shows that 200 shares is bought and 2000 dollars are
transfered in. However, the register in the funding account shows the
transaction with all the accounts, but no amount and the balance for
the account is unchanged.

Case 3:
Default Currency: HKD
Funding account currency: USD
Mutal Fund: suppose to be HKD (trading at HK stock exchange)

When purchase 200 shares at 10 each, the funding account is deducted
by USD 2000, not HKD 2000 (which should be 2000/7.8 ~ 256.41). It does
not ask me for any exchange rate.

Here's my guess:

Since stock/mutual fund accounts in 1.8.x does not have a currency
setting, it seems that whenever there's a transaction the default
currency is assumed. But in the above example, the assumption is false
 and problem arise.



Comment 3 Derek Atkins 2004-01-03 04:51:03 UTC

*** This bug has been marked as a duplicate of 116353 ***
Comment 4 John Ralls 2018-06-29 20:38:24 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=125711. Please update any external references or bookmarks.