1 (edited by tom 08/21/2024 11:16:01 am)

Topic: Change of Ownership - Delete past years

I have been using FA for a business since 2010 and the ownership has changed from a single owner to LLC

I want to delete the past years and reset the GL accounts to 0

I assume the first step is to delete all previous years

Wow that was easier than I thought...
I do see some some balances that are wrong, but just deleting the years did most of what I wanted

Maybe not so much wrong... but I did find I could not delete long gone bank accounts.
It seems what FA 2.4.6 I was able to create more than one 1060 bank account...

I may need advice on how to remove the extra ones

Tom

Re: Change of Ownership - Delete past years

I am having problems deleting old bank accounts, even some I have not used for many years.

I have deleted all but the current Fiscal Year.

In bank inquiry I found opening balances for this year in gl_trans and bank_trans and even with those removed I can't delete the bank account

This account uses GL 1063 (and it's the only bank account using that one)

I have 4 that all use 1060 which may need more care

Suggestions?

3 (edited by tom 08/23/2024 11:11:51 am)

Re: Change of Ownership - Delete past years

I found the problem

elseif( $Mode == 'Delete')
{
        //the link to delete a selected record was clicked instead of the submit button

        $cancel_delete = 0;
        // PREVENT DELETES IF DEPENDENT RECORDS IN 'bank_trans'

        if (key_in_foreign_table($bank_id, 'bank_trans', 'bank_act') || key_in_foreign_table(get_post('account_code'), 'gl_trans', 'account'))
        {
                $cancel_delete = 1;
                display_error(_("Cannot delete this bank account because transactions have been created using this account."));
        }
 

get_post('account_code') returns 1060 and the bank_id I am trying to delete has account 1063

Maybe it should get t he account from the bank account info...

What's the best way to fix this?

This worked:

        $myrow = get_bank_account($bank_id);

        if (key_in_foreign_table($bank_id, 'bank_trans', 'bank_act') || key_in_foreign_table($myrow['account_code'], 'gl_trans', 'account'))
 

Tom

Re: Change of Ownership - Delete past years

@joe: is this okay?

Re: Change of Ownership - Delete past years

Is there a repo I can access / clone / help again?

Re: Change of Ownership - Delete past years

You can fork the project on GitHub and make changes as needed.

Re: Change of Ownership - Delete past years

I would have but all the webpages point to CVS and sf and the labels are not current

Re: Change of Ownership - Delete past years

The README.md file has a GitHub Mirror Link:
https://github.com/FrontAccountingERP/FA

Re: Change of Ownership - Delete past years

I feel I am being dense, but I will ask anyway.

So if I want to submit updates or bug fixes I should github or git.code.sf.net?

Tom

Re: Change of Ownership - Delete past years

sf.net is the primary repo.
github is only a mirror.
@joe and @itronics are the main code repo integrators.

Re: Change of Ownership - Delete past years

apmuthu wrote:

The README.md file has a GitHub Mirror Link:
https://github.com/FrontAccountingERP/FA

Both the github mirror and sf.net git do not have release tags for 2.4.18 so is master the latest release?

I am building a docker image and it's usually best to refer to the version tag so a rebuild doesn't get an unexpected update.
(Yes I know it is really mature... just good practice...)

Maybe a 2.4.18 tag could be added? (github or sf, either is fine)

Tom

Re: Change of Ownership - Delete past years

apmuthu wrote:

The README.md file has a GitHub Mirror Link:
https://github.com/FrontAccountingERP/FA

Both the github mirror and sf.net git do not have release tags for 2.4.18 so is master the latest release?

I am building a docker image and it's usually best to refer to the version tag so a rebuild doesn't get an unexpected update.
(Yes I know it is really mature... just good practice...)

Maybe a 2.4.18 tag could be added? (github or sf, either is fine)

Tom

Re: Change of Ownership - Delete past years

The release tags if any are outdated as several updates in the 2 months since it's release will be available from the bleeding edge download at:
https://github.com/FrontAccountingERP/FA/archive/refs/heads/master.zip

Re: Change of Ownership - Delete past years

Is the zip file better than git master branch?

Re: Change of Ownership - Delete past years

The zip file is the way the master branch is distributed for cutting edge code.