Where can I put code to customize the POS form?

Hi @daniel1

You need to create your custom page and used the same code from the pos.js file and make changes according to your requirement.
To make custom page Goto Setup > Developer > Page > New Page > select custom app’s module