Automating sales order processing and invoice printing

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

Automating sales order processing and invoice printing

Postby DannyC » Mon Sep 15, 2014 4:20 pm

Hi,
Similar to forum thread http://forums.jiwa.com.au/viewtopic.php?f=14&t=145
but in my scenario, instead of a batch process, I need the processing and printing to happen instantly from a external trigger (not to be confused with a SQL trigger).

That trigger may be a CSV file, or it might be a record added to a SQL table, or something else. Or it might be the case to fire a VBS file to invoke the Sales Order Process and printing. Need an invoice AND delivery docket to print.

How can this be done in 6.5.13?

The exact scenario is that a WMS has completed picking a file and it can either
i) export a CSV file
ii) write to a SQL table
iii) fire some VBScript code

As an additional requirement if a line on an order is only partially picked, the the quantity on the SO line needs to be adjusted accordingly, i.e QtyThisDel = QtyPicked and QtyBackordered = QtyNotPicked. Then processed and printed as above. I have been trying to develop something for ages now & now I admit defeat and call upon the experts!

Cheers

Danny
User avatar
DannyC
Senpai
Senpai
 
Posts: 636
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30

Re: Automating sales order processing and invoice printing

Postby DannyC » Tue Sep 16, 2014 12:09 pm

Further to this, I've been trying to use the
JiwaSOBatchProcessTool.exe to see if I can get it to process from a DOS command prompt.

I have all the parameters set correctly as far as I know, but the sales order is not processing.
1. Is this tool still functional in 6.5.13?
2. Do you have a sample of the full command line successfully processing a sales order?
3. I guess this wouldn't run breakouts. How could I get the sales order to print an invoice and delivery docket?

Still need an answer to the first post. The JiwaSOBatchProcessTool is just a desperate attempt to get something working.

Thanks
User avatar
DannyC
Senpai
Senpai
 
Posts: 636
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30

Re: Automating sales order processing and invoice printing

Postby DannyC » Tue Nov 11, 2014 10:28 am

Mike,

I have the printing sussed, and the sales order processing I have set up via Jiwa Scheduled Scripts.
Unfortunately they do not fire at the configured interval even though the Windows Application Log shows it is polling successfully and processing the scripts.
Nothing gets written to the History tab.
This is even more urgent than the other problem I have on the BOProcess breakout.

Failing getting the scheduled script working, is there a VBS script which could run from the command line to process individual orders?

Could do with some urgent help! Currently on site at client

Cheers

Danny
User avatar
DannyC
Senpai
Senpai
 
Posts: 636
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30

Re: Automating sales order processing and invoice printing

Postby Mike.Sheen » Tue Nov 11, 2014 3:48 pm

DannyC wrote:Further to this, I've been trying to use the
JiwaSOBatchProcessTool.exe to see if I can get it to process from a DOS command prompt.


I don't recommend using that - I didn't even realise it still shipped with Jiwa - It *should* still work, but I've not tested it - I see it requires a DSN to be setup which indicates it's pretty old.

The scheduled script service should be ideal for your needs in this case.

DannyC wrote:Mike,

I have the printing sussed, and the sales order processing I have set up via Jiwa Scheduled Scripts.
Unfortunately they do not fire at the configured interval even though the Windows Application Log shows it is polling successfully and processing the scripts.
Nothing gets written to the History tab.


Try a simple script to test if it running the script at all - something which say appends to a text file. I've just done one as a test which has this as the code:

Code: Select all
FileName = "c:\testfile.txt"

Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.CreateTextFile(FileName, True)

End Sub   


I set the schedule to run every 1 minute, saved and configured and started the service and it created the file c:\testfile.txt - I deleted that and a minute later it had created it again, as expected. I could also then see in Jiwa the History tab of the scheduled scripts form showed the previous executions logged as successful.

Are you sure you set a schedule ?

Try the sample above as a test an see if you get the file being created.

Mike
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

Re: Automating sales order processing and invoice printing

Postby DannyC » Tue Nov 11, 2014 4:36 pm

OK, will try that to confirm.

Are you sure you set a schedule ?

Well, I might appear dumb sometimes but not that dumb! Worth asking though.

By the way, what is your PollingIntervalInMinutes in the CONFIG file?
User avatar
DannyC
Senpai
Senpai
 
Posts: 636
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30

Re: Automating sales order processing and invoice printing

Postby Mike.Sheen » Tue Nov 11, 2014 5:05 pm

DannyC wrote:By the way, what is your PollingIntervalInMinutes in the CONFIG file?


Mine is set to 1, and my schedule is also set to 1 minute.
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

Re: Automating sales order processing and invoice printing

Postby DannyC » Tue Nov 11, 2014 5:55 pm

Well, guess what? I set the schedule to run Weekly, on Tues, between whatever hours, every 4 minutes.
Nothing. File didn't get created unless I executed manually.

Just for the heck of it, I changed from Weekly to Daily.

Bingo. File getting produced!

So I think the root cause is some kind of problem when schedules are set to run weekly. Changing it to daily & it all starts to work as expected.

Yay! Thanks for your time & helping to diagnose the issue.

As an aside - you might want to check that bug hasn't flowed into Jiwa 7.

Cheers

Danny
User avatar
DannyC
Senpai
Senpai
 
Posts: 636
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30


Return to Technical / Programming

Who is online

Users browsing this forum: No registered users and 4 guests