Missing index fix
if invoice not found, don't try to work on it
Fixed missing index warning