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

NaN, AP account credited twice after trying to correct wrong 'Payment' entry



Hi (Chris),

not so long ago there was an issue with 'NaN' in the amount field, where
the source field contained the amount. This was supposed to be solved by
issuing the psql statements:

SELECT trans_id FROM acc_trans WHERE source = '1,893.00';

to find the affected trans_id which turned out to be 15956, and

UPDATE acc_trans SET amount = 1893 WHERE amount = 'NaN' AND trans_id =
15956;

to fix the wrong entry. 
However, after doing this, the AP account (2100) wasn't balanced: The
'purchases account (5010) is debited, the cash account (1010) is
credited, which both seem to be right, but the Accounts Payable account
(2100) is credited twice. 
Should the AP account not be credited once and debited once to reflect
the completed payment?
And how would I correct that with a psql statement?

Thanks,
ario

A screenshot of the record can be found here: 
http://tinypic.com/view.php?pic=1zq7gab&s=6