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

Re: Problems with 1.4.2



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-company

I get the following error in my PostgreSQL log:

2014-10-04 20:05:51 GMT ERROR:  permission denied for sequence account_checkpoint_id_seq

Ok. 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 INTO 
                account_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 AND
                 transdate > COALESCE(cp_date, '1200-01-01')) a
                FULL OUTER JOIN (
                        select account_id, end_date, amount, debits, credits 
                        from account_checkpoint
                        WHERE 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 statement
        SQL function "eoy__reopen_books_at" statement 2
2014-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.

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