inventory.js: Fix for empty dates