codinguser / gnucash-android

Gnucash for Android mobile companion application.
Apache License 2.0
1.23k stars 539 forks source link

Deposit / Withdrawal change existing entry #247

Closed 21nds closed 9 years ago

21nds commented 9 years ago

An existing entry is created as a "Withdrawal". Try to change the existing entry from a "withdrawal" to "Deposit" button next to the amount, it does change the color of the amount to green and changes the button to say Deposit, but when you click the checkmark to save the entry it does not save the entry as a deposit. (also vice versa deposit ->Withdrawal) Also when entering it will auto-fill the amount from a previous transaction, and automatically mark it as withdrawal or deposit but will not save if you change it to the other.

codinguser commented 9 years ago

Thanks for the feedback. Could you please provide some more information? What version of the app are you using? What Android version? Are you using double-entry accounting? How many splits were in the transaction? Or was it a simple transfer from one account to another.

fefe982 commented 9 years ago

I can reproduce.

For multi-splits transactions, edits in splits view cannot be saved.

fefe982 commented 9 years ago

On 1.5.1 , when split's type is inverted, it will not be reflected on the transaction view. However, the transaction list view is correct.

On develop branch, all edits on splits view are lost.

BTW, @codinguser , I think a bug fix branch from master is need for bug fixes. The develop branch and master are very different now, cherry-picks from develop to master may not work properly. Bug fixes pull requests now can only be made directly on master.

codinguser commented 9 years ago

@fefe982 The develop branch is ahead of master as some bug fixes have been committed to it. But all that is in master is also in develop. I made 1.5.1 out of a hotfix branch to fix the upgrade issue and then cross-merged into develop and master. So for the next few patches, we can just continue working on develop. I still prefer to not merge patches into master directly during ongoing development.

I usually create feature branches for bigger stuff I'm working on and only merge it later when it's ready. Small fixes and improvements can continue to go directly into the develop branch, and patch releases will be made from there.

codinguser commented 9 years ago

I cannot reproduce this. @fefe982 is the bug only on develop or on 1.5.1/master as well?

21nds commented 9 years ago

I have done a little more investigation. I have Deleted ALL accounts and created one account "Checking". I was using it for a simple checkbook register, so single accounting. It was working good about 2 releases ago in this fashion, but one of the updates in the last couple updates made it stop working for this. Thank You!

21nds commented 9 years ago

Even more investigation... I guess I was using the software incorrectly... if I disable the "Activate Double Entry" option in the settings, it works fine with a single account.

fefe982 commented 9 years ago

@codinguser The bug exists on 1.5.1.

With 1.5.1 / master (using double entry):

  1. Touch and edit a transaction with multiple splits
  2. (The Withdrawal/Deposit button should be invisible) Click the Edit Split button
  3. Toggle the TransactionType of all splits
  4. Save and go back to transaction edit
  5. ERROR here, the amount shown on transactions edit is not changed Expected, it should be inverted.
  6. Save and go back to transaction list 7.CORRECT here, amount shown in transaction list is inverted from waht is shown in Step 1
  7. Touch and edit the transaction
  8. CORRECT here, the amount shown is inverted from what is shown in Step 2

This is a UI update problem in 1.5.1/master, the edit in the transaction should be correctly saved if save is clicked on transaction edit view, but the UI is not correctly updated. The UI is correct when you edit the transaction again, as this time the UI is initialized with the modified transaction. #249 is meant to correct this.

If Cancel instead of Save is clicked in Step6, edit will not be saved. All edits are lost.

@21nds , is this the same bug you are reporting?

21nds commented 9 years ago

That is not exactly the same bug I was experiencing, but likely related... It seems that when someone deletes ALL accounts and has only ONE account (for example "Checking"). I left the "Activate Double Entry" setting on because I had no clue that setting even existed. I was using the single account as a checkbook register to simply keep track of money in the one account. The last couple of updates has changed the way the save works. Below is my "best guess" at the bug. Fresh download

  1. Delete All Accounts
  2. Create 1 new account
  3. "Activate Double Entry" setting should be on from a default download. <<-- this is my error
  4. Create transaction in your single account.
  5. Everything seems to work as expected.
  6. Try to change the entry from deposit to withdrawal or vice versa.
  7. No change is recorded It appears like when it tries to add from the one account you did create and looks for a second account to deduct from in a Double Entry style setup, there is not a second account to deduct from and it just errors out without alerting the user. I think it is a simple error message that should pop up saying "You have enabled "Double Entry Accounting" but it appears like you are trying to work as "Single Entry Accounting". Do you want to disable "Double Entry Accounting?" And then it can disable the "Enable Double Entry" setting for you automatically. I have seen on numerous blog posts that GNUCash for Android can be used as a simple checkbook register to keep track of one checkbook, and it may make people stop using the software if it can't be used this way from a fresh download. I would say this is not necessarily a bug, because when I disable "Double Entry" from the settings it does work as expected.
fefe982 commented 9 years ago

Bug is confirmed.