Invoice creation error

I get this error when I am creating invoice with advance amount for a currency which is not the default company currency. I think there is a multiplication between advance allocated amount and advance exchange rate.
The error is TypeError: unsupported operand type(s) for *: ‘NoneType’ and ‘int’