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

Credit remaining "NaN" and relation vc does not exist



Hi!

  I was using SQL Ledger as part of the Debian stable distribution.  I
converted to Ledger SMB.  The DB upgrade did not error.  I am using
version  1.2.6.

  I entered an AR Transaction and it did not seem to go through.  I
re-entered the transaction and I got the following error:

DBD::Pg::st execute failed: ERROR: relation "vc" does not exist
Error!


SELECT a.id, a.invnumber, a.ordnumber, a.transdate,
a.duedate, a.netamount, a.amount, (
SELECT SUM(ac.amount) * -1 * 1
FROM acc_trans ac
JOIN chart c ON (c.id = ac.chart_id)
WHERE ac.trans_id = a.id
AND (c.link LIKE '%AR_paid%'
OR c.link = '')) AS paid,
a.invoice, a.datepaid, a.terms, a.notes,
a.shipvia, a.shippingpoint, e.name AS employee,
vc.name,
a._id, a.till, m.name AS manager, a.curr,
ex.buy AS exchangerate,
d.description AS department,
a.ponumber
FROM ar a
JOIN vc ON (a._id = vc.id)
LEFT JOIN employee e ON (a.employee_id = e.id)
LEFT JOIN employee m ON (e.managerid = m.id)
LEFT JOIN exchangerate ex ON (ex.curr = a.curr
AND ex.transdate = a.transdate)
LEFT JOIN department d ON (a.department_id = d.id)
WHERE 1 = 1
ORDER BY 4 ASC,2,16
ERROR: relation "vc" does not exist


  Also, I noticed their "credit remaining" is now displayed as "NaN" which
I'm assuming means "Not a Number".

  Not sure what happened here.  The first AR Transaction I processed went
through fine.

-- 
Mike Marseglia
..hidden..
http://www.marseglia.org