On 7/30/07, Eduardo Huertas <..hidden..> wrote:
Seems there is a bug when trying to post a sale.
DBD::Pg::st execute failed: ERROR: el valor null para
la columna «chart_id» viola la restricción not null
Error!
INSERT INTO acc_trans
(trans_id, chart_id, amount,
transdate, source, memo, cleared)
VALUES (?, (SELECT id FROM chart
WHERE accno = ?),
?, ?, ?, ?, ?)
ERROR: el valor null para la columna «chart_id»
viola la restricción not null
This does not sound like a bug. Instead it sounds like an issue with your chart of accounts. Which chart of accounts are you using? Have you made any modifications?
Some background here: This error message is telling me that the subquery did not return a valid account id, and that our database rules prevent this from being inserted. SQL-Ledger does not do this and hence you can get invalid data in your database pretty easily.
Best Wishes,
Chris Travers