fixed: correctly refusing to produce invoice if invalid