Commit d10b7fb9 authored by wansari's avatar wansari

W16FKAT002 Updated JS for Edit mode issue and calendar and quantity textfield issue


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@104042 ce508802-f39f-4f6c-b175-0d175dae99d5
parent aac64437
...@@ -1147,7 +1147,7 @@ function sidebar() ...@@ -1147,7 +1147,7 @@ function sidebar()
/*"<label id = 'item_parent_rate"+x+"'></label>"+ /*"<label id = 'item_parent_rate"+x+"'></label>"+
"<input type='hidden' id='itmdescription"+x+"' class='editDisplayClass' maxlength='0' ISCHANGED='false' readOnly = '1' style='width: 400px'/>"+*/ "<input type='hidden' id='itmdescription"+x+"' class='editDisplayClass' maxlength='0' ISCHANGED='false' readOnly = '1' style='width: 400px'/>"+*/
"</td>"+ "</td>"+
"<td width = '20%'>"+ "<td align = 'right' width = '20%'>"+
" <strong>Order Date: <span id='dlv_date_span"+x+"'> </span></strong> <input type='hidden' name='dlv_date"+x+"' readOnly='1' "+ " <strong>Order Date: <span id='dlv_date_span"+x+"'> </span></strong> <input type='hidden' name='dlv_date"+x+"' readOnly='1' "+
"id='dlv_date"+x+"' style='width: 28%;font-size:12px' />"+ "id='dlv_date"+x+"' style='width: 28%;font-size:12px' />"+
"</td>"+ "</td>"+
...@@ -1437,12 +1437,12 @@ function setColumnValues( retVal ) ...@@ -1437,12 +1437,12 @@ function setColumnValues( retVal )
//tr = tr + "<td><input type='text' onkeyup='calQuantity(this.id,"+xlen+","+xrows+","+qt+","+fld+","+t+")' id='Detail2."+fld+".quantity' name='Detail2."+fld+".quantity' title='"+tool[tip].childNodes[0].nodeValue+"' onkeypress='return isNumberKey(event)' maxlength='4' ISCHANGED='true' class='editInputClass' style='width:33px; text-align: right;' /></td>"; //tr = tr + "<td><input type='text' onkeyup='calQuantity(this.id,"+xlen+","+xrows+","+qt+","+fld+","+t+")' id='Detail2."+fld+".quantity' name='Detail2."+fld+".quantity' title='"+tool[tip].childNodes[0].nodeValue+"' onkeypress='return isNumberKey(event)' maxlength='4' ISCHANGED='true' class='editInputClass' style='width:33px; text-align: right;' /></td>";
if (tranType == "T") if (tranType == "T")
{ {
tr = tr + "<td><input type='text' onchange='calQuantity(this.id,"+xlen+","+xrows+","+qt+","+fld+","+t+"); sendInfo(this.id);' id='Detail2."+fld+".quantity' name='Detail2."+fld+".quantity' title='"+tool[tip].childNodes[0].nodeValue+"' onkeypress='return isQuantity(event)' maxlength='4' ISCHANGED='true' class='editInputClass' style='width:33px; text-align: right;'" + tr = tr + "<td><input type='text' onchange='calQuantity(this.id,"+xlen+","+xrows+","+qt+","+fld+","+t+"); sendInfo(this.id);' id='Detail2."+fld+".quantity' name='Detail2."+fld+".quantity' title='"+tool[tip].childNodes[0].nodeValue+"' onkeypress='return isQuantity(event)' maxlength='4' ISCHANGED='true' class='editInputClass' style='width:100%;border:none;text-align: right; outline:none'" +
" /></td>"; " /></td>";
} }
else else
{ {
tr = tr + "<td><input type='text' onchange='calQuantity(this.id,"+xlen+","+xrows+","+qt+","+fld+","+t+"); sendInfo(this.id);' id='Detail2."+fld+".quantity' name='Detail2."+fld+".quantity' title='"+tool[tip].childNodes[0].nodeValue+"' onkeypress='return isQuantity(event)' maxlength='4' ISCHANGED='true' class='editInputClass' style='width:33px; text-align: right;' value='' " + tr = tr + "<td><input type='text' onchange='calQuantity(this.id,"+xlen+","+xrows+","+qt+","+fld+","+t+"); sendInfo(this.id);' id='Detail2."+fld+".quantity' name='Detail2."+fld+".quantity' title='"+tool[tip].childNodes[0].nodeValue+"' onkeypress='return isQuantity(event)' maxlength='4' ISCHANGED='true' class='editInputClass' style='width:100%;border:none;text-align: right; outline:none' value='' " +
" /></td>"; " /></td>";
} }
//Changed by samadhan on 30/06/2015 D15CKAT026 End //Changed by samadhan on 30/06/2015 D15CKAT026 End
...@@ -2756,7 +2756,7 @@ function sidebarNew() ...@@ -2756,7 +2756,7 @@ function sidebarNew()
/*"<label id = 'item_parent_rate"+x+"'></label>"+ /*"<label id = 'item_parent_rate"+x+"'></label>"+
"<input type='hidden' id='itmdescription"+x+"' class='editDisplayClass' maxlength='0' ISCHANGED='false' readOnly = '1' style='width: 400px'/>"+*/ "<input type='hidden' id='itmdescription"+x+"' class='editDisplayClass' maxlength='0' ISCHANGED='false' readOnly = '1' style='width: 400px'/>"+*/
"</td>"+ "</td>"+
"<td width = '20%'>"+ "<td align='right' width = '20%'>"+
" <strong>Order Date: <span id='dlv_date_span"+x+"'> </span></strong> <input type='hidden' name='dlv_date"+x+"' readOnly='1' "+ " <strong>Order Date: <span id='dlv_date_span"+x+"'> </span></strong> <input type='hidden' name='dlv_date"+x+"' readOnly='1' "+
"id='dlv_date"+x+"' style='width: 28%;font-size:12px' />"+ "id='dlv_date"+x+"' style='width: 28%;font-size:12px' />"+
"</td>"+ "</td>"+
...@@ -3134,12 +3134,12 @@ function setColumnValuesNew( retVal ) ...@@ -3134,12 +3134,12 @@ function setColumnValuesNew( retVal )
if (itemQtys[1] == "" || itemQtys[1] == "undefined" || itemQtys[1] == null ) if (itemQtys[1] == "" || itemQtys[1] == "undefined" || itemQtys[1] == null )
{ {
qtytr = +qtytr + 0; qtytr = +qtytr + 0;
tr = tr + "<td><input type='text' onchange='calQuantity(this.id,"+xlen+","+xrows+","+qt+","+fld+","+t+"); sendInfo(this.id);' id='Detail2."+fld+".quantity' name='Detail2."+fld+".quantity' title='"+tool[tip].childNodes[0].nodeValue+"' onkeypress='return isQuantity(event)' maxlength='4' ISCHANGED='true' class='editInputClass' style='width:33px; text-align: right;' value='"+0+"' /></td>"; tr = tr + "<td><input type='text' onchange='calQuantity(this.id,"+xlen+","+xrows+","+qt+","+fld+","+t+"); sendInfo(this.id);' id='Detail2."+fld+".quantity' name='Detail2."+fld+".quantity' title='"+tool[tip].childNodes[0].nodeValue+"' onkeypress='return isQuantity(event)' maxlength='4' ISCHANGED='true' class='editInputClass' style='width:100%;border:none;text-align: right; outline:none' value='"+0+"' /></td>";
} }
else else
{ {
qtytr = +qtytr + +itemQtys[1]; qtytr = +qtytr + +itemQtys[1];
tr = tr + "<td><input type='text' onchange='calQuantity(this.id,"+xlen+","+xrows+","+qt+","+fld+","+t+"); sendInfo(this.id);' id='Detail2."+fld+".quantity' name='Detail2."+fld+".quantity' title='"+tool[tip].childNodes[0].nodeValue+"' onkeypress='return isQuantity(event)' maxlength='4' ISCHANGED='true' class='editInputClass' style='width:33px; text-align: right;' value='"+itemQtys[1]+"' /></td>"; tr = tr + "<td><input type='text' onchange='calQuantity(this.id,"+xlen+","+xrows+","+qt+","+fld+","+t+"); sendInfo(this.id);' id='Detail2."+fld+".quantity' name='Detail2."+fld+".quantity' title='"+tool[tip].childNodes[0].nodeValue+"' onkeypress='return isQuantity(event)' maxlength='4' ISCHANGED='true' class='editInputClass' style='width:100%;border:none;text-align: right; outline:none' value='"+itemQtys[1]+"' /></td>";
} }
tr = tr + "<input type = 'hidden' value = "+tabNum+" id='Detail2."+fld+".form_no' name='Detail2."+fld+".form_no' ></input>"; tr = tr + "<input type = 'hidden' value = "+tabNum+" id='Detail2."+fld+".form_no' name='Detail2."+fld+".form_no' ></input>";
...@@ -3809,7 +3809,15 @@ function pageLoadDtl1() ...@@ -3809,7 +3809,15 @@ function pageLoadDtl1()
} }
} }
orderValue = orderValue.substring(0,orderValue.length-1); //orderValue = orderValue.substring(0,orderValue.length-1);
var n = orderValue.indexOf("+");
if(n != -1)
{
orderValue = orderValue.substring(0,n);
}
console.log("PUrchase Order is="+orderValue);
if(orderValue != null && orderValue.trim().length > 0) if(orderValue != null && orderValue.trim().length > 0)
{ {
getPoDetail1(orderValue, "GET_PURC_DET_1", "T"); getPoDetail1(orderValue, "GET_PURC_DET_1", "T");
...@@ -4143,7 +4151,7 @@ function itemChange(field) ...@@ -4143,7 +4151,7 @@ function itemChange(field)
if(fieldValue.trim() == null || fieldValue.trim() == "") if(fieldValue.trim() == null || fieldValue.trim() == "")
{ {
document.getElementById("itmcode"+index).value = ""; document.getElementById("itmcode"+index).value = currData.trim();
document.getElementById("AddButton").style.pointerEvents = "auto"; document.getElementById("AddButton").style.pointerEvents = "auto";
return false; return false;
} }
......
...@@ -1074,7 +1074,7 @@ var sorttable = ""; ...@@ -1074,7 +1074,7 @@ var sorttable = "";
//alert("Inside item change currData=["+currData+"]fieldValue=["+fieldValue+"]"); //alert("Inside item change currData=["+currData+"]fieldValue=["+fieldValue+"]");
if(fieldValue.trim() == null || fieldValue.trim() == "") if(fieldValue.trim() == null || fieldValue.trim() == "")
{ {
document.getElementById("itmcode"+index).value = ""; document.getElementById("itmcode"+index).value = currData.trim();
document.getElementById("AddButton").style.pointerEvents = "auto"; document.getElementById("AddButton").style.pointerEvents = "auto";
return false; return false;
} }
...@@ -1184,84 +1184,7 @@ var sorttable = ""; ...@@ -1184,84 +1184,7 @@ var sorttable = "";
x++; x++;
document.getElementById("tabs").value=x; document.getElementById("tabs").value=x;
var a="<h3 onclick='run("+x+")' class = 'accordian-Header' >" + var a = getSidePanel(x);
"<table>"+
"<tr>"+
"<td>"+
"<img src='' id = 'cloths"+x+"' height='40' width='40' style='float: left;border-radius: 90%;visibility:hidden;margin-left: -20px;' onmouseover='openImage(this,"+x+")' ></img>"+
"</td>"+
"<td style='width:98%;'>"+
"<table style = 'font-size:14px'>"+
"<tr>"+
"<td><label id='main"+x+"' style='background-color: transparent;'></label></td>"+
"<input type='hidden' id='display' value='0' />"+
"</tr>"+
"<tr>"+
"<td><label id = 'pieces"+x+"'></label><label id = 'rate"+x+"'></label></td>"+
"</tr>"+
"</table>"+
"</td>"+
"<td align = 'right' height='50'>"+
//"<img src='/ibase/webitm/images/remove.png' id = 'remove"+x+"' height='20' width='17' style='background-color:red;float: right;visibility: hidden' onclick = 'event.stopPropagation();javascript:closeAccordian("+x+")' ></img>"+
/*"<span class='closeDetailBtn' title='Add New' id='remove"+x+"' name='AddButton' onclick='event.stopPropagation();javascript:closeAccordian("+x+")' style = 'visibility: hidden'>"+
"<p class='close'>x</p>"+
"</span>"+*/
"<span title='Delete' style='visibility: hidden;display: block; top: 20px;right:10px' currdomid='1' class='deleteDetailBtn' onclick='event.stopPropagation();javascript:closeAccordian("+x+")' id='remove"+x+"'>"+
"<p class='remove' title='Delete'>"+
"<img src='/ibase/webitm/images/remove.png' class='removeImg'></img>"+
"</p>"+
"</span>"+
"</td>"+
"<input type = 'hidden' id = 'tab_no"+x+"' value=''></input>"+
"</tr>"+
"</table>"+
"</h3>"+
"<div style='padding: 2px 5px 7px' >"+
"<div id='suppDtlDiv"+x+"' style='height: auto; overflow: auto; margin-left: 0px; width:100%;'>"+
"<table id='itemDtl' style='width:100%;font-size:14px'>"+
"<div >"+
"<tr>"+
"<td align='right' width = '5%'>"+
"Product :"+
"</td>"+
"<td width = '20%'>"+
"<div style='position:relative; width: 90%;'>"+
"<input type='text' class='editInputClass' name='itmcode"+x+"' id='itmcode"+x+"' " +
"onkeyup=\"getAutocompleteData(this,'item_code');\" " +
"onblur=\"javascript:itemChange('item_code');\" " +
"onfocus=\"javascript:setCurrData('itmcode"+x+"');\" " +
"style='width: 90%;'></input>"+
"<input type='hidden' id='multisel"+x+"' class='editDisplayClass' maxlength='0' ISCHANGED='false' readOnly = '1' style='margin-left: -9px;width: 400px' value='' />"+
"<div style='float: right;'>"+
"<a href='javascript:callItemPopup("+x+")' style='float: left;text-decoration: none;'>"+
"<img src='/ibase/webitm/images/pophelp.png' style='margin-left: -5px;margin-top: 3px;' title='Select Item Code'/>"+
"</a>"+
"</div>"+
"</div>"+
"</td>" +
"<td align='right' width = '10%'> Rate: " +
"</td>"+
"<td width = '10%'>" +
"<label id = 'item_parent_rate"+x+"'></label>"+
"<input type='hidden' id='itmdescription"+x+"' class='editDisplayClass' maxlength='0' ISCHANGED='false' readOnly = '1' style='width: 400px'/>"+
"</td>"+
"<td width = '20%'>"+
"Despatch Date: <input type='text' class='input_editable' size='8' value='' name='dspdate"+x+"' id='dspdate"+x+"' onkeydown = 'return false;' maxlength='8' placeholder = 'DD/MM/YY' onchange=\"javascript:setDespDate('"+x+"');\" /> "+
"<img border='0' src='/ibase/webitm/images/calender.png' style = 'margin-bottom:-5px;margin-left:-1px;cursor: hand;' id='dspdate"+x+"' name='dspdate"+x+"' onClick=\"javascript:setDate('dspdate"+x+"');\" /> "+
"</td>"+
"<tr>"+
"</div>"+
"</table>"+
"</div>"+
"<input type='hidden' id = 'deleteAccordian"+x+"' />"+
"<div class = 'totalQuantity' align = 'right'>" +
"<b>Total Quantity: </b><span id = 'sum"+x+"'></span>" +
"</div>"
"</div>";
$("#accordion").append(a); $("#accordion").append(a);
$( "#accordion" ).accordion('destroy').accordion(); $( "#accordion" ).accordion('destroy').accordion();
...@@ -1285,15 +1208,6 @@ var sorttable = ""; ...@@ -1285,15 +1208,6 @@ var sorttable = "";
});*/ });*/
//Changed by wasim to scroll for active tab //Changed by wasim to scroll for active tab
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1;
var yyyy = today.getYear() % 100;
if(dd<10){dd='0'+dd}
if(mm<10){mm='0'+mm}
var today = dd+'/'+mm+'/'+yyyy;
//document.getElementById("dlv_date"+x+"").value = document.getElementById("ord_date_m").value; //document.getElementById("dlv_date"+x+"").value = document.getElementById("ord_date_m").value;
//document.getElementById("dlv_date_span"+x+"").innerHTML = document.getElementById("ord_date_m").value; //document.getElementById("dlv_date_span"+x+"").innerHTML = document.getElementById("ord_date_m").value;
...@@ -1567,12 +1481,12 @@ var sorttable = ""; ...@@ -1567,12 +1481,12 @@ var sorttable = "";
if (tranType == "T") if (tranType == "T")
{ {
tr = tr + "<td><input type='text' onchange='calQuantity(this.id,"+xlen+","+xrows+","+qt+","+fld+","+t+"); sendInfo(this.id);' id='Detail2."+fld+".quantity' name='Detail2."+fld+".quantity' title='"+tool[tip].childNodes[0].nodeValue+"' onkeypress='return isQuantity(event)' maxlength='4' ISCHANGED='true' class='editInputClass' style='width:33px; text-align: right;'" + tr = tr + "<td><input type='text' onchange='calQuantity(this.id,"+xlen+","+xrows+","+qt+","+fld+","+t+"); sendInfo(this.id);' id='Detail2."+fld+".quantity' name='Detail2."+fld+".quantity' title='"+tool[tip].childNodes[0].nodeValue+"' onkeypress='return isQuantity(event)' maxlength='4' ISCHANGED='true' class='editInputClass' style='width:100%;border:none;text-align: right; outline:none'" +
" /></td>"; " /></td>";
} }
else else
{ {
tr = tr + "<td><input type='text' onchange='calQuantity(this.id,"+xlen+","+xrows+","+qt+","+fld+","+t+"); sendInfo(this.id);' id='Detail2."+fld+".quantity' name='Detail2."+fld+".quantity' title='"+tool[tip].childNodes[0].nodeValue+"' onkeypress='return isQuantity(event)' maxlength='4' ISCHANGED='true' class='editInputClass' style='width:33px; text-align: right;' value='1' " + tr = tr + "<td><input type='text' onchange='calQuantity(this.id,"+xlen+","+xrows+","+qt+","+fld+","+t+"); sendInfo(this.id);' id='Detail2."+fld+".quantity' name='Detail2."+fld+".quantity' title='"+tool[tip].childNodes[0].nodeValue+"' onkeypress='return isQuantity(event)' maxlength='4' ISCHANGED='true' class='editInputClass' style='width:100%;border:none;text-align: right; outline:none' value='1' " +
" /></td>"; " /></td>";
} }
...@@ -2196,83 +2110,7 @@ var sorttable = ""; ...@@ -2196,83 +2110,7 @@ var sorttable = "";
x++; x++;
document.getElementById("tabs").value=x; document.getElementById("tabs").value=x;
var a="<h3 onclick='run("+x+")' class = 'accordian-Header'>" + var a = getSidePanel(x);
"<table>"+
"<tr>"+
"<td>"+
"<img src='' id = 'cloths"+x+"' height='40' width='40' style='float: left;border-radius: 90%;margin-left: -20px;' onmouseover='openImage(event,"+x+")' ></img>"+
"</td>"+
"<td style='width:98%;'>"+
"<table style = 'font-size:14px'>"+
"<tr>"+
"<td><label id='main"+x+"' style='background-color: transparent;'></label></td>"+
"<input type='hidden' id='display' value='0' />"+
"</tr>"+
"<tr>"+
"<td><label id = 'pieces"+x+"'></label><label id = 'rate"+x+"'></label></td>"+
"</tr>"+
"</table>"+
"</td>"+
"<td align = 'right'>"+
//"<img src='/ibase/webitm/images/remove.png' id = 'remove"+x+"' height='20' width='17' style='background-color:red;float: right;visibility: hidden' onclick = 'event.stopPropagation();javascript:closeAccordian("+x+")' ></img>"+
/*"<span class='closeDetailBtn' title='Add New' id='remove"+x+"' name='AddButton' onclick='event.stopPropagation();javascript:closeAccordian("+x+")' style = 'visibility: hidden'>"+
"<p class='close'>x</p>"+
"</span>"+*/
"<span title='Delete' style='visibility: hidden;display: block; top: 20px;right:10px' currdomid='1' class='deleteDetailBtn' onclick='event.stopPropagation();javascript:closeAccordian("+x+")' id='remove"+x+"'>"+
"<p class='remove' title='Delete'>"+
"<img src='/ibase/webitm/images/remove.png' class='removeImg'></img>"+
"</p>"+
"</span>"+
"</td>"+
"<input type = 'hidden' id = 'tab_no"+x+"' value=''></input>"+
"</tr>"+
"</table>"+
"</h3>"+
"<div style='padding: 2px 5px 7px' >"+
"<div id='suppDtlDiv"+x+"' style='height: auto; overflow: auto; margin-left: 0px; width:100%;'>"+
"<table id='itemDtl' style='width:100%;font-size:14px'>"+
"<div >"+
"<tr>"+
"<td align='right' width = '5%'>"+
"Product :"+
"</td>"+
"<td width = '20%'>"+
"<div style='position:relative; width: 90%;'>"+
"<input type='text' class='input_editable' name='itmcode"+x+"' id='itmcode"+x+"' " +
"onkeyup=\"getAutocompleteData(this,'item_code');\" " +
"onblur=\"javascript:itemChange('item_code');\" " +
"onfocus=\"javascript:setCurrData('itmcode"+x+"');\" " +
" style='width: 90%;'></input>"+
"<div style='float: right;'>"+
"<a href='javascript:callItemPopup("+x+")' style='float: left;text-decoration: none;'>"+
"<img src='/ibase/webitm/images/pophelp.png' style='margin-left: -5px;margin-top: 3px;' title='Select Item Code'/>"+
"</a>"+
"</div>"+
"</div>"+
"</td>" +
"<td align='right' width = '10%'> Rate: " +
"</td>"+
"<td width = '10%'>" +
"<label id = 'item_parent_rate"+x+"'></label>"+
"<input type='hidden' id='itmdescription"+x+"' class='editDisplayClass' maxlength='0' ISCHANGED='false' readOnly = '1' style='width: 400px'/>"+
"<input type='hidden' id='multisel"+x+"' class='editDisplayClass' maxlength='0' ISCHANGED='false' readOnly = '1' style='margin-left: -9px;width: 400px' value='false' />"+
"</td>"+
"<td width = '20%'>"+
"Despatch Date: <input type='text' class='input_editable' size='8' value='' name='dspdate"+x+"' onkeydown = 'return false;' id='dspdate"+x+"' maxlength='8' placeholder = 'DD/MM/YY' onchange=\"javascript:setDespDate('"+x+"');\" /> "+
"<img border='0' src='/ibase/webitm/images/calender.png' style = 'margin-bottom:-5px;margin-left:-1px;cursor: hand;' id='dspdate"+x+"' name='dspdate"+x+"' onClick=\"javascript:setDate('dspdate"+x+"');\" /> "+
"</td>"+
"<tr>"+
"</div>"+
"</table>"+
"</div>"+
"<input type='hidden' id = 'deleteAccordian"+x+"' />"+
"<div class = 'totalQuantity' align = 'right'>" +
"<b>Total Quantity: </b><span id = 'sum"+x+"'></span>" +
"</div>"
"</div>";
$("#accordion").append(a); $("#accordion").append(a);
$("#accordion").accordion('destroy').accordion(); $("#accordion").accordion('destroy').accordion();
...@@ -2299,15 +2137,6 @@ var sorttable = ""; ...@@ -2299,15 +2137,6 @@ var sorttable = "";
$("#accordion").accordion('option', 'active' , x-1); $("#accordion").accordion('option', 'active' , x-1);
}*/ }*/
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1;
var yyyy = today.getYear() % 100;
if(dd<10){dd='0'+dd}
if(mm<10){mm='0'+mm}
var today = dd+'/'+mm+'/'+yyyy;
/*document.getElementById("dlv_date"+x+"").value= document.getElementById("ord_date_m").value; /*document.getElementById("dlv_date"+x+"").value= document.getElementById("ord_date_m").value;
document.getElementById("dlv_date_span"+x+"").innerHTML= document.getElementById("ord_date_m").value;*/ document.getElementById("dlv_date_span"+x+"").innerHTML= document.getElementById("ord_date_m").value;*/
...@@ -2647,12 +2476,12 @@ var sorttable = ""; ...@@ -2647,12 +2476,12 @@ var sorttable = "";
if (itemQtys[1] == "" || itemQtys[1] == "undefined" || itemQtys[1] == null ) if (itemQtys[1] == "" || itemQtys[1] == "undefined" || itemQtys[1] == null )
{ {
qtytr = +qtytr + 0; qtytr = +qtytr + 0;
tr = tr + "<td><input type='text' onchange='calQuantity(this.id,"+xlen+","+xrows+","+qt+","+fld+","+t+"); sendInfo(this.id);' id='Detail2."+fld+".quantity' name='Detail2."+fld+".quantity' title='"+tool[tip].childNodes[0].nodeValue+"' onkeypress='return isQuantity(event)' maxlength='4' ISCHANGED='true' class='editInputClass' style='width:33px; text-align: right;' value='"+0+"' /></td>"; tr = tr + "<td><input type='text' onchange='calQuantity(this.id,"+xlen+","+xrows+","+qt+","+fld+","+t+"); sendInfo(this.id);' id='Detail2."+fld+".quantity' name='Detail2."+fld+".quantity' title='"+tool[tip].childNodes[0].nodeValue+"' onkeypress='return isQuantity(event)' maxlength='4' ISCHANGED='true' class='editInputClass' style='width:100%;border:none;text-align: right; outline:none' value='"+0+"' /></td>";
} }
else else
{ {
qtytr = +qtytr + +itemQtys[1]; qtytr = +qtytr + +itemQtys[1];
tr = tr + "<td><input type='text' onchange='calQuantity(this.id,"+xlen+","+xrows+","+qt+","+fld+","+t+"); sendInfo(this.id);' id='Detail2."+fld+".quantity' name='Detail2."+fld+".quantity' title='"+tool[tip].childNodes[0].nodeValue+"' onkeypress='return isQuantity(event)' maxlength='4' ISCHANGED='true' class='editInputClass' style='width:33px; text-align: right;' value='"+itemQtys[1]+"' /></td>"; tr = tr + "<td><input type='text' onchange='calQuantity(this.id,"+xlen+","+xrows+","+qt+","+fld+","+t+"); sendInfo(this.id);' id='Detail2."+fld+".quantity' name='Detail2."+fld+".quantity' title='"+tool[tip].childNodes[0].nodeValue+"' onkeypress='return isQuantity(event)' maxlength='4' ISCHANGED='true' class='editInputClass' style='width:100%;border:none;text-align: right; outline:none' value='"+itemQtys[1]+"' /></td>";
} }
tr = tr + "<input type = 'hidden' class = "+t+" value = "+tabNum+" id='Detail2."+fld+".line_no__contr' name='Detail2."+fld+".line_no__contr' ></input>"; tr = tr + "<input type = 'hidden' class = "+t+" value = "+tabNum+" id='Detail2."+fld+".line_no__contr' name='Detail2."+fld+".line_no__contr' ></input>";
...@@ -2892,6 +2721,7 @@ var sorttable = ""; ...@@ -2892,6 +2721,7 @@ var sorttable = "";
var query = window.location.search.substring(1); var query = window.location.search.substring(1);
var vars = query.split("&"); var vars = query.split("&");
for (var i=0;i<vars.length;i++) for (var i=0;i<vars.length;i++)
{ {
var pair = vars[i].split("="); var pair = vars[i].split("=");
...@@ -2901,7 +2731,15 @@ var sorttable = ""; ...@@ -2901,7 +2731,15 @@ var sorttable = "";
} }
} }
orderValue = orderValue.substring(0,orderValue.length-2); //orderValue = orderValue.substring(0,orderValue.length-2);
var n = orderValue.indexOf("+");
if(n != -1)
{
orderValue = orderValue.substring(0,n);
}
console.log("Sale Order is="+orderValue);
if(orderValue != null && orderValue.trim().length > 0) if(orderValue != null && orderValue.trim().length > 0)
{ {
getSorderHeader(orderValue, "ITEM_CHANGE", "P"); getSorderHeader(orderValue, "ITEM_CHANGE", "P");
...@@ -4013,3 +3851,82 @@ function doHideMsg(tableName) ...@@ -4013,3 +3851,82 @@ function doHideMsg(tableName)
document.getElementById(tableName).style.display = 'none'; document.getElementById(tableName).style.display = 'none';
} }
function getSidePanel(x)
{
var a="<h3 onclick='run("+x+")' class = 'accordian-Header' >" +
"<table>"+
"<tr>"+
"<td>"+
"<img src='' id = 'cloths"+x+"' height='40' width='40' style='float: left;border-radius: 90%;visibility:hidden;margin-left: -20px;' onmouseover='openImage(this,"+x+")' ></img>"+
"</td>"+
"<td style='width:98%;'>"+
"<table style = 'font-size:14px'>"+
"<tr>"+
"<td><label id='main"+x+"' style='background-color: transparent;'></label></td>"+
"<input type='hidden' id='display' value='0' />"+
"</tr>"+
"<tr>"+
"<td><label id = 'pieces"+x+"'></label><label id = 'rate"+x+"'></label></td>"+
"</tr>"+
"</table>"+
"</td>"+
"<td align = 'right' height='50'>"+
"<span title='Delete' style='visibility: hidden;display: block; top: 20px;right:10px' currdomid='1' class='deleteDetailBtn' onclick='event.stopPropagation();javascript:closeAccordian("+x+")' id='remove"+x+"'>"+
"<p class='remove' title='Delete'>"+
"<img src='/ibase/webitm/images/remove.png' class='removeImg'></img>"+
"</p>"+
"</span>"+
"</td>"+
"<input type = 'hidden' id = 'tab_no"+x+"' value=''></input>"+
"</tr>"+
"</table>"+
"</h3>"+
"<div style='padding: 2px 5px 7px' >"+
"<div id='suppDtlDiv"+x+"' style='height: auto; overflow: auto; margin-left: 0px; width:100%;'>"+
"<table id='itemDtl' style='width:100%;font-size:14px'>"+
"<div >"+
"<tr>"+
"<td align='right' width = '5%'>"+
"Product :"+
"</td>"+
"<td width = '20%'>"+
"<div style='position:relative; width: 90%;'>"+
"<input type='text' class='editInputClass' name='itmcode"+x+"' id='itmcode"+x+"' " +
"onkeyup=\"getAutocompleteData(this,'item_code');\" " +
"onblur=\"javascript:itemChange('item_code');\" " +
"onfocus=\"javascript:setCurrData('itmcode"+x+"');\" " +
"style='width: 90%;'></input>"+
"<input type='hidden' id='multisel"+x+"' class='editDisplayClass' maxlength='0' ISCHANGED='false' readOnly = '1' style='margin-left: -9px;width: 400px' value='' />"+
"<div style='float: right;'>"+
"<a href='javascript:callItemPopup("+x+")' style='float: left;text-decoration: none;'>"+
"<img src='/ibase/webitm/images/pophelp.png' style='margin-left: -5px;margin-top: 3px;' title='Select Item Code'/>"+
"</a>"+
"</div>"+
"</div>"+
"</td>" +
"<td align='right' width = '10%'> Rate: " +
"</td>"+
"<td width = '10%'>" +
"<label id = 'item_parent_rate"+x+"'></label>"+
"<input type='hidden' id='itmdescription"+x+"' class='editDisplayClass' maxlength='0' ISCHANGED='false' readOnly = '1' style='width: 400px'/>"+
"</td>"+
"<td align = 'right' width = '20%'>"+
"Despatch Date: <input type='text' class='input_editable' size='8' value='' name='dspdate"+x+"' id='dspdate"+x+"' onkeydown = 'return false;' maxlength='8' placeholder = 'DD/MM/YY' onchange=\"javascript:setDespDate('"+x+"');\" /> "+
"<img border='0' src='/ibase/webitm/images/calender.png' style = 'margin-bottom:-5px;margin-left:-1px;cursor: hand;' id='dspdate"+x+"' name='dspdate"+x+"' onClick=\"javascript:setDate('dspdate"+x+"');\" /> "+
"</td>"+
"<tr>"+
"</div>"+
"</table>"+
"</div>"+
"<input type='hidden' id = 'deleteAccordian"+x+"' />"+
"<div class = 'totalQuantity' align = 'right'>" +
"<b>Total Quantity: </b><span id = 'sum"+x+"'></span>" +
"</div>"
"</div>";
return a;
}
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