How to create a invoice generating app?

Or this: