Possibly you want to check the CUSTREC-> field is not blank and then display a warning message inside the R-INVOPN.MAC hook. (But there isn't a sales order equivalent.)
You could also assign minimum margins to your product groups. (Stock Control, Toolbox|Stock Groups, Lowest Margin)
Or develop a script to sweep your product items before saving and warn if any items are below cost or have very low margins. I.e., using the R-ITOTAL.MAC hook and R-ORDTOT.MAC hooks.
Although, the system already has a below costs warning message in the Customize area under Alerts. However, this may be only if the entire transaction is at or below cost rather than individual items on it.