In this situation, one way of locking a single field such as the 'Quantity' field on an Invoice is to change it into a repeating field with 2 repetitions. In effect, this hidden second repetition "watches" over what you do with the first...
Redefining the Quantity field also involves using an auto-enter calc. to populate its second repetition with a "copy of the value" that's entered into the first. Then you add field-validation which checks that both repetition values are the same.
On an Invoice layout, only the first repetition is visible. Any attempt to change the 'Quantity' is therefore challenged. I've provided an example file to show how this works. As an extension to this idea, it would be possible to provide a "Please let me" button/script to let a user make a "genuine" alteration - the script could operate in a few ways, one way being that it captures the initial value, the userName etc. (for auditing purpose say), then sets the second repetition to match the first, thereby permitting the change to be accepted.
Regards,
Ralph
Locking_a_Field.zip