This is to keep invoices in PDF files inside your ftp webserver, just 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.
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.