[IMP] Invoice_state inverse function