How to disable form script/block on server without editing the file directly?

I have discovered that a certain block within a form script for a doctype in ERPNext is buggy and it’s just 6 lines long.

Commenting out these lines has not broken my dev/test setup in a any way and I would like to disable it on a live/production setup. Can I do this without having to touch the actual file on the server ...apps/erpnext/erpnext/payroll/doctype/payroll_entry/payroll_entry.js ?