Hi All

We have just setup SL (ver 1.8.7) and started moving our accounts 
onto it.  It is very flexible and very user friendly.

However we somehow managed to get the database a little out of sync.

We pay commissions to existing customers who refer new customers. Our
accountant was trying some "creative" techniques for getting the
transactions entered into SL. He put through some entries with -ve
value payments. This worked, everything balanced, and we got the
right numbers into the right accounts.

However things went wrong when he deleted one of these transactions. 

The total balance for our cashbook account in the trial balance
suddenly was out verses the balance in our bank account by the amount
of the deleted transaction. The trial balance total for the previous
month end was correct, and every transaction was listed correctly on
the detailed report for the cash book account, but the trial balance
total for the end of the month was wrong.

I then looked directly at the database on Postgres using psql. There
were two contra balanced entries for the deleted transaction present 
in the "acc_trans" table, but there was no indication of it in the 
ar, ap, gl or oe tables. This seemed wrong compared to other valid 
transactions. So I deleted the two entries from acc_trans, and 
suddenly my trial balance total matched my bank account balance!

Thus it seems there is a bug lurking the the SL code - possibly 
related to deleting transactions with -ve amount values. I have not 
tried to reproduce the problem.  

Is there any documentation on the database structure? I have been 
guessing about how things get recorded, but it would be nice to have  
something more formal. Particularly if we get tempted to write some 
customised extensions at some stage in the future.

Thanks

Ian Forbes
---------------------------------------------------------------------
Ian Forbes ZSD
http://www.zsd.co.za
Office: +27 21 683-1388  Fax: +27 21 674-1106
Snail Mail: P.O. Box 46827, Glosderry, 7702, South Africa
---------------------------------------------------------------------




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
-------------------------------------------------------
(un)subscribe: http://lists.sourceforge.net/lists/listinfo/sql-ledger-users
Archive: http://www.mail-archive.com/[email protected]/

Reply via email to