Table of Contents

Invoice mailer

That a remake of old mailer which was send url to xlsx.

Now we make invoice as PDF and send it the email message as attachment.

And we keep old way to create invoice.

To be sure about the invoices really go out we may review each step in queue to be sure about invoices really go out.

Email of cinema

Right now we support only one cinema email. That because of the folder name which the script generate to prepare new pdfs. To get invoice be scheduled – cinema should have valid non-empty email.

Sending time

Based on dgbos approach we may schedule send moment as some hour::minute along a day.

Right now it's 07:00 of the server time (while dgbos uses 08:00).

Maker queue

Based on server settings each invoice goes through next states

  1. request to generate pdf file – looks as “BVI15000” for example, a file without of extention
  2. pdf file created, it rename “BVI15000” into “BVI15000.txt” and create the file “BVI15000.pdf”
  3. when the invoice sent out – the “BVI15000.txt” leaved for history, and “BVI15000.pdf” goes to the “sent” subfolder; new record into the table “invoice_reports” added with details about which email, and sending error if any

Preview queue

To be sure about the system works ok we have special read-only reviewer to show which invoices scheduled, which sent, or whatever. Available only for admin's by password.

https://filmdistributionmanager.com/fdm/index.php/dashboard/

Some explanations

Possible troubles