I’m trying to write a script so that I can take AP
transactions from another program and record them in Ledger-SMB. I keep running
into this error: Error: Error: Error: Exchange rate missing! Compilation failed in require at ap.pl line 2. When I try to give it the exchange rate it gives me this
error: DBD::Pg::db do failed: ERROR: null value in column
"chart_id" violates not-null constraint Issuing rollback() for database handle being DESTROY'd
without explicit disconnect() at LedgerSMB/Form.pm line 185. Error: Error: Error: INSERT INTO acc_trans (trans_id,
chart_id, amount, transdate,
project_id,
memo, fx_transaction, cleared)
VALUES (10211, (SELECT id FROM chart
WHERE accno = ''),
600 * -1, '09-22-2006',
NULL, NULL,
'0',
'0') ERROR: null value in column "chart_id"
violates not-null constraint Compilation failed in require at ap.pl line 2. ViewAccount ledger-smb # vi x3test.sh ViewAccount ledger-smb # vi x3test.sh ViewAccount ledger-smb # ./x3test.sh Error: Error: Error: Exchange rate missing! Compilation failed in require at ap.pl line 2. ViewAccount ledger-smb # vi x3test.sh ViewAccount ledger-smb # ./x3test.sh DBD::Pg::db do failed: ERROR: null value in column
"chart_id" violates not-null constraint Issuing rollback() for database handle being DESTROY'd
without explicit disconnect() at LedgerSMB/Form.pm line 185. Error: Error: Error: INSERT INTO acc_trans (trans_id,
chart_id, amount, transdate,
project_id, memo, fx_transaction, cleared)
VALUES (10213, (SELECT id FROM chart WHERE
accno = ''),
600 * -1, '09-22-2006',
NULL,
NULL,
'0', '0') ERROR: null value in column "chart_id"
violates not-null constraint Compilation failed in require at ap.pl line 2. This is what I’m trying to submit: perl ap.pl
"login=test&password=test&path=bin/mozilla&action=""
And Joe--10179&vendor_id=10179&vendor=Gregg And
Joe&terms=0&creditlimit=0&selectcurrency=<option selected>USD&defaultcurrency=USD&selectAP_amount=<option>5010--Purchases&rowcount=2&transdate=09-22-2006&duedate=09-22-2006&oldinvtotal=500&selectAP=<option
selected>2100--Accounts Payable&amount_1=600.00&paidaccounts=1&selectAP_paid=<option>1060--Checking
Account&AP=2100" This gives me the first error, if I try to add anything
related to exchange rates then it gives me the second. I would appreciate any
help anyone can give me. |