|
From: Benjamin L. <ben...@co...> - 2001-05-30 17:45:23
|
This is only tested with v1.4.4. Although it will work with the
previous 1.4 versions with a little change to the setup process.
Some people might like this little feature.
It's a close function, such that transactions previous to a set date
can no longer be inserted or updated or deleted.
This allows closing of records, especially in respect to finishing off
the financial year. You don't want to back date anything or delete
your data.
It's implemented in a bit of PL/pgSQL and Perl for the frontend so you
should have fun installing it. ;-P
Be VERY careful with this feature as it only allows updating of the
closing date going FORWARDS in time. Should you accidently close off
to a particular date (especially in the future) you'll have to drop
the trigger manually and update the 'close' table. I'll leave this
part as a learning exercise. ;-)
Actually the only reason the PL/SQL works so well with such a small
amount of code is because the SL code uses 'commit' in appropriate
places. ;-) Yay.
Edit line 26 close.sql with the 'youruser' that you use to connect to
your accounting database.
Run psql
import the sql with:
\i close.sql
Put close.pl into bin/mozilla/ (I haven't written anything for the
other interfaces yet). Symlink close.pl -> am.pl, like all (most of)
the other scripts.
Put the following into the left menu side in menu.pl (I've attached my
menu.pl as well).
<!-- snip -->
<p><b>|.$locale->text('Close').qq|</b>
<li><a href=close.pl?path=$form->{path}&action=close&title=Close%20Date&login=$form->{login} target=main_window>|.$locale->text('Close Date').qq|</a>
<!-- snip -->
I think that's it.
Have fun,
Ben.
--
B. http://makelinux.org/ "Always real." http://realthought.net/
__________________________________________________________________________
Brontosaurus Principle:
Organizations can grow faster than their brains can manage them
in relation to their environment and to their own physiology: when
this occurs, they are an endangered species.
-- Thomas K. Connellan
|