Code to Print Multiple AR Invoices

Thanks that looks pretty cool. I am on 10.2.300 so looking forward to the day we can upgrade so I can utilize Epi-Functions.

Thanks Jose! That is what I’m doing, grabbing the RptData via a BAQ and downloading it as a PDF. The usability issue is that there is an AJAX call that is pulling the PDF into an iframe while the user waits for the task agent to submit and run the report. The user is willing to wait 10 seconds or so for one task to complete but when there are multiple invoices, they want to pick and choose them and download as one file. I was hoping to submit them all as a single task to the task agent to reduce the time it takes.

1 Like

You can also run the invoices by just doing a SQL INSERT into the ICE.SysAgentSched, ICE.SysAgentTask and ICE.SysAgentTaskParam tables. The nice thing with this is you can use as much SQL as you want to build the report parameters and run them on a schedule with a SQL Job or a Windows Scheduled Task.

Yeah that makes sense we created basically the equivalent of System Monitor in our web app to queue the Invoice Jobs and allow the user to continue working while epicor does it’s magic.
Then we notify the user when the job is done

2 Likes

That looks pretty slick! All I have is a spinning circle but one day hope to catch up to this type of interface :smiley:

1 Like

There isn’t a ton of “magic” or anything supper special here, just a simple Angular App but can be done in any framework witb just a bit of javascript

basically make an async call to the REST to Print the Report

Add the resulting TaskNum to a List (queue) that we loop through every X seconds and ask Epicor about the status.
When Epicor replies (Via REST BAQ) that it’s ready we just fetch the document bits and notify the user

1 Like

That is Kendo right?

Yes the Grid is Kendo UI for Angular (cough Kinetic Inspired cough).

The Job Queuing is a custom component we wrote. Basically uses a Styled DropDown with a bit of JavaScript.

1 Like

Yeah I think I recognized the orange/dark blue they use in their control demos in their website, basically kinetic, use epicor blue and you can say it is kinetic :stuck_out_tongue:

That’s the goal… (not to say its Kinetic but to make it as seamless as possible)

Lots of cool ideas on this thread, but is anyone else baffled that there is no Invoices filter in the Mass Print AR Invoices program? If we had something like this I think so many business cases I’m hearing here could be solved with Quick Searches and/or BAQ searches:

1 Like

@TomAlexander I agree it’s puzzling this isn’t the first filter they developed for mass print AR invoices. It seems like there should be a simple solution to mimic an invoice group and use that group to reprint the invoices.

1 Like