Automate Invoice Creation

Automate Invoice Creation

Does anyone have code to automate invoice or estimate creation in CRM?