Implemented save logic for invoice template