Upgrade safe way to modify converToInvoice.php

I added custom fields in line_items.js and that worked well for Quotes. I would like to have those fields preserve when I am saving the quote to an Invoice. Is there an upgrade safe way to implement the same?

Regards,
Vishal.

Yeah, just copy converToInvoice.php into the appropriate custom folder (make any changes you require in the custom converToInvoice.php) and change the link to point to that version.