Topic: FA won't close fiscal year

Hi!

I've been using FA for the last 6 months. The features are well thought and it fulfills my needs perfectly.

I try to close my fiscal year but FA just don't want to do it and it won't tell me why.

I created a new fiscal year (2016-01-01 to 2016-12-31). My previous year was 2015-01-01-2015-12-31. I started using the new fiscal year by selecting it in the "Setup/Company Setup" screen. All is fine. When I want to enter a transaction for last year (depreciation, etc) I switch back to the previous year and add my journal entries.

After doing that, I think I'm ready to close the fiscal year. I go to the "Setup/Fiscal Years" screen, I get two warnings:

"Warning: Deleting a fiscal year all transactions are removed and converted into relevant balances. This process is irreversible!"
AIlright, I don't want to delete the fiscal year, only close it.

and

"The marked fiscal year is the current fiscal year which cannot be deleted."
Again, I don't want to delete a year, so all should be good.

Then, I press the "pencil button" near the past year (2015-01-01 to 2015-12-31). This one has both a pencil and a X button (so I understand it is not the current fiscal year). 2016 only has a "pencil button".

I get a "refresh icon" on the middle top of the page, it disappears and nothing else. The year is still open, entries are not done in the GL, and I get no error message.

How can I know what is going on? And debug or log I could take a look at?


Thanks


Patrick

Re: FA won't close fiscal year

Please, set the variable, $go_debug, in config.php to either 1 or 2 to trap any errors.
I suspect a missing default account for profit and loss current year.it might also be another error.

Also pleaße tell us the release number of FrontAccounting and other os

Joe

3 (edited by elperepat 01/07/2016 09:35:19 pm)

Re: FA won't close fiscal year

I'm using Version 2.4 beta Build 14.05.2015 on Ubuntu 14.04.3


After setting the go_debug to 1, I this error message when I try to close a year:

Class 'items_cart' not found in /mnt/raid/Donnees/donnees/frontaccounting-2.4.0/admin/db/fiscalyears_db.inc on line 162


I was using 2.3.24 and upgraded to 2.4 not so long ago. I sucesfully upgraded the database, but I had to manually copy installed_extension.php in several places to get 2.4 working. Maybe I missed copying something else.

Thanks for your help!

Patrick

Re: FA won't close fiscal year

The problem is due to missing

require_once($path_to_root."/includes/ui/items_cart.inc);

line at the top of /admin/db/fiscalyears_db.inc.

You can insert it yourself and thank you for detecting this bug.

It will be fixed asap in the repository to go to release candidate 1 shortly.

/Joe

Re: FA won't close fiscal year

It stands committed in the FA 2.4 repo now.

6 (edited by kvvaradha 06/01/2016 08:03:25 am)

Re: FA won't close fiscal year

i got this error

filemtime(): stat failed for ../CHANGELOG.txt in file: /home/user/public_html/FA2.3.24/config.php at line 65

can you please help me on it?

I have found the issue and solved it. But still its not deleting the fiscal year.

Subscription service based on FA
HRM CRM POS batch Themes

Re: FA won't close fiscal year

FA 2.4 config.default.php lines 49-50:

    // Build for development purposes
    $build_version     = date("d.m.Y", filemtime("$path_to_root/CHANGELOG.txt"));

Check the value of $path_to_root at that point.

Re: FA won't close fiscal year

Thank you  @apmuthu,

I fixed it.  But the problem is its large data. so its not working when i am deleting all together.

Is there any scheduled delete or something else for it.

Subscription service based on FA
HRM CRM POS batch Themes

Re: FA won't close fiscal year

@kvvaradha: When you say you fixed it, you need to explain what you did so that the forum users can follow it. Was it a permissions issue or was the $path_to_root variable wrong at your end, etc.

Whilst deleting a fiscal year, turn on the sql_debug audit trail in config file and see what all sql statements are used. Then restore back to the pre-delete state and try out the sql statements one by one and see which statement takes a long time and what indexes are associated with the tables concerned that take time to re-index. Then place a pause like sleep(10); in the php code there so that there is sufficient time to complete the deletion/re-index process before carrying on.

Re: FA won't close fiscal year

By Unkowing the `Changes.txt` was deleted. That file is not available to get the file modified time. so it failed to work on.  Soi solved it easily.

Now,the problem is large rows. It has more than 16,32,000 rows in my database.  I have to delete more than 12,00,000 rows now.So when i click the delete button. It first creates backup of the db. While making backup it has reported the error of " MYSQL Server Gone Away" .  So, its not working now.

I want to it to perform like separated files and merge it one after exporting all in different files. And there after i need to schedule the delete operation too. I think we can't delete all the rows in single delete.  for that issue, we have to use limiting for the deleting rows count.  Let me know,whether  am in the current track or not.

Is any other alternative for it. ?

Subscription service based on FA
HRM CRM POS batch Themes

11 (edited by apmuthu 06/03/2016 12:11:44 pm)

Re: FA won't close fiscal year

In FA 2.3 only some tables are InnoDB by default. You can try to first use the option of one-file-per-table so that the tables are moved away from the heap.

What version of MySQL are you using?
It is also possible you may have hit the limit of max_input_vars.

The MySQL will go away only when it does not have sufficient resources to continue to run.

Which tables in FA are you referring to?
What indexes are present for them and whether you have some additional index for optimisation from here.

1. Manually take backup of FA db.
2. Before deleting fiscal year from table, note it's id.
3. Check the entity relationship diagrams for all references to the fiscal year id.
4. The fiscal_year table's id field is related to fiscal_year field in audit_trail table.
5. In all other tables, the date is compared to check whether it is within the fiscal_year's date range.
6. In the sys_prefs table, there is a record for name= 'f_year'.

You might want to copy over the records you want to retain to a new table and delete the current table and then rename the newly created table to the original table's name.

The function delete_this_fiscalyear($selected_id) in admin/db/fiscalyears_db.inc does the fiscal_year deletion.