I dont kow if there is better way, but the way WHMCS works maybe the way…
Cose version 2 is in development, and maybe not so far off, so you could add it to system now when you are revorking it from ground up. It’s ideal time to add this functionality, and would make development easier for you in long run. Others could make extensions/moduls for Invoice plane without messing the code and not be worried about upgrades deleting custom code. Also, in future if you decide to merger that module with base InvoicePlane it would make it for you to do so easier…
Also they have good solution for custom fields, that you create and can use everywhere from system, client, invoice etc… to pdf document…
Lets say someone wants to do some specific thing for they country in invoice, like fiscalisation. They could make a module for WHMCS and use ActionHook to triger Fiscalisation when invoice is finished.
Here you can see ActionHooks
http://docs.whmcs.com/Hooks
App could be used to build lets say mobile apps or connect to other systems
Here you can see theyr Api
http://docs.whmcs.com/API
They even provide free licence for developers, but that instalation cant be used on public facing web, but on VM with internal IP and no one must be able to connect to it from internet… So you could take a look…
You can even create lets say CentOS VM, use Webuzo (free control panel and apply for 30 day free premium licence), then use Webuzo to autoinstall WHMCS with all dependencies and look how they implemented hooks and api… And now you have also VM For Testing InvoicePlane