Store Pdf Invoice on ftp

Store Pdf Invoice on ftp
I've done this because I want to keep invoices in PDF files in case when user will change his details or another thing will be changed on invoice. As you know when user changes his details in WHMCS he can download his x-years old invoice which will be updated with new informations.

This works only with downloading invoice from administration or client section. When you click send invoice by email in administration section user will get invoce with details downloaded from DB instead of file. Adding invoice as attachment is out of hook and template hands so I coudln't do anything about it.

I'm using invoice custom numbering (xx/mm/yyyy) and that's why I'm replacing characters "/" to "-" when saving and reading files. I'm also not saving unpaid invoices (proformas) because I don't need them.

If client wants to change his details on invoice then he must contact support and someone from support will have to delete PDF invoice from INVOICESDIRECTORY.

Screenshots
There is no screenshot it works on server side.

Installation
Easy

Licence needed ?
No

Download From us with support
Not Available now.

Download Direct
[no]

Detailed step by step
1-Change in this code INVOICESDIRECTORY - directory where I'm keeping PDF invoices ADMINDIRECTORY - administration directory 2- Paste it in last line of invoicepdf.tpl file in Your template.