code: private boolean checkAtTin(final String ptin) {
      final int checkSum = ptin.charAt(8) - '0';
      final int sum = ptin.charAt(0) - '0' + squareSum((ptin.charAt(1) - '0') * 2) //
          + ptin.charAt(2) - '0' + squareSum((ptin.charAt(3) - '0') * 2) //
          + ptin.charAt(4) - '0' + squareSum((ptin.charAt(5) - '0') * 2) //
          + ptin.charAt(6) - '0' + squareSum((ptin.charAt(7) - '0') * 2);
      final int calculatedCheckSum = (80 - sum) % 10;
      return checkSum == calculatedCheckSum;
    }
docs: check the Tax Identification Number number, country version for Austria.
  
  @param ptin vat id to check
  @return true if checksum is ok