function add()
{
var Qty1=parseInt(document.forms.form1.txtQty1.value);
if (document.forms.form1.txtQty1.value === "")
{
Qty1=0;
}
var Qty2=parseInt(document.forms.form1.txtQty2.value);
if (document.forms.form1.txtQty2.value === "")
{
Qty2=0;
}
var Qty3=parseInt(document.forms.form1.txtQty3.value);
if (document.forms.form1.txtQty3.value === "")
{
Qty3=0;
}
var Qty4=parseInt(document.forms.form1.txtQty4.value);
if (document.forms.form1.txtQty4.value === "")
{
Qty4=0;
}
var amount = Qty1+Qty2+Qty3+Qty4;
document.forms.form1.amount.value=amount;
var pri1=Qty1*22000;
var pri2=Qty2*15000;
var pri3=Qty3*7500;
var pri4=Qty4*100000;
var tot = parseFloat(pri1+pri2+pri3+pri4);
document.forms.form1.tot.value=tot.toFixed(2);
document.forms.form1.pri1.value=pri1;
document.forms.form1.pri2.value=pri2;
document.forms.form1.pri3.value=pri3;
document.forms.form1.pri4.value=pri4;
}
function add()
{
for(i=1;i<=100;i++)
{
var Qty[i]=parseInt(document.forms.form1.txtQty+i.value);
if (document.forms.form1.txtQty+i.value === "")
{
Qty[i]=0;
}
}
/*var Qty2=parseInt(document.forms.form1.txtQty2.value);
if (document.forms.form1.txtQty2.value === "")
{
Qty2=0;
}
var Qty3=parseInt(document.forms.form1.txtQty3.value);
if (document.forms.form1.txtQty3.value === "")
{
Qty3=0;
}
var Qty4=parseInt(document.forms.form1.txtQty4.value);
if (document.forms.form1.txtQty4.value === "")
{
Qty4=0;
}*/
var amount = Qty[1]+Qty[2]+Qty[3]+Qty[4];
document.forms.form1.amount.value=amount;
var pri1=Qty[1]*22000;
var pri2=Qty[2]*15000;
var pri3=Qty[3]*7500;
var pri4=Qty[4]*100000;
var tot = parseFloat(pri1+pri2+pri3+pri4);
document.forms.form1.tot.value=tot.toFixed(2);
document.forms.form1.pri1.value=pri1;
document.forms.form1.pri2.value=pri2;
document.forms.form1.pri3.value=pri3;
document.forms.form1.pri4.value=pri4;