"I think you have found the bug in the import and export of stocktransactions. I recently exportedsome dummy stock transactions and theinformation in the exported CSV records appears to be correct. I am workingmy way through the CSV import process and documenting it as I go withexamples for the guideand I hadn't made it to doing the stock transactions as yet. I have jumped ahead and reimported stock purchase and stock saletransactions with no errors at all.I created a dummy dividend reinvestmenttransaction for a stock and exported it in the GnuCash Export Format andthen reimported it. On reimporting it created a miscellaneous transaction tothe imbalance account for 3.45. The price on export was 14+17238/34483 butwhen reimported the price is recorded as 13+17238/34483 accounting for thisdifference. This appears to be some problem with importing prices expressedas a whole number + a fractional part.The transaction recorded before export in the stock account register was Shares Price Debit CreditAsset:Investments:Brokerage:Stock:Acme 6.8966 14+17238/34483 100Income:Dividend 100After reimporting after deleting the transaction exported it reappears as Shares Price Debit CreditAsset:Investments:Brokerage:Stock:Acme 6.8966 13+17238/34483 96.55Imbalance 3.45Income:Dividend 100 1and there is a spurious line with a 1 in the price column - no account andno values in the debit and credit columns.If I edit the 96.55 to 100 and then tab to the next line and ask for theprice to be recalculated when the dialogue to rebalance the transactioncomes up then the price is restored to its original value and a secondimbalance line with a credit of 3.45 is created to balance the debit whichstill exists although ithe Imbalance account does not appear in the accountcolumn for that line (it is assigned to the Imbalance account when the editis closed). If I then close the edit on the transaction by clicking onanother transaction or at the bottom of the register it closes and whenreopened the Imbalance entries have disappeared as expected. Deleting the Imbalance entries in the editor can be tricky as you can't select the two matching entries simultaneously and delete them together andthe minute you delete one GnuCash recalulates the other because thetransaction is imbalanced. This is a quirk of the transaction ed it operationas it does not currently check if there is an existing split to an Imbalanceaccount which could be cancelled out (or its balance changed) by the newlycreated balancing split. I didn't have a dummy mutual fund setup in the dummy books I am currentlyusing to develop the documentation but the stock import should be the sameand is likely experiencing the same problem. If you open the CSV file in atext editor and find the line you can check if the price recorded on exportis the same after being reimported to see if the problem is the same. If itis you could report it as a bug at bugs.gnucash .orgDavid Cousens" David, I got a similar spurious entry (your 3.45, above) only if I had not deleted the TransactionID or Price formula, either or both, because I deleted them at the same time. After deleting them I just got the extra line in my original post.
I will write up the bug on Bugzilla as I phrased in in my OP, and I will also mention the spurious amount briefly. Please add anything to it you wish. _______________________________________________ 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.