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

Re: Posting Invoices failing



On Thu, 2007-11-29 at 15:22 -0800, Chris Travers wrote:
> 
> 
> On Nov 29, 2007 2:42 PM, BeamEnds <..hidden..> wrote:
>         Hi All,
>         if I create a Sales Invoice and Post it I get this:
>         
>         DBD::Pg::st execute failed: ERROR: insert or update on table
>         "acc_trans"
>         violates foreign key constraint "acc_trans_chart_id_fkey" 
>         DETAIL: Key (chart_id)=(4000) is not present in table "chart".
>         
>         Error!
>         
>         INSERT INTO acc_trans
>         (trans_id, chart_id, amount,
>         transdate, project_id, invoice_id)
>         VALUES (?, ?, ?, ?, ?, ?)
>         ERROR: insert or update on table "acc_trans" violates foreign
>         key
>         constraint "acc_trans_chart_id_fkey"
>         DETAIL: Key (chart_id)=(4000) is not present in table "chart".
> 
> Something is referencing an account with an id of 4000. And that
> account doesn't exist.  This may have to do with a part on that
> invoice.  
> 
> When this occurs, we refuse to do the insert (this avoids things like
> having your books out of balance due to money going into/out of an
> unknown account). 
> 
> Best Wishes,
> Chris Travers
> 

Hi Chris,
it's definately there 4000 is the Sales acccount - that's what is
puzzling!

Cheers
Richard

> 
> -------------------------------------------------------------------------
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell.  From the desktop to the data center, Linux is going
> mainstream.  Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
> _______________________________________________
> Ledger-smb-users mailing list
> ..hidden..
> https://lists.sourceforge.net/lists/listinfo/ledger-smb-users