Skip to content

Commit

Permalink
correction d'un bug bete au niveau de l'addition
Browse files Browse the repository at this point in the history
  • Loading branch information
mart1ver committed Aug 25, 2014
1 parent ba77840 commit 6fe8556
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ifaces/ventes.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,12 @@ function ajout() {

if (isNaN(parseInt(document.getElementById('ptot').value)) )
{
document.getElementById('ptot').value = document.getElementById('prix').value;
document.getElementById('ptot').value = document.getElementById('prix').value*document.getElementById('quantite').value;
}
else
{

document.getElementById('ptot').value=parseFloat(document.getElementById('ptot').value)+parseFloat(document.getElementById('prix').value);
document.getElementById('ptot').value=parseFloat(document.getElementById('ptot').value)+(document.getElementById('prix').value*document.getElementById('quantite').value);
}

document.getElementById('liste').innerHTML += '<li class="list-group-item"><span class="badge">'+(parseFloat(document.getElementById('prix').value)*parseFloat(document.getElementById('quantite').value)).toFixed(2)+'€'+'</span>'
Expand Down

0 comments on commit 6fe8556

Please sign in to comment.