Hi, Our technique for doing this is a bit different. I use the Curl library to do an http post to the LedgerSMB server, containing the post details. It's actually a two-step process: first post with customer details, then parse form to get the line item ids, then post the final. You can get the post details out of the form being sent to the server from the UI.
This technique also works with the CLI. Cheers, -- John Locke http://freelock.com -------- Original Message -------- Subject: Re: [Ledger-smb-devel] API to insert an AR Transaction From: Avron Olshewsky <[email protected]> To: Development discussion for LedgerSMB <[email protected]> Date: Tue 08 Sep 2009 05:38:31 PM PDT > David, > > Many thanks, why did I not think of that ? > > Regards > Avron > > Avron Olshewsky > > +55 21 8391 9537 (Brazil Mobile) > +44 207 1837733 (UK Landline) > > http://www.avrono.co.uk > > "If you´re standing still, > you´re really moving backwards" > > > > David A. Bandel wrote: > >> On Tue, Sep 8, 2009 at 16:30, Avron Olshewsky<[email protected]> wrote: >> >> >>> Hi, >>> >>> I would like to insert a transaction and only a transaction >>> automagically, from the API documentation I do not see a Method that >>> looks like it would perform that function. Can anyone tell me if they >>> know of a technique for doing this or could explain what would be >>> involved. I am a Perl developer, however never touched LedgerSMB before. >>> >>> >> The easiest way is to find out what gets pushed into the database. >> What I do is ensure postgres is configured to log sql queries (edit >> postgresql.conf then restart postgres), tail -f the log file, then >> submit the type of transaction you want to emulate. You'll see >> exactly what ledgersmb is sending to the sql server, which is what >> counts. Then you can write a perl (or other language) interface to >> mimic what was done. >> >> HTH, >> >> David A. Bandel >> >> > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Ledger-smb-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel > > !DSPAM:4aa6f958248232007213463! > > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Ledger-smb-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
