Jump to content

Save & Email Invoice PDF


This topic is 1116 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Good day. I am in the board of a voluntary red-cross organization and work on the project of creating a database to summarize all relevant information into one platform. In the creation of the database I am struggling on the following issues:

  • For the invoicing of the medical services I would like to handle this with one button. The invoice should be created as PDF - named with the invoice number and the event title (both defined from fields) and the invoice should be attached in an automatized E-Mail with the subject text containing the invoice number as well as the event title. The body text can be a standard text and the E-Mail address should be defined from the respective field. I understand that for realizing this process, the created PDF invoice needs to be saved to a location. This is absolutely fine and practical for archiving reasons. I would like to use the SMTP-Server option for sending the E-Mail as this should be fully automatized without first having to read through the mail and interacting with the mail application. What are the script steps I need to write in order to create and send out the PDF invoice with just one button?

I am looking forward to your suggestions for solving my database issues.

Thank you.

 

Link to comment
Share on other sites

11 minutes ago, Alan85 said:

For the invoicing of the medical services I would like to handle this with one button. The invoice should be created as PDF - named with the invoice number and the event title (both defined from fields) and the invoice should be attached in an automatized E-Mail with the subject text containing the invoice number as well as the event title. The body text can be a standard text and the E-Mail address should be defined from the respective field. I understand that for realizing this process, the created PDF invoice needs to be saved to a location. This is absolutely fine and practical for archiving reasons. I would like to use the SMTP-Server option for sending the E-Mail as this should be fully automatized without first having to read through the mail and interacting with the mail application. What are the script steps I need to write in order to create and send out the PDF invoice with just one button?

For this you can use PSOS (Perform Script on Server ) there are some pre-requisites to do this in order to send the current invoice record's UUID to the server as a parameter - you should also have a startup script that check to see if you are running on the server and then bypass non essential startup routine.

The script will take parameter of the UUID of the invoice you wish to send then the server would go to that invoice layout perform a find for the record in question, generate a PDF (usually from the line items ) and save it to the Documents folder or to the Temporary folder and then import the PDF in to a container (you might need to use Base Elements Plugin on the server). And then you can send the EMAIL via STMP attaching the PDF stored in the container. 

Your emails will all come from one email account unless you mange multiple users credentials.  

 

 

Link to comment
Share on other sites

This topic is 1116 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.