[GNC] Disabling Lots Manager

john jralls at ceridwen.us
Mon Dec 5 14:42:35 EST 2022


David,

Obviously make a copy of your SQLite file and work with that. I know you know that, but it's always good to remind everyone who might find this thread later.

You also need to remove any entries in the lots-guid field of splits:
  update splits set lot_guid = NULL where lot_guid not NULL;
  
To check that you haven't broken anything run a Trial Balance report before you start and make sure it's clean with no unrealized gains or losses. Fix any that you find and run it again, saving the clean version. Also run a Balance Sheet report using the Average Cost price source and save that. After you've run your delete queries run the TB and Balance Sheet again and compare them with the saved ones. If everything matches your book should be OK. For extra insurance you could run Check & Repair before and after as well.

Regards,
John Ralls




> On Dec 5, 2022, at 2:25 AM, David T. via gnucash-user <gnucash-user at gnucash.org> wrote:
> 
> Hello,
> 
> Having worked my way through approximately 25 investment accounts to clear out Lots manually, I realize that I will never finish this using direct user action. There are just too many accounts to check.
> 
> I am now prepared to use less orthodox methods, but I wanted to see whether anyone could advise me about determining whether my approach has succeeded.
> 
> Basically, I can open the SQLite file in a database manager and clear out the lot-related data there, and then go back to GnuCash and continue without lots. This entails emptying out the lots table and deleting entries in the slots table that begin with "lot-".
> 
> Before we careen into a discussion regarding "OH MY GOD DON'T EDIT YOUR DATA OUTSIDE OF THE GNUCASH API OR YOU WILL MOST CERTAINLY DIE A HORRIBLE DEATH" please be assured that I am aware of the ramifications of backside editing of the GnuCash data. However, desperate situations call for desperate measures, and I'm prepared to take the risk, if it could eliminate months of manual editing and rechecking of every investment transaction for the last fifteen years.
> 
> An initial test on a copy of my file shows that after deletion, the file does open again without throwing any obvious errors.
> 
> My questions to folks who might have insight on the internals of the program (or those with experience modifying GnuCash data outside the API) are:
> 
> 1) Are there hidden aspects to the data and operations that I cannot see, that would cause the file to fail at a later time?
> 
> 2) Is there an effective way to confirm that the files before and after my actions have the same base financial data?
> 
> 3) Are there particular tests I might perform to confirm the structural integrity of the new copy?
> 
> TIA,
> 
> David T.
> 
> On 12/4/2022 10:27 PM, David T. via gnucash-user wrote:
>> Adrien,
>> 
>> I don't know anything about the business features.
>> 
>> My statement regarding lot activation wasn't clear; you must open the Lot Manager *AND* create lots-- either manually, or by using the scrub feature.
>> 
>> ⁣David T. ​
>> 
>> On Dec 4, 2022, 9:22 PM, at 9:22 PM, Adrien Monteleone <adrien.monteleone at lusfiber.net> wrote:
>>> If I understand correctly, the AR & AP accounts use them to track links
>>> 
>>> between payments and bills/invoices. If you don't use the Business
>>> Features, then those two shouldn't be an issue.
>>> 
>>> I'm not so sure simply using View Lots is how they are activated for an
>>> 
>>> account. Some accounts have none anyway. (like a cash account)
>>> 
>>> I would think that some types of accounts use them and others do not.
>>> And I didn't think they were optional or that I had the ability to turn
>>> 
>>> them on or not. But if so, there should certainly be a way to turn them
>>> off.
>>> 
>>> The bugs you mention are pretty bad, especially the one about auto
>>> re-calculating gains just by viewing them. That's a nightmare. I'd call
>>> 
>>> it a 'blocking bug' or at least very high severity. (along with the bug
>>> 
>>> that silently deletes linked sale transactions)
>>> 
>>> Regards,
>>> Adrien
>>> 
>>> On 12/4/22 9:16 AM, David T. via gnucash-user wrote:
>>>> David,
>>>> 
>>>> Lots get activated on an account by account basis; in any given
>>> account,
>>>> you open the View Lots window and either create/assign lots manually
>>> or
>>>> "Scrub" an account to have GnuCash automatically assign your shares
>>> to
>>>> lots. Over the years, I've opted to implement the lots on a
>>> substantial
>>>> number of accounts (but not all of them), and now I'm faced with the
>>>> prospect of manually removing those lots from all the accounts that I
>>>> previously used them on. For the record, when I saved the file in
>>> SQLite
>>>> format, the lots table had 1084 rows in it. That's a lot of editing!
>>>> 
>>>> Complicating this is the fact that every time I open the lots
>>>> viewer-even if just to delete the lots themselves, the program
>>>> recalculates the gains transactions (regardless of the reconcile
>>>> status). This means I am having to reopen all of my (15 years)
>>>> statements and verify that the gains transactions are still accurate.
>>> _______________________________________________
>>> gnucash-user mailing list
>>> gnucash-user at gnucash.org
>>> To update your subscription preferences or to unsubscribe:
>>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>>> -----
>>> Please remember to CC this list on all your replies.
>>> You can do this by using Reply-To-List or Reply-All.
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user at gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.



More information about the gnucash-user mailing list