MT#5879 Fixes for invoice data - format was for old template.

And also fix for customer contract id option.