Master wmsstaging3 jco

Depends also on wmsstaging2.  See commits.  
It misses a comment here, to explain this write. You could add the following one for example:
#if the product has to be ordered earlier than the found available PO, we replace the purchase date on the order to avoid ordering it too late