1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
<script type="text/javascript">
function ChangePT1()
{
var Qt=(document.FormFacture.EditQt1.value.length>0)?parseFloat(document.forms['FormFacture'].elements['EditQt1'].value);
var PU=(document.FormFacture.EditPU1.value.length>0)?parseFloat(document.forms['FormFacture'].elements['EditPU1'].value);
var PT=Qt*PU;
document.forms['FormFacture'].elements['EditPT1'].value=PT;
var total1=parseFloat(document.forms['FormFacture'].elements['total1'].value);
var total2=parseFloat(document.forms['FormFacture'].elements['total2'].value);
var totalG=total1+total2;
document.forms['FormFacture'].elements['total'].value=totalG;
}
function ChangePT1()
{
var Qt2=(document.FormFacture.EditQt2.value.length>0)?parseFloat(document.forms['FormFacture'].elements['EditQt2'].value);
var PU2=(document.FormFacture.EditPU2.value.length>0)?parseFloat(document.forms['FormFacture'].elements['EditPU2'].value);
var PT2=Qt2*PU2;
document.forms['FormFacture'].elements['EditPT2'].value=PT2;
var total1=(document.FormFacture.total1.value.length>0)?parseFloat(document.forms['FormFacture'].elements['total1'].value);
var total2=(document.FormFacture.total2.value.length>0)?parseFloat(document.forms['FormFacture'].elements['total2'].value);
var totalG=total1+total2;
document.forms['FormFacture'].elements['total'].value=totalG;
}
</script> |