After some thought, I have posted in meditations. It is certainly not enough code to make a module out of, and I'm defiantly no guru!
See Automatic Sage Line 50 stock adjustments
Hopefully it will help someone who is having the same ideas I have been having.