On Mon, Oct 6, 2014 at 6:21 AM, Stephen Winnall <..hidden..> wrote:On 04.10.2014, at 23:26, Erik Huelsmann <..hidden..> wrote:My books are closed after a year-end. I tried to reopen them. My browser says:Error!
Access Denied
More information has been reported in the error logs at LedgerSMB.pm line 775.
dbversion: 1.4.2, company: my-companyI get the following error in my PostgreSQL log:2014-10-04 20:05:51 GMT ERROR: permission denied for sequence account_checkpoint_id_seqOk. Dealing with this one should not be too hard. If you log into your database with psql, you should execute the following command:grant USAGE, SELECT, UPDATE on account_checkpoint_id_seq to public;Thanks for this. It got me to the next stage. But when I try to reopen the books, I get the following message:Error!
Conflict with Existing Data. Perhaps you already entered this?
More information has been reported in the error logs at LedgerSMB.pm line 775.
and the PostgreSQL log shows:2014-10-06 13:15:42 GMT ERROR: duplicate key value violates unique constraint "account_checkpoint_pkey"2014-10-06 13:15:42 GMT DETAIL: Key (end_date, account_id)=(2011-09-30, 43) already exists.2014-10-06 13:15:42 GMT CONTEXT: SQL statement "INSERT INTOaccount_checkpoint (end_date, account_id, amount, debits, credits)SELECT in_end_date, COALESCE(a.chart_id, cp.account_id),COALESCE(SUM (a.amount),0) + coalesce(MAX (cp.amount), 0),COALESCE(SUM (CASE WHEN (a.amount < 0) THEN a.amount ELSE 0 END), 0) +COALESCE( MIN (cp.debits), 0),COALESCE(SUM (CASE WHEN (a.amount > 0) THEN a.amount ELSE 0 END), 0) +COALESCE( MAX (cp.credits), 0)FROM(SELECT * FROM acc_trans WHERE transdate <= in_end_date ANDtransdate > COALESCE(cp_date, '1200-01-01')) aFULL OUTER JOIN (select account_id, end_date, amount, debits, creditsfrom account_checkpointWHERE end_date = cp_date) cp on (a.chart_id = cp.account_id)group by COALESCE(a.chart_id, cp.account_id)"PL/pgSQL function eoy_create_checkpoint(date) line 27 at SQL statementSQL function "eoy__reopen_books_at" statement 22014-10-06 13:15:42 GMT STATEMENT: SELECT * FROM "public"."eoy__reopen_books_at"('2011-10-01')It looks to me as though “reopen books” is trying to repeat the existing “close books” entry.Are you trying to reopen to another date when the books were originally closed? Try re-opening to a date shortly after if you can.
That isn't a closing books entry in the sense of zeroing out temporary accounts. It is instead a summary record of where the books are on the date they are closed.Regards,Steve
------------------------------------------------------------------------------
Slashdot TV. Videos for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users
--Best Wishes,Chris TraversEfficito: Hosted Accounting and ERP. Robust and Flexible. No vendor lock-in.
------------------------------------------------------------------------------ Slashdot TV. Videos for Nerds. Stuff that Matters. http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________ Ledger-smb-users mailing list ..hidden.. https://lists.sourceforge.net/lists/listinfo/ledger-smb-users