On Sun, Jul 24, 2011 at 6:01 AM, Rich Shepard <[email protected]> wrote:
> On Sun, 24 Jul 2011, Rolf Stöckli wrote:
>
>> Now it is maybe better you don't look too deep inside the database tables.
>> Of course everything is in the database, but as Reed said correctly, the
>> relation between the entries is made in the Perl scripts. You have no hint
>> how for example acc_trans, ar, ap and invoice are related to each other if
>> you only look at the database structure.
>
> Rolf,
>
>  That's why I won't be looking.
>
>  However, I will see if I can find where the account discrepancy originated
> as time allows this week.

I disagree.  The fact is that if the database is out of whack, the
Perl scripts aren't going to do much good.  Garbage in, garbage out.
An incorrect starting balance is an indication something is wrong with
the data the Perl scripts are pulling.  I provided SQL queries to look
for some common problems in that regard.

In the past (before the LedgerSMB fork) I have received tech support
calls like "Our books don't balance and we are trying to do our taxes.
 Can you fix them now?  This is pretty urgent."  And when I ask how
long this has been going on, I get an answer of "oh about 6 months."

And so now you have six months of data which must be gone through and
sorted out in urgent order, problems analyzed and corrected.

In general an imbalance can only occur because of issues of what data
is in the database, and it is far less time consuming to address
sooner than later.  Once one tracks down the problem in the database,
then it's usually a simpler matter to see what is throwing the Perl
scripts off.  But it starts with "why is this query giving me one
result and that query giving me something different?"  Then you have
to ask "how did that data get in there?" once you track down the
discrepancy and "how do I keep that from happening in the future?"

But IMHO, you don't want problematic data in your accounting system ever.

Best Wishes,
Chris Travers
_______________________________________________
SQL-Ledger mailing list
[email protected]
http://lists.ledger123.com/mailman/listinfo/sql-ledger

Reply via email to