Search code examples
phpdatabasepdfautomationinvoices

Generating Invoices and Updating Database Table Automatically


I have a possible client with the following tasks:

Teacher
The teacher generates an invoice: at the end of each month the system generates automatically an invoice with the hours worked by the teacher. The invoice is sent to the school in PDF format.

and

Student
View teachers information, telephone number, can email teacher. read/comment the lessons, approves the lessons for billing. if student does not respond lessons automatically approves within 24 hours.

I understand workings of a web application when user is actually using it, clicking the links and triggering some events.
What I don't know how to do is those parts where something has to be done automatically.
How would you solve this, where things have to be done based on time passed?

I would also appreciate for you to tell me how would you generate .pdf in PHP.


Solution

  • You should implement the functionality to enable the actions described, then create a cron job, set its frequency to the desired and run your task as part of the cron job. As about generating PDF with php, read this.