title: Angular : toFixed() works with one value but not with the other?
body: <p>I'm using a form with 2 inputs. Each of them call the <code>calculeSalaire()</code> function.</p>
  
  <pre><code>calculeSalaire()
  {
    this.fraisGestion = this.getFraisGestion();
    this.tauxFraisGestion = this.getTauxFraisGestion();
    this.salaireBrut = this.getSalaireBrut();
    this.salaireNet = this.getSalaireNet();
    this.chargesSalariales = this.getChargesSalariales();
    this.chargesPatronales = this.getChargesPatronales();
    this.totalPaye = this.getTotalPaye();
  }
  </code></pre>
  
  <p>All of these functions return <code>number</code>. I want to show only 2 decimal places for each of these values, that's why I use the <code>toFixed(2)</code> function. </p>
  
  <p>It works for all my functions except for this one :</p>
  
  <pre><code>getSalaireBrut()
  {
     this.salaireBrut = (this.chiffreAffaire - this.fraisGestion - 
     this.fraisPro)/(1.10)/(1.447);
  
     var salaireBruttxt = this.salaireBrut.toFixed(2);
  
     return parseFloat(salaireBruttxt);
  }
  </code></pre>
  
  <p><code>chiffreAffaire</code> is an Input</p>
  
  <p><code>fraiPro</code> is an Input</p>
  
  <p><code>fraisGestion</code> is calculated</p>
  
  <p>I don't understand why it doesn't work for the previous function, whereas it works in the function below.</p>
  
  <pre><code>getChargesSalariales()
    {
      this.chargesSalariales = this.salaireBrut*(23/100);
      var chargesSalarialtxt = this.chargesSalariales.toFixed(2);
  
      return parseFloat(chargesSalarialtxt);
    }
  </code></pre>
  
  <p>You can note that I use the <code>salaireBrut</code> value which is the one calculated by the function that didn't work.</p>
  
  <p>Do you have any ideas why this happens ?</p>