calcular sobra de divis c3 a3o de parcelas js

Solutions on MaxInterview for calcular sobra de divis c3 a3o de parcelas js by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "calcular sobra de divis c3 a3o de parcelas js"
Neele
19 Jun 2019
1function getValorParcelas(precoTotal,numeroParcelas){
2    var valorParcela            = parseFloat(precoTotal/numeroParcelas).toFixed(2);
3    var valorPrimeiraParcela    = precoTotal-(valorParcela*(numeroParcelas-1));
4
5    return { 'valor_primeira_parcela': valorPrimeiraParcela , 'valor_parcela': valorParcela, 'numero_parcelas': numeroParcelas };
6}