[MERGE] fix invoice state for refunds