Automate invoice generation

Automate invoice generation

I want to create an invoice button by writing a custom function. so that I will trigger whenever I want to make an invoice for that module I  have to click this. I need help with the custom function.

Thank You,
S.Manikanta