Commit d5cb7a15 authored by smestry's avatar smestry

Updated the js file to display the discount field in SO and PO Wizard.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@104456 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a717ce0d
......@@ -2283,10 +2283,33 @@ function checkRate()
continue;
}
}
// Added by Sneha on 20-01-2017, for validation of discount [Start]
else if(document.getElementById("Detail3."+i+".discount").value > 100.00)
{
if(document.getElementById("Detail3."+i+".selectbox").checked == true)
{
flag = 2;
break;
}
else
{
continue;
}
}
else if(document.getElementById("Detail3."+i+".discount").value == "")
{
document.getElementById("Detail3."+i+".discount").value = "0.0";
}
else
{
var discount = parseFloat(document.getElementById("Detail3."+i+".discount").value);
document.getElementById("Detail3."+i+".discount").value = discount.toFixed(2);
///alert(document.getElementById("Detail3."+i+".discount").value);
continue;
}
// Added by Sneha on 20-01-2017, for validation of discount [End]
}
......@@ -2300,6 +2323,16 @@ function checkRate()
document.getElementById("buttonreplacement").style.display = "";
return true;
}
// Added by Sneha on 20-01-2017, for validation of discount [Start]
else if(flag == 2)
{
var valItemCode = document.getElementById("Detail3."+i+".item_code").value;
alert("Discount is greater than 100% for the Product " + valItemCode + ".");
document.getElementById("Detail3."+i+".discount").focus();
return false;
}
// Added by Sneha on 20-01-2017, for validation of discount [End]
else
{
alert("Record "+i+" has 0 amount...! can not save the record.");
......
......@@ -836,6 +836,7 @@ var sorttable = "";
}
}
function setCheckedTrue()
{
var tot=document.getElementById("fld").value;
......@@ -3039,7 +3040,6 @@ var sorttable = "";
continue;
}
}
/*if(isValidDate("Detail3."+i+".dsp_date"))
{
""
......@@ -3050,14 +3050,37 @@ var sorttable = "";
document.getElementById("Detail3."+i+".dsp_date").focus();
return false;
} */
// Added by Sneha on 20-01-2017, for validation of discount [Start]
else if(document.getElementById("Detail3."+i+".discount").value > 100.00)
{
if(document.getElementById("Detail3."+i+".selectbox").checked == true)
{
flag = 2;
break;
}
else
{
continue;
}
}
else if(document.getElementById("Detail3."+i+".discount").value == "")
{
document.getElementById("Detail3."+i+".discount").value = "0.0";
}
else
{
continue;
var discount = parseFloat(document.getElementById("Detail3."+i+".discount").value);
document.getElementById("Detail3."+i+".discount").value = discount.toFixed(2);
//alert(document.getElementById("Detail3."+i+".discount").value);
continue;
}
// Added by Sneha on 20-01-2017, for validation of discount [End]
}
if(flag==0)
{
document.getElementById("finish").style.display = "none"; // to undisplay
document.getElementById("previous").style.display = "none"; // to undisplay
document.getElementById("errorActivityTable").style.display = "none";
......@@ -3066,6 +3089,16 @@ var sorttable = "";
setActionVal( "finish" );
return true;
}
// Added by Sneha on 20-01-2017, for validation of discount [Start]
else if(flag == 2)
{
var valItemCode = document.getElementById("Detail3."+i+".item_code").value;
alert("Discount is greater than 100% for the Product " + valItemCode + ".");
document.getElementById("Detail3."+i+".discount").focus();
return false;
}
// Added by Sneha on 20-01-2017, for validation of discount [End]
else
{
//alert("Record "+i+" has 0 amount...! can not save the record.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment