finally got more invoice functionality working