Urgent fix for null dates in COGS

--HG--
extra : source : 6d35494425a89d0706130a7dae64af8b41e39300
Merge pull request #355 from einhverfr/master

Urgent fix for null dates in COGS