Hi, Matthew Pounsett <m...@conundrum.com> writes:
> After setting up my tax tables I realized it would be best if I renamed one > of the tables I had already created and used, but there is no rename > function. So, I created a new table using the name I wanted, and went > through each Vendor Bill that used the old table (there are only two) to > unpost, change the table used, and repost. > > Then I went to delete the old (now unused) table, but I'm told by GnuCash > that it can't be deleted because it's in use. > > After re-checking every bill, invoice, and voucher to be absolutely sure > the table is not in use, I decided to go check the data. I see that the > taxtables are self-referential in a way that I didn't expect. The reason this is done is to Freeze the state of the tax table at the time the invoice was posted. For example, let's say that the tax rate changes between 2017 and 2018. Generally you don't create a new tax table, you just modify the existing one. But since invoice values (and tax amounts) are computed on the fly, you need to know what the 2017 tax rate was if you want to go back and view a 2017 invoice in 2018. So to solve this problem we make an invisible backup copy of the tax table when you post the invoice. When you unpost the invoice you have a choice to reset the tax table or not. If you reset it, then it will change from the backup to the current version of the tax table. However, if you do NOT reset it, then it will remain pointing to the backup version. This was done because you may need to make a correction to an older invoice but not want the tax values to change to the current version. Pretty much, once you post an invoice, that tax table can no longer be deleted. Period. There will always be the invisible children in the database. I don't think those children will get purged, even if their refcount goes to 0. [snip] > Any thoughts on how I can fix this up? I don't want to just delete records > from this table as I'm not sure what else might be referencing it (I'm > still working on understanding the relations in the db). > > In googling while troublehsooting I wasn't able to find anyone who had this > exact problem, but I did find some references on renaming tax tables by > going around the UI. Seeing that it's safe to do so I could revert to an > older save file and directly rename the tax table.. but I'd still like to > understand what the problem is here. If it's something I've missed... a > bug.. or what. I thought the name was changeable? I'm not sure why it wouldn't be. > Please remember to CC this list on all your replies. > You can do this by using Reply-To-List or Reply-All. -derek -- Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory Member, MIT Student Information Processing Board (SIPB) URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH warl...@mit.edu PGP key available _______________________________________________ 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.