for (let i = 0; i < 10; i++) {
      // Extract the next digit and implement the algorithm
      sum = (Number(vat.charAt(i)) + product) % 10;
      if (sum === 0) {
        sum = 10;