Commit d4fdcfef authored by smestry's avatar smestry

W15LKAT004, Updated the js file for validation of Size, Color, Dimension item.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101394 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9b53c91a
......@@ -6,6 +6,7 @@
var httpRequestNew;
var isServerBusyNew = false;
var parserNew;
var rowId = "";
// Changed by Sneha on 07-04-2016, for item description [End]
function getAppDateFormat()
......@@ -1468,13 +1469,52 @@
document.getElementById(""+element.id).value = (parseFloat(element.value)).toFixed(2);
return true;
}
// Working
function checkSKUValidation( actionValue )
{
var formNo = document.getElementById("FORM_NO").value;
var maxId = $('#SKUItemId tbody tr').length;
var barCodes = [];
// Changed by Sneha on 25-04-2016, for checking of Size/Color/Dimension of exisiting and new item [Start]
var itemDescr = new Array();
var count = 0;
alert("maxId===>>"+maxId);
alert("rowId===>>"+rowId);
//var rowId = (rowId=="") ? rowId=="0" : rowId;
if(maxId > rowId && rowId!= "")
{
for( dbID = 1; dbID <= maxId; dbID++)
{
var descr = document.getElementById("Detail3."+dbID+".descr").value;
itemDescr.push(descr);
//alert("itemDescr===>>"+itemDescr);
}
rowId++;
descr = document.getElementById("Detail3."+rowId+".descr").value;
//alert("descr===>>"+descr);
for (var i = 0; i <= itemDescr.length; i++)
{
if (itemDescr[i] == descr)
{
count++;
//alert("count====>>"+count);
if(count>1)
{
alert("Size/Color/Dimension can't be same as exisiting item.");
count = 0;
document.getElementById("Detail3."+rowId+".size_code_pophelp").focus();
return false;
}
}
}
}
// Changed by Sneha on 25-04-2016, for checking of Size/Color/Dimension of exisiting and new item [End]
for( dbID = 1; dbID <= maxId; dbID++)
{
......@@ -1568,6 +1608,8 @@
}
}
//Changed by Sneha on 26-04-2016, validation for size, color, dimension [Start]
if(maxId > rowId && rowId!= "")
{
var itemCode = document.getElementById("Detail3.1.item_code").value;
getItmAttribute(itemCode, maxId, "GET_ITEM_ATTRIBUTE");
//alert("valueFromServlet---"+valueFromServlet);
......@@ -1577,6 +1619,7 @@
document.getElementById("Detail3."+maxId+".size_code_pophelp").focus();
return false;
}
}
//Changed by Sneha on 26-04-2016, validation for size, color, dimension [End]
document.getElementById("action").value = actionValue;
......@@ -1666,7 +1709,8 @@
// Changed by Sneha on 30/03/2016, add new item [Start]
function addItem()
{
var rowId = maxId;
rowId = maxId;
if(document.getElementById("maxRowId").value == "")
{
document.getElementById("rowId").value = maxId.trim();
......@@ -1966,7 +2010,6 @@
$('#SKUItemId tbody').append(row);
}
function itmparntChangeNew(itemCode, action)
......@@ -1990,7 +2033,6 @@
var url = "/ibase/ProdWizItemChangeServlet?ITEMCODE="+itemCode+"&PHYATTRIBUTE1="+phyAttribute1+"&PHYATTRIBUTE2="+phyAttribute2+"&PHYATTRIBUTE3="+phyAttribute3+"&ACTION="+action;
makeRequestNew( url, setColumnValues);
}
function makeRequestNew( url, setColumnValues )
......
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