Commit 2a0a597f authored by spawar's avatar spawar

addded in fields pophelp and Updated validations for barcodes and item selection


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99554 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 8dc6a0cb
......@@ -1545,31 +1545,40 @@ function setCheckedTrue()
{
var tot=document.getElementById("fld").value;
var count=0;
var flag = false;
//alert("sdfs"+count);
for(var i=1;i<=tot; i++)
{
//alert("sdfsdf");
if(document.getElementById("Detail2."+i+".quantity") == undefined || document.getElementById("Detail2."+i+".quantity").value == 0)
{
// alert("qty0");
continue;
}
else if(document.getElementById("Detail2."+i+".quantity").value != "")
{
document.getElementById("Detail2."+i+".selectbox").checked = true;
document.getElementById("Detail2."+i+".selectbox").value = true;
flag = true;
}
else
{
//alert(count);
count++;
}
}
if(count==tot)
{
alert("Please enter at least 1 quantity...");
//alert("Please enter at least 1 quantity...");
alert("Please select at least one item...");
return false;
}
else if(!flag)
{
alert("Please enter at least 1 quantity...");
return false;
}
else
{
document.getElementById("NextButton").style.display = "none"; // to undisplay
......
......@@ -179,6 +179,11 @@
fieldValue = document.getElementById("prodPriceList"+idNum).value;
}
}
//Changed by samadhan on 24/12/2015 for brand
else if (field == "phy_attrib_24")
{
fieldValue = document.getElementById("Detail2."+ dbID +".phy_attrib_24").value;
}
var url = "/ibase/webitm/jsp/ProdWizardItemTypeList.jsp?LOGIN_ID="+loginId
+"&FIELDS="+field+"&DBID="+dbID+"&FIELDNAME="+fieldName+"&IDNUM="+idNum+"&FIELDVALUE="+fieldValue+",";
......@@ -256,6 +261,12 @@
document.getElementById("prodPriceList"+idNum).value = fieldId;
}
}
else if (field == "phy_attrib_24")
{
document.getElementById("Detail2.1.phy_attrib_24").value = fieldId;
document.getElementById("Detail2.1.brand_descr").value = fieldValue;
}
else if (field == "item_code")
{
// document.getElementById("Detail1.1.item_code").value = fieldValue ;
......@@ -1308,7 +1319,9 @@
}
else
{
langDtl += "||" + langCodes + ":" + itmCodes + ":" + langCodeDescs + ":" + langShDescs + ":" + langLongDescs;
//Changed by Samadhan on 23/12/2015 for solve array index out of exception
//langDtl += "||" + langCodes + ":" + itmCodes + ":" + langCodeDescs + ":" + langShDescs + ":" + langLongDescs;
langDtl += "||" + langCodes + ":" + itmCodes + ":" + langCodeDescs + ":" + langShDescs + ":" + langLongDescs + ":1";
}
}
......@@ -1363,7 +1376,7 @@
{
var formNo = document.getElementById("FORM_NO").value;
var maxId = $('#SKUItemId tbody tr').length;
var barCodes = [];
for( dbID = 1; dbID <= maxId; dbID++)
{
if (document.getElementById("Detail"+formNo+"."+dbID+".selectbox").checked)
......@@ -1400,6 +1413,27 @@
return false;
}
// Added by parikshit on 17/7/15 to make alert end
// Added by Samadhan on 28/12/2015 for check duplicate barcodes start
else
{
//alert(dbID);
//var barcode = barCodes.pop(document.getElementById("Detail"+formNo+"."+dbID+".item_barcode").value);
//alert("pop:"+barcode);
var curBarCode = document.getElementById("Detail"+formNo+"."+dbID+".item_barcode").value;
//alert(curBarCode);
//alert($.inArray(curBarCode, barCodes));
//alert(barCodes);
for (var i = 0; i < barCodes.length; i++)
{
if(barCodes[i]==curBarCode)
{
alert("Please Enter Different Barcode for Product '"+ document.getElementById("Detail"+formNo+"."+dbID+".descr").value +"'.");
return false;
}
}
barCodes.push(document.getElementById("Detail"+formNo+"."+dbID+".item_barcode").value);
}
// Added by Samadhan on 28/12/2015 for check duplicate barcodes end
}
}
document.getElementById("action").value = actionValue;
......
......@@ -36,7 +36,7 @@
"<table class='tableClass' id='sizeDtl' width='100%' style='text-align: left;'>" +
"<thead><tr class='thClass'><th style='width:10%'><input type='checkbox' id='chkSizeDtl' onclick='checkAllSizes(this)'></th><th>Sizes</th><th>Desc</th></tr></thead>" +
"<thead><tr class='thClass'><th style='width:10%'><input type='checkbox' id='chkSizeDtl' onclick='checkAllSizes(this)'></th><th>Sizes</th><th>Desc</th><th>Display Desc</th></tr></thead>" +//Display descr Added by Samadhan on 21/12/2015
"<tbody class='table-body fadeInDown'>" +
......@@ -559,6 +559,14 @@
document.getElementById("Detail1.1.color_codes").focus();
return false;
}
//Changed by samadhan on 22/12/2015 for brand validation Start
else if (document.getElementById("Detail1.1.item_phy_attrib_24").value == "")
{
alert("Please Select Brand.");
document.getElementById("Detail1.1.item_phy_attrib_24").focus();
return false;
}
//Changed by samadhan on 22/12/2015 for brand validation end
/*else if (document.getElementById("Detail1.1.size_codes").value == "")
{
alert("Please Select Size Availability.");
......@@ -810,7 +818,12 @@
{
document.getElementById("color_code_descr").innerHTML = colors;
}
//Changed by Samadhan on 22/12/2015 for brand
var brandDescr = document.getElementById("Detail1.1.brand_descr").value;
if (brandDescr != "")
{
document.getElementById("brand_descr").innerHTML = brandDescr;
}
// Added by Parikshit Kumbhar on 08/05/2015 [for language field setting the values] Start
var tax = document.getElementById("Detail1.1.tax").value;
var tax_desc = document.getElementById("Detail1.1.tax_desc").value;
......
......@@ -703,7 +703,7 @@
{
var maxId = $('#SKUItemId tbody tr').length;
var check = 0;
var barCodes = [];
for( dbID = 1; dbID <= maxId; dbID++)
{
if (document.getElementById("Detail2."+dbID+".selectbox").checked)
......@@ -740,10 +740,31 @@
document.getElementById("Detail2."+dbID+".item_barcode").focus();
return false;
}
// Added by parikshit on 17/7/15 to make alert end
// Added by parikshit on 17/7/15 to make alert end
// Added by Samadhan on 28/12/2015 for check duplicate barcodes start
else
{
//var barcode = barCodes.pop(document.getElementById("Detail2."+dbID+".item_barcode").value);
var curBarCode = document.getElementById("Detail2."+dbID+".item_barcode").value;
//if(barcode == curBarCode)
//{
//alert("Please Enter Different Barcode for Product '"+ document.getElementById("Detail2."+dbID+".item_descr").value +"'.");
// return false;
//}
for (var i = 0; i < barCodes.length; i++)
{
if(barCodes[i]==curBarCode)
{
alert("Please Enter Different Barcode for Product '"+ document.getElementById("Detail2."+dbID+".item_descr").value +"'.");
return false;
}
}
barCodes.push(document.getElementById("Detail2."+dbID+".item_barcode").value);
}
// Added by Samadhan on 28/12/2015 for check duplicate barcodes end
}
}
if (check == 0)
{
alert("Please Select Product.");
......
......@@ -126,7 +126,11 @@
fieldValue = document.getElementById("Detail2."+ dbID +".tax").value;
}
//Added by Parikshit Kumbhar on date:15/04/2015 [ Added new condition ] Ends
//Changed by samadhan on 24/12/2015 for brand
else if (field == "item_phy_attrib_24")
{
fieldValue = document.getElementById("Detail1."+ dbID +".item_phy_attrib_24").value;
}
/*$.ajax({
async: false,
url: url,
......@@ -154,7 +158,7 @@
*/
function displayValue( fieldId, fieldValue, seldbID, field, idNum )
{
if (field == "item_parnt")
if (field == "item_parnt")
{
document.getElementById("Detail1.1.item_parnt").value = fieldId;
document.getElementById("Detail1.1.item_parnt_desc").value = fieldValue;
......@@ -228,6 +232,14 @@
document.getElementById("color_code_descr").innerHTML = fieldValue;
}
else if (field == "item_phy_attrib_24")
{
document.getElementById("Detail1.1.item_phy_attrib_24").value = fieldId;
document.getElementById("Detail1.1.brand_descr").value = fieldValue;
document.getElementById("brand_descr").innerHTML = fieldValue;
}
else if (field == "size_codes")
{
document.getElementById("Detail1.1.size_codes").value = fieldId;
......@@ -498,7 +510,7 @@
if( fieldId == "")
{
if (field == "language_desc" || field == "item_ser" || field == "item_category" || field == "supplier_code" || field == "site_codes" || field == "color_codes" )
if (field == "language_desc" || field == "item_ser" || field == "item_category" || field == "supplier_code" || field == "site_codes" || field == "color_codes" || field =="item_phy_attrib_24" || field =="phy_attrib_24")
{
alert("No Selection Made! \nPlease Select the Code!");
return false;
......
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