Page 1 of 1

Automating sales order processing and invoice printing

PostPosted: Mon Sep 15, 2014 4:20 pm
by DannyC
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

Re: Automating sales order processing and invoice printing

PostPosted: Tue Sep 16, 2014 12:09 pm
by DannyC
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

Re: Automating sales order processing and invoice printing

PostPosted: Tue Nov 11, 2014 10:28 am
by DannyC
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

Re: Automating sales order processing and invoice printing

PostPosted: Tue Nov 11, 2014 3:48 pm
by Mike.Sheen
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

Re: Automating sales order processing and invoice printing

PostPosted: Tue Nov 11, 2014 4:36 pm
by DannyC
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?

Re: Automating sales order processing and invoice printing

PostPosted: Tue Nov 11, 2014 5:05 pm
by Mike.Sheen
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.

Re: Automating sales order processing and invoice printing

PostPosted: Tue Nov 11, 2014 5:55 pm
by DannyC
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