Skip to content

Commit

Permalink
pesentation de l'addition
Browse files Browse the repository at this point in the history
  • Loading branch information
mart1ver committed Aug 25, 2014
1 parent 6fe8556 commit 631bbe7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ifaces/ventes.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ function ajout() {
else
{

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

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 All @@ -304,8 +304,8 @@ function ajout() {
+'<input type="hidden" id="tquantite'+parseInt(document.getElementById('nlignes').value)+'" name="tquantite'+parseInt(document.getElementById('nlignes').value)+'"value="'+document.getElementById('quantite').value+'">'
+'<input type="hidden" id="tprix'+parseInt(document.getElementById('nlignes').value)+'" name="tprix'+parseInt(document.getElementById('nlignes').value)+'"value="'+document.getElementById('prix').value+'"></li>';

document.getElementById('total').innerHTML = '<li class="list-group-item">Soit : '+document.getElementById('narticles').value+' article(s) pour : <span class="badge" style="float:right;">'+document.getElementById('ptot').value+'€</span></li>';
document.getElementById('recaptotal').innerHTML = document.getElementById('ptot').value+'€';
document.getElementById('total').innerHTML = '<li class="list-group-item">Soit : '+document.getElementById('narticles').value+' article(s) pour : <span class="badge" style="float:right;">'+parseFloat(document.getElementById('ptot').value).toFixed(2)+'€</span></li>';
document.getElementById('recaptotal').innerHTML = parseFloat(document.getElementById('ptot').value).toFixed(2)+'€';



Expand Down

0 comments on commit 631bbe7

Please sign in to comment.