Override 'submit' button on POS form

Which file do I need to edit in order to override the ‘submit’ button on the POS Form?

I figured out that I can just attach a server side script to that button. Probably best I avoid changing any core python files.