(Background: I always need to send an invoice to my bank for every new sale, and in turn they send a package to my customers via mail)
I need a script that does the following:
1. Connect to database and update a couple of fields.
2. Assign a customer number to a certain field when a sale occurs. The number is sequential to the last one assigned. (Runs Every 30 mins)
3. Creates a new folder on my desktop that is in a place that is changeable. It creates a folder with its name matching record on the database and places invoice there.
4. Checks to see if invoice already sent, if not, go ahead and send it to a list of emails from another table.
5. Updates on the table that the invoice has been sent.
(The script needs to able to do simple dates check:
If product install is next day, send document overnight
If install two days out, send next day air.
If Install is more than two days out, place on a que, and send next day air when is two days out)
I will provide the name of the fields in my MySql database to you, but you have to create a mock table and test it on it. When the product is final, I will change the database name, password to match mine and test it.
I would love to have this script run everyday at 11am and then at 11:55am pacific standard time. I would like to have a manual button so i could also create invoice manually.
The database is hosted on 1and1. The only way to connect to it is through a php script.
Skills: pdf, test