control uniqueness for invoice