Moved adding the line item before the state change so it passes the validation for that state change.