Wenn ich eine Debitorenrechnung erfassen will, wird die Auswahlliste "Buchungsgruppen" nicht geladen. Wenn dort nichts eingetragen ist, kann die Rechnung nicht gebucht werden, es kommt die Fehlermeldung:
"INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, tax_id, taxkey, project_id, chart_link)
VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?,
(SELECT tax_id
FROM taxkeys
WHERE chart_id= (SELECT id
FROM chart
WHERE accno = ?)
AND startdate <= ?
ORDER BY startdate DESC LIMIT 1),
(SELECT taxkey_id
FROM taxkeys
WHERE chart_id= (SELECT id
FROM chart
WHERE accno = ?)
AND startdate <= ?
ORDER BY startdate DESC LIMIT 1),
?,
(SELECT link FROM chart WHERE accno = ?)) (705, , -78.62, 11.03.2015, , 11.03.2015, , 11.03.2015, , )
ERROR: null value in column "chart_id" violates not-null constraint
DETAIL: Failing row contains (4019, 705, null, -78.62000, 11.03.2015, 11.03.2015, null, f, f, f, f, null, null, null, 11.03.2015 12:56:39.884102, null, null, null)."