[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Call for testing experimental patch



On Fri, 2006-09-29 at 13:35 -0700, Chris Travers wrote:
> I like these changes and am going to experiment with hiding them
> behind views.  I am going to add the patch to the tracker so that we
> don't forget about it if it doesn't make the next release.  What will
> be required to make this work will be modifications to the GL.pm but
> this should be fairly painless.

Actually, it will also require changes to AR.pm, AP.pm, IS.pm, IR.pm and
CA.pm and probably others as well as GL.pm.

Basically:

Anywhere there is a "SELECT ... FROM (ar|ap) ..." the select will need
to be changed to "SELECT ... FROM (ar|ap) JOIN gl ...".

Anywhere there is an "INSERT INTO (ar|ap) ..." there will need to be a
matching "INSERT INTO gl ..." added.

Anywhere there is an "UPDATE (ar|ap) ..." the UPDATE will need to to be
split into two one for (ar|ap) and one for gl.

Anywhere there is a "SELECT ... FROM gl ..." a "WHERE ledger = 'gl' will
need to be added unless you want all transactions to be editable as GL
transactions.

Also either my script needs to be altered to have gl.ledger default to
'gl' and gl.module default to 'gl' or you'll have to change all the
INSERT/UPDATE gl statements too.

I suppose you could hide these behind views with triggers/views but that
seems kind of hackish... Wouldn't it be better to fix the PERL code?

-- 
Tony Fraser
..hidden..
Sybaspace Internet Solutions                        System Administrator
phone: (250) 246-5368                                fax: (250) 246-5398