private boolean checkItVatId ( final String pvatId ) { final int checkSum = pvatId . charAt ( 12 ) - ' ' ; final int sum = pvatId . charAt ( 2 ) - ' ' + squareSum ( ( pvatId . charAt ( 3 ) - ' ' ) * 2 ) + pvatId . charAt ( 4 ) - ' ' + squareSum ( ( pvatId . charAt ( 5 ) - ' ' ) * 2 ) + pvatId . charAt ( 6 ) - ' ' + squareSum ( ( pvatId . charAt ( 7 ) - ' ' ) * 2 ) + pvatId . charAt ( 8 ) - ' ' + squareSum ( ( pvatId . charAt ( 9 ) - ' ' ) * 2 ) + pvatId . charAt ( 10 ) - ' ' + squareSum ( ( pvatId . charAt ( 11 ) - ' ' ) * 2 ) ; final int calculatedCheckSumIt = 10 - sum % 10 ; return checkSum == calculatedCheckSumIt ; }
check the VAT identification number country version for Italy .