Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

99
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda