Created attachment 373103 [details] adding the transaction in Japanese UI When user use gnucash in Japanese, the user can't input zero share or zero price transaction. This transaction is required when user want to input selling stock. share price buy Assets:Brokerage Account:Stock:AMZN 0 0 1525.00 https://www.gnucash.org/docs/v3/C/gnucash-guide/invest-sell1.html User can input such kind of input in English UI But when user try to input the transaction in Japanese, Number of share automatically is changed to 1525. Price automatically is changed to 1. Assets:Brokerage Account:Stock:AMZN 1525 1 1525.00 I confirmed it works as expected in English UI. The attachment is the file I added a transaction in Japanese UI I made the attachment file base on the file below http://www.gnucash.org/docs/examples/C/GuideInvestExample.gnucash
Created attachment 373105 [details] Stock sale with Japanese UI showing correct capital gains splits. I'm not able to replicate this on Windows 10, see attached screen shot.
How did you set the Japanese UI, with Windows's Language and Region settings or by editing c:\Program Files (x86)\gnucash\etc\gnucash\environment? Are you using a US keyboard? If so, are you using the Japanese IME?
I checked your screenshot. That is what I want to input it. I selected Japanese as the language during the installation process. So I changed the language to troubleshoot this issue with the environment file I add the entry to the file LANG=en_GB Then it work as expected. I suspect the cause of the problem is language selected during instal.
Not likely. The language selected during installation controls what translation the installer uses. It doesn't change the actual installation. I did do it the other way: I set LANG=ja_JP. I'll try setting the Windows language and region instead to see if that makes a difference, but it seems unlikely.
Created attachment 373107 [details] repro steps I double checked the issue happens on LANG=en_US as well. To simpify the issue, I'll use English as the LANG value in this bug id I might identify the exact reproduce steps. steps for expected behavior 1. open GuideInvestExample.gnucash 2. select sell stock for profit 3. add a new transaction account Assets:Investments:Brokerage Account:Stock:AMZN enter value for "Buy" delete or enter 0 for "Price" enter 0 for "share" steps for the issue 1. open GuideInvestExample.gnucash 2. select sell stock for profit 3. make the transaction by modifying the existing transaction i.e. modify imbalanced-USD to Assets:Investments:Brokerage Account:Stock:AMZN So to make the transaction, we should use "adding new transaction" and should not use "modify existing transaction" I captured the steps with GIF animation
I changed the title to clarify the issue
In which way is this realted to translation, if it also happens in english?
Sorry, I misread translation for transaction.So I changed the component to translation. This issue happens on both english and Japanese. So I think this issue is not related to the language settings. I'm not sure which component is the best for this issue.
> modify imbalanced-USD to Assets:Investments:Brokerage Account:Stock:AMZN Which is wrong. You've already got the AMZN cap gain split. Modify that split (the one that used to be imbalance-USD) to Income:Capital Gain and GnuCash will clear the shares and price fields for you.
To get transaction below, modifying the split does not work. Account / Shares / Price / Buy Assets:Investments:Brokerage Account:Stock:AMZN / (blank) / (blank) / (cap gain) i.e I inputed Income:Capital Gain 2000, then, Gnucash automatically input imbalance-USD 2000. then I modify the account to "Assets:Investments:Brokerage Account:Stock:AMZN" then Gnucash do not clear the shares and price but input 2000 as shares and 1 as price. Please see the attachement https://bugs.gnucash.org/attachment.cgi?id=373107. For the workaround, not to use modifying the transaction, but use newly add the transaction
Your video makes my point. You already have the no-price split in AMZN. Adding an out-of-balance split to cap gains doesn't change that. To make it blindingly clear, a sell with cap gains needs to look like this: Account | Shares | Price | Buy | Sell ...:Stock:AMZN | -100 | 36.00 | | 3600.00 ...:Bank ABC | | | 3600.00 | ...:Stock:AMZN | | | 1600.00 | Income:CapGain | | | | 1600.00 and nothing more.
Created attachment 373124 [details] Reproduce steps2 Value 1600 is not my point. the value 1600 was newly added line. To show the reproduce step, I made the video. To clarify the issue, I shoot another video.
OK, I can reproduce that. To avoid future confusion I've marked the first video obsolete to hide it. To work around it, if you now delete the shares and price from the $2000 split and <enter> the amount on that split will zero and you'll get a new Imbalance Split. If you delete the Imbalance split, zero the price on the empty AMZN split, enter 3000 in Sell for that split, and <enter> the empty price and shares will "stick" and the transaction will be correct.