From: Wallace R. C. <wrc...@gm...> - 2008-04-18 14:53:42
|
On Fri, Apr 18, 2008 at 7:41 AM, Roy W Pennington <arc...@mt...> wrote: > On Friday 18 April 2008, Wallace Roberts Consulting wrote: > > On Fri, Apr 18, 2008 at 7:11 AM, Roy W Pennington <arc...@mt...> wrote: > > ... > > > $query = qq|INSERT INTO acc_trans (trans_id, chart_id, amount, > > > transdate, project_id, invoice_id) > > > VALUES ($form->{id}, $ref->{chart_id}, $amount, > > > '$form->{transdate}', $ref->{project_id}, $ref->{invoice_id})|; > > > $dbh->do($query) || $form->dberror($query); > > > > >From the generated error, it appears that the following variables > > might be undefined: > > > > $ref->{project_id}, $ref->{invoice_id} > > > > You could place a conditional in the perl code to check those > > variables & use some kind of default value if they don't exist. > > So you're saying that SQL-ledger's official code is broken ? No. I'm saying that a pathological interaction has cropped up among the new pieces of code, & making a very simple change to the above SQL-Ledger code will ameliorate said pathology. -- Best Regards, Wallace |