Urgent fix for null dates in COGS

This prevents null dates from being entered in COGS.  Previously for books without checkpoints, null dates would be entered which is bad.

Please review in particular the change to the Fixes.sql