webERP Forum

Full Version: Recreate ChartDetails Data
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was experimenting with Z_RePostGLFromPeriod.php and Z_UpdateChartDetailsBFwd.php on test data because I noticed two incorrect entries:

[attachment=760]

I also noticed running Z_RePostGLFromPeriod.php tidied up some of the small fractional amount entries in the ChartDetails table:

[attachment=758]

[attachment=759]

I also noticed the same when running Z_RePostGLFromPeriod.php.

So my questions are:

1> Is this normal and as expected?
2> If running both scrips which should be run first?
3> Should one or both scrips be run at certain intervals?
4> Should I just leave it all alone and not mess with either script?

Just curious...
From the WIKI:

Z_RePostGLFromPeriod.php - Utility to repost all general ledger transaction commencing from a specified period. This can take some time in busy environments. Normally GL transactions are posted automatically each time a trial balance or profit and loss account is run

Z_UpdateChartDetailsBFwd.php - Utility to recalculate the ChartDetails table B/Fwd balances - extreme care!!

Why the "extreme care" on Z_UpdateChartDetailsBFwd.php script?
Okay... I think I just found the answer to one of my questions...

While looking at Z_RePostGLFromPeriod.php I just now noticed "include('includes/GLPostingsZero.inc');" at the bottom. I see this is where the entire chart is rebuilt from data in the GLTrans table so that makes sense.

So now the only question I have is what is the purpose of Z_UpdateChartDetailsBFwd.php? It calculates and updates bfwgd and bfwdbudget values only. Is this just a faster script to repair the error I first saw above?

Seems to me Z_RePostGLFromPeriod.php is the best course of action to be sure ChartDetails is 100% correct...
Yes correct - I can't recall the origins of UpdateChartDetailsDFwd.php I think this was trying not to go back to gltrans ... but not looking at the script and am old :-( Probably should be removed now as the same function is covered in RePostGLFromPeriod.php
I wish we didn't have to use either - but although we thought the GL bug was nailed I fear not :-(
I rewrote GLPostings a few years ago and have had no trouble with any of my installations since. I know several of the long term webERP users switched to my version of GLPostings and I haven't heard of any problems with it so it seems to work as a drop in replacement.

Tim
Thank you for clarifying.

Since I have so many DB snapshots I will try to determine when and where that GL error came into play...
The error shown above came in after two new Supplier Invoices (second and third) were entered.

[attachment=764]
Actually... The error goes back further so i will keep looking...
From what I can see this error came into play after the very first invoice was entered.
Reference URL's