Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

104
Vistas
I must avoid entering letters on my digipas

I have a small problem. When I enter a new transfert of 269 euros with the account bank number BE072750044-35066. I have to introduce a code of confirmation. The code is 350269.

enter image description here

The figures 350 are the last 5 figures of the bank account number -> BE072750044-35066. And the 269 represents the amount for the new transfert.

Another example, if the new transfert was of 350 euros. We will have 350350.

enter image description here

Now my problem, if I have an account bank with a letter at the end. FR5940802053780006178110K61.

The problem is that I retrieve 10K269, but the user must enter only numbers on the digipas. How to avoid this problem for the user, please?

enter image description here

getTokenTwoAdd(nt) {
    var partOne, partTwo, absoluteAmount;
    partOne = (nt.iban.substr(nt.iban.length - 5)).substring(0, 3);
    absoluteAmount = Math.abs(nt.amount);
    absoluteAmount = parseInt(absoluteAmount);
    partTwo = ((absoluteAmount < 100) ? this.helpers.addLeadingZeroesLeft(absoluteAmount, 3) : absoluteAmount) + "";
    partTwo = partTwo.substring(0, 3);
    console.log("Iban number, slice => " + partOne);
    console.log("Iban number => " + nt.iban);
    console.log("Amount => " + absoluteAmount);

    return partOne + partTwo;
}

The variable partOne represents the account bank number with the slice

The variable nt.iban is the accout bank number

The variable absoluteAmount is the amount for the new transfert

enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

To get rid of any characters that are not digits, you could use

partOne = nt.iban.replace(/\D+/g, '').substr(-5, 3);

where \D+ matches one or more non-digit characters.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda