Automating Invoice Order Process-and-Email

Discussions relating to breakout scripting, .NET and COM programming with Jiwa objects.

Automating Invoice Order Process-and-Email

Postby pricerc » Thu Jun 24, 2010 1:18 pm

In my ongoing Sales Order import project, I now have orders being imported successfully from my client's web site, now I'm on to the next step, which is to automate processing the orders and emailing them out.

I'm sure the process should be simple, and I had some sample code, but it turned out to be for a previous version of JIWA, and doesn't work in 6.5.13.

I've found the examples for processing a single order, and automating bulk processing of back orders, but in my case, I have normal invoice orders which need processing, after which I'd like to email them out.

This will be scheduled to run every hour (a few minutes after the import).

The users currently go to the S/O Processing screen, click 'Go', then click 'Process', with barely a glance at what's there, followed by much the same thing for the email - go the the batch email screen, specify the first invoice (the latest is already there) click 'Go' and 'Process'.

where do I start?

I know I could probably roll one from scratch using a stored procedure to geta list of orders to process and then looping through each one and processing them using the technique described in http://www.jiwa.com.au/forums/viewtopic.php?f=14&t=50, but I'm kinda hoping there's a more efficient way?
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: Automating Invoice Order Process-and-Email

Postby Mike.Sheen » Wed Jul 07, 2010 8:00 pm

pricerc wrote:...
I know I could probably roll one from scratch using a stored procedure to geta list of orders to process and then looping through each one and processing them using the technique described in http://www.jiwa.com.au/forums/viewtopic.php?f=14&t=50, but I'm kinda hoping there's a more efficient way?


The breakouts are great for use when the user has loaded a form and is interacting with it, but for batch type stuff you need a different approach.

Processing a bunch of sales orders is possible - given you know how to identify which orders need to be processed.

What's your criteria ? Perhaps the previous step - the import - inserts into a temp table the invoice no of all imported orders ? Are only the imported orders needing to be processed ?

If so, we just need to modify your import process to insert into a global temp table the invoiceno and a processed flag, and have another service poll the records in that table which are not processed and invoke the sales order processing COM object.

Not rocket science, but it will take a few hours of work. I can provide guidance, but at a leisurely pace (I'm a little snowed under at the moment). If you need more rapid action, log a support issue and we'll quote and action that for you.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756


Return to Technical / Programming

Who is online

Users browsing this forum: No registered users and 4 guests