How can I customize the invoice fields and template

How can I customize the invoice fields and template. I want o add some more fields and change the design of the template

You need to create some XML files to change the layout and content of your invoice.
go to Settings → Technical - > Reporting - > Reports and search for account.invoice as model.
There you will find the definition of the report. In form view on top right cornere you see a button QWe Views. This is the definition of the content.