On Fri, 22 Jul 2011, Chris Travers wrote:

First, there are other cases where fractional cents may be tracked
(for example sales tax liabilities) but they shouldn't affect bank
deposits or withdrawals.

Chris,

  Then the decimal part of the numeric value can be expanded to 3 or 4
digits. I remember when postgres dropped the MONETARY alias to the NUMERIC
data type, but I used the latter anyway.

What I'd recommend doing first is just transforming the field to an
unbounded numeric type I.e. without parentheses.  This represents the
money in PostgreSQL's arbitrary precision math form (internally a string
of 10-bit units, each representing an integer from one to 1000. Why 1000? Because it's more efficient to lose 24 bits per 1024 to overhead than 6
per 16).

You can do this by (pg 8.1 and above):

ALTER TABLE acc_trans ALTER COLUMN amount TYPE numeric;

That may not fix your problem though.

  No, but it's worth doing ... done.

The first question what does SQL-Ledger think your balance should be?

  Where? In the trial balance it's correct. When reconciling it's not
correct.

Are there transactions of exactly that amount which were erroneously
committed in the past?

  Nope. I have, at most, a couple of dozen checks and debit card
transactions each month. It's easy to match those with the monthly statement
and reconcile manually before doing so in L123. The manual reconciliations
always balance. That's why I'm frustrated that the digital version is off.

 If you have old bank statements, you can run successive queries to try to
determine where and when this problem started.

  Long ago.

  As I wrote above, manual reconciliation is always correct. The amounts of
deposit and withdrawal transactions in L123 are correct. But, the beginning
balance in L123's reconciliation is not and that sets the ending balance off
so the process continues incorrectly each month. Since the manual
reconciliation is correct, and that amount is shown as the balance in the
checking account the problem is not fatal, but a time consuming PITA each
month.

Thanks,

Rich
_______________________________________________
SQL-Ledger mailing list
[email protected]
http://lists.ledger123.com/mailman/listinfo/sql-ledger

Reply via email to