Typecasting quantity to integer