Discussion:
[Ledger-smb-devel] Entering a Sales Invoice via a script.
Del Miller
2008-03-19 16:24:39 UTC
Permalink
I am in need of pushing sales invoices into lsmb via a script. Writing
the script is not a problem but I need to know the minimum fields
required to get an invoice in. I've looked at the oe.pl module (and
ended up confused at best) and also the 'enter sales invoice' web page
that lsmb generates... but there's quite a few fields there to play
with. I was hoping to get to writing the script rather than spend the
next couple of weeks guessing at what may work. Anyone around here have
such information??

Regards
Del
John Locke
2008-03-21 00:48:35 UTC
Permalink
Del: I just updated a script for adding/synchronizing customers via the
CLI. The simple way is to look at the web interface form, and add each
field you see (other than checkboxes).

The Firefox view frame info -> Forms tab is perfect for this, gives you
a list of all fields visible on the form. Any you omit will be blank.
Post by Del Miller
I am in need of pushing sales invoices into lsmb via a script. Writing
the script is not a problem but I need to know the minimum fields
required to get an invoice in. I've looked at the oe.pl module (and
ended up confused at best) and also the 'enter sales invoice' web page
that lsmb generates... but there's quite a few fields there to play
with. I was hoping to get to writing the script rather than spend the
next couple of weeks guessing at what may work. Anyone around here have
such information??
Cheers,
--
John Locke
"Open Source Solutions for Small Business Problems"
published by Charles River Media, June 2004
http://www.freelock.com
Del Miller
2008-03-21 16:52:30 UTC
Permalink
John,

Thanks for the suggestion, this is the route that I've taken so far but
with little success. I have yet to find the magic combination of form
fields that will allow me to directly submit an invoice into the system.

It has also been suggested that I go against the IS.pm module directly
but I haven't had the time to pursue that route yet. I've looked over
the IS.pm code some but have yet to determine if I can get to the
single-call submission nirvana that I hope to achieve.

What I'm trying to do is this: I have an email address setup for
submission of a 'service ticket' (for lack of a better label). I send
in emails to my 'service ticket' email account as I go about my day
visiting my clients -- they're very simple emails with just the
necessary info in them: the subject line is the client name, the email
body consists of service code (part number), time (qty), and description
of service (to go into the line item note field), date of service can be
pulled from the date of the email. Once a month (or how ever frequently
I chose to bill :), I want my script to process mail from the billing
account and submit invoices into LSMB. The biggest catch in this is
getting the invoice submitted in one shot. I can lookup/translate
whatever I need to from my script (I use short codes for my client names
-- ASC instead of Acme Supply Company -- so some translation is needed
anyway) but what I haven't wrapped my brain around fully yet is exactly
what I need to look up. I can translate ASC into the full customername,
or the customer_id -- either's good for me, but I haven't figured out
what LSMB expects. Same goes for all the other fields -- what do I need
to supply to be successful. I suppose I just need a 'Code Immersion
Weekend' -- I'm sure my wife & kids will love the idea ;)

ANY ideas would be gladly accepted.

Regards
Del
Post by John Locke
Del: I just updated a script for adding/synchronizing customers via the
CLI. The simple way is to look at the web interface form, and add each
field you see (other than checkboxes).
The Firefox view frame info -> Forms tab is perfect for this, gives you
a list of all fields visible on the form. Any you omit will be blank.
Post by Del Miller
I am in need of pushing sales invoices into lsmb via a script. Writing
the script is not a problem but I need to know the minimum fields
required to get an invoice in. I've looked at the oe.pl module (and
ended up confused at best) and also the 'enter sales invoice' web page
that lsmb generates... but there's quite a few fields there to play
with. I was hoping to get to writing the script rather than spend the
next couple of weeks guessing at what may work. Anyone around here have
such information??
Cheers,
The Anarcat
2008-03-24 16:54:16 UTC
Permalink
Hi,

I missed the first bits of this discussion, but I want to announce our
efforts here to improve on the scripts provided in the manual. The
source is there:

https://lethe.koumbit.net/svn/koumbit/trunk/bin/sl02-create-entity.pl
https://lethe.koumbit.net/svn/koumbit/trunk/bin/sl02-create-orderentry.pl

The main improvement at this point is to allow distant interfacing,
through https.

Note that orderentry.pl doesn't do anything else than
create-entity.pl... But the idea is to create work orders instead of
invoices, for safety issues.

A.
--
Ou bien Dieu voudrait supprimer le mal, mais il ne le peut pas
Ou bien Dieu pourrait supprimer le mal, mais il ne le veut pas.
- Sébastien Faure
Jeff Kowalczyk
2008-03-24 19:47:30 UTC
Permalink
Post by The Anarcat
I missed the first bits of this discussion, but I want to announce our
efforts here to improve on the scripts provided in the manual. The
Thanks for posting these.

I'd encourage anyone with utility scripts of any kind to post their
current versions to the bug tracker, and that the core devs include them
in a /contrib location in the repository, marked as unsupported.

If contrib code is not desirable for inclusion under the source directory,
a (repository)/contrib/{trunk,branches/1.2} location would be a workable
alternative.

Even special-purpose scripts are useful to someone, if only as a starting
point to get past the various form-posting idiosyncracies of LSMB's legacy
code sections.

Once such code is in the repository, interested parties can collaborate
and share/propose patches against that master copy in the repository.

Thanks,
Jeff

Loading...