Batch print/email, multiple attachments to same debtor  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Batch print/email, multiple attachments to same debtor

Postby DannyC » Mon Jan 15, 2024 12:07 pm

I'm looking into developing a plugin which can grab all the invoice PDFs (or delivery docket, pick slip i.e. whatever the report type is but typically invoice) going to the same debtor and attaching them all to a single email.

I've found this thread which gives me a clue, but not sure how I would go about it from the BatchPrint business logic.
viewtopic.php?f=26&t=1335

I assume I'd hook into the BatchPrint.ProcessStart? Maybe the BatchPrint.ProcessingLine?
And then how would I
add a handler for the SaveStart of the JiwaApplication.JiwaEmail.EmailMessage object before the salesOrder.Email() method is invoked.


I think I need a head start on this one :?
User avatar
DannyC
Senpai
Senpai
 
Posts: 636
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30

Re: Batch print/email, multiple attachments to same debtor

Postby SBarnes » Mon Jan 15, 2024 3:58 pm

Can you explain a bit more of what you are trying to acheieve as I can't see why you actually need a plugin and the batch printing screen can't achieve what you need out of the box?
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Batch print/email, multiple attachments to same debtor

Postby DannyC » Mon Jan 15, 2024 5:23 pm

Out of the box, the Batch Print/Email screen sends 1 email with 1 attachment per line, i.e per invoice.

If there are a few candidate sales orders to the same debtor, combine them into 1 email with multiple attachments.
User avatar
DannyC
Senpai
Senpai
 
Posts: 636
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 30

Re: Batch print/email, multiple attachments to same debtor  Topic is solved

Postby SBarnes » Mon Jan 15, 2024 5:35 pm

Oh, you would be overriding the entire way that the process object in that screen currently works i.e. totally overriding the business logic which drills down in to each line and prints/emails the reports, one line doesn't know about another so therefore I doubt what you are trying to achieve would be possible within the existing screen.

You would probably need to create a new screen which filled up a grid of debtors and the did the logic of what you are describing which is a fair bit of work and probably well beyond what can be covered in a forum post.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 17 guests