TheAxelander / OpenBudgeteer

OpenBudgeteer is a budgeting app based on the Bucket Budgeting Principle
https://theaxelander.github.io
MIT License
736 stars 41 forks source link

V1.8.3: Creating a new transaction using the "Add Recurring Transaction" button creates a transaction with wrong Account ID #255

Open Bucket1616 opened 2 weeks ago

Bucket1616 commented 2 weeks ago

I created a recurring transaction and then tried to "add" it. It created the transaction however, the Account that was saved as part of the "Recurring Transaction" was not how the data was saved. It shows up as an "(Inactive)" account.

Using phpMyAdmin, I was able to find the newly created transaction, and it appears that when the new entry is made in the "Bank Transaction" table, the Value for AccountID is not being set correctly. Here is what the entry looks like when first created:

image

After correcting the Account field using the regular interface to point to the correct account, here is what the entry looks like in phpMyAdmin.

image

If I look at my Accounts Table, I see this: image

So it appears that when I try to Add Recurring Transaction, it is using the "IsActive=0" account that is directly before the intended account.

I then tried to change the Account used for the Recurring Transaction, to see what that would cause in the Database.

It was then that I found out that every time an "Add Recurring Transaction" is used, a new Account is created in the Accounts Database.

Here is what the Accounts Database looks look after adding two new Recurring Transactions (notice the increase in Accounts):

image

TheAxelander commented 2 weeks ago

Can confirm this. I will check if I will fix it in a separate update

Bucket1616 commented 2 weeks ago

I used to work in HW/SW development. The downside is I'm good at finding bugs. The upside is that I can usually provide some good starting points on where to look to find them. :-D Sorry!!

TheAxelander commented 2 weeks ago

All good, you should not feel bad in reporting bugs. Over the time I'm feeling getting blind on certain spots for testing, plus I still have some housekeeping things to do with my unit tests...