Payment state should be set to credit_owed if payment has been taken but there are no line items

Fixes #4281