On Wed, 2012-12-12 at 23:19 -0800, Chris Travers wrote: > > > On Wed, Dec 12, 2012 at 6:49 PM, ario <ledger-smb-us...@infopower.nl> > wrote: > 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? > > > can you send me: > > > SELECT * FROM acc_trans WHERE trans_id = 15956 ORDER BY entry_id
http://tinypic.com/view.php?pic=2e38h3r&s=6 > My thinking is from what you say that is right, but let's identify the > row, then you can switch from credit to debit by: > > > If it is the AP account, it should be a debit on the payment not a > credit. > > > UPDATE acc_trans SET amount = -1 * amount WHERE entry_id = .... So, from the screenshot and your suggestion, am I correctly concluding that entry_id should be either 9827 or 9828? thanks, ario > Best Wishes, > Chris Travers > > Thanks, > ario > > A screenshot of the record can be found here: > http://tinypic.com/view.php?pic=1zq7gab&s=6 > > > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free > Trial > Remotely access PCs and mobile devices and provide instant > support > Improve your efficiency, and focus on delivering more > value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > Ledger-smb-users mailing list > Ledger-smb-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ledger-smb-users > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ Ledger-smb-users mailing list > Ledger-smb-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ledger-smb-users ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Ledger-smb-users mailing list Ledger-smb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ledger-smb-users