Commit 9c528df5 authored by steurwadkar's avatar steurwadkar

Wavegen Wizard changes Check-in by Santosh


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@104067 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 910acd71
package ibase.webitm.ejb.wms; package ibase.webitm.ejb.wms;
import ibase.system.config.AppConnectParm; import ibase.system.config.AppConnectParm;
import ibase.utility.CommonConstants;
import ibase.utility.E12GenericUtility; import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB; import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ValidatorEJB; import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
import java.awt.Color;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.GraphicsEnvironment;
import java.awt.image.BufferedImage;
import java.io.File;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import java.sql.Connection; import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
...@@ -15,6 +25,7 @@ import java.util.LinkedHashSet; ...@@ -15,6 +25,7 @@ import java.util.LinkedHashSet;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import javax.imageio.ImageIO;
import javax.naming.InitialContext; import javax.naming.InitialContext;
import org.w3c.dom.Document; import org.w3c.dom.Document;
...@@ -333,8 +344,9 @@ public class WavegenWizEJB extends ValidatorEJB implements WavegenWizEJBLocal, W ...@@ -333,8 +344,9 @@ public class WavegenWizEJB extends ValidatorEJB implements WavegenWizEJBLocal, W
HashMap<String, String> eachDetailDataMap = detailDataMap.get(eachKey); HashMap<String, String> eachDetailDataMap = detailDataMap.get(eachKey);
HashMap<String, HashMap<String, String>> allocationDataMap = getAllocationData(eachDetailDataMap, eachKey); HashMap<String, HashMap<String, String>> allocationDataMap = getAllocationData(eachDetailDataMap, eachKey);
HashMap<String,String> tempMap = allocationDataMap.get(eachKey); HashMap<String,String> tempMap = allocationDataMap.get(eachKey);
getCustomImagePath(eachKey.trim(),eachDetailDataMap.get("custName"),"customer");
valueXmlString.append("<Detail2 domID='"+(++custDomID)+"'>"); valueXmlString.append("<Detail2 domID='"+(++custDomID)+"'>");
valueXmlString.append("<cust_code><![CDATA["+eachKey+"]]></cust_code>"); valueXmlString.append("<cust_code><![CDATA["+eachKey.trim()+"]]></cust_code>");
valueXmlString.append("<cust_name><![CDATA["+eachDetailDataMap.get("custName")+"]]></cust_name>"); valueXmlString.append("<cust_name><![CDATA["+eachDetailDataMap.get("custName")+"]]></cust_name>");
valueXmlString.append("<dlv_city><![CDATA["+eachDetailDataMap.get("dlvCity")+"]]></dlv_city>"); valueXmlString.append("<dlv_city><![CDATA["+eachDetailDataMap.get("dlvCity")+"]]></dlv_city>");
valueXmlString.append("<order_count><![CDATA["+eachDetailDataMap.get("orderCount")+"]]></order_count>"); valueXmlString.append("<order_count><![CDATA["+eachDetailDataMap.get("orderCount")+"]]></order_count>");
...@@ -366,6 +378,8 @@ public class WavegenWizEJB extends ValidatorEJB implements WavegenWizEJBLocal, W ...@@ -366,6 +378,8 @@ public class WavegenWizEJB extends ValidatorEJB implements WavegenWizEJBLocal, W
{ {
valueXmlString.append("<lineItem domID='"+(++domID)+"'>"); valueXmlString.append("<lineItem domID='"+(++domID)+"'>");
valueXmlString.append(saleOrderStrArray[i]); valueXmlString.append(saleOrderStrArray[i]);
valueXmlString.append("<qty_highlighter><![CDATA["+getColorValue(saleOrderStrArray[i])+"]]></qty_highlighter>");
valueXmlString.append("<image_path><![CDATA["+getImagePath(saleOrderStrArray[i])+"]]></image_path>");
valueXmlString.append("</lineItem>"); valueXmlString.append("</lineItem>");
} }
valueXmlString.append("</lineItems>"); valueXmlString.append("</lineItems>");
...@@ -518,7 +532,20 @@ public class WavegenWizEJB extends ValidatorEJB implements WavegenWizEJBLocal, W ...@@ -518,7 +532,20 @@ public class WavegenWizEJB extends ValidatorEJB implements WavegenWizEJBLocal, W
waveGenerationICRemote = (ibase.webitm.ejb.wms.WaveGenerationICRemote) ctx.lookup("ibase/WaveGenerationIC/remote"); waveGenerationICRemote = (ibase.webitm.ejb.wms.WaveGenerationICRemote) ctx.lookup("ibase/WaveGenerationIC/remote");
retXMLStr = waveGenerationICRemote.itemChanged(currXmlDataStr, hdrXmlDataStr, allXmlDataStr, objContext, currentColumn, editFlag, globalXtraParams); retXMLStr = waveGenerationICRemote.itemChanged(currXmlDataStr, hdrXmlDataStr, allXmlDataStr, objContext, currentColumn, editFlag, globalXtraParams);
System.out.println("retXMLStr["+retXMLStr+"]"); System.out.println("retXMLStr["+retXMLStr+"] for action ["+action+"]");
}
else if("GET_IMG_PATH".equalsIgnoreCase(action))
{
String lineItemStr = "";
String itemCode = (String)reqParamMap.get("REF_ID");
String itemDescr = (String)reqParamMap.get("ITEM_DESCR");
lineItemStr += "<item_code><![CDATA["+itemCode+"]]></item_code>";
lineItemStr += "<item_descr><![CDATA["+itemDescr+"]]></item_descr>";
retXMLStr = "<imgPath><![CDATA["+getImagePath(lineItemStr)+"]]></imgPath>";
System.out.println("retXMLStr["+retXMLStr+"] for action ["+action+"]");
} }
} }
...@@ -647,4 +674,347 @@ public class WavegenWizEJB extends ValidatorEJB implements WavegenWizEJBLocal, W ...@@ -647,4 +674,347 @@ public class WavegenWizEJB extends ValidatorEJB implements WavegenWizEJBLocal, W
} }
return ctx; return ctx;
} }
public String getValue(String lineItemStr, String column) throws ITMException
{
String retValue = "";
Document lineDom = null;
try
{
lineDom =new E12GenericUtility().parseString("<detail>"+lineItemStr+"</detail>");
retValue = lineDom.getElementsByTagName(column).item(0).getTextContent();
}
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
return retValue;
}
public String getColorValue(String lineItemStr)throws ITMException
{
String colorCode = "", shipType = "";
double pendQty = 0.0, orderQty = 0.0, allocQty = 0.0, balStockQty = 0.0;
try
{
shipType = getValue(lineItemStr,"part_qty");
pendQty = Double.parseDouble(getValue(lineItemStr,"pending_quantity"));
orderQty = Double.parseDouble(getValue(lineItemStr, "quantity"));
allocQty = Double.parseDouble(getValue(lineItemStr, "qty_alloc"));
balStockQty = Double.parseDouble(getValue(lineItemStr, "bal_qty"));
if("Ship Complete".equalsIgnoreCase(shipType) || "Ship Complete Lines".equalsIgnoreCase(shipType))
{
if(balStockQty > orderQty)
{
if(allocQty<pendQty)
{
colorCode="red";
}
else if(allocQty == pendQty)
{
colorCode="green";
}
}
else if(balStockQty > 0)
{
if(allocQty<pendQty)
{
colorCode="red";
}
else if(allocQty == pendQty)
{
colorCode="green";
}
}
else if(balStockQty <= 0)
{
colorCode="red";
}
}
else if("Ship Available".equalsIgnoreCase(shipType))
{
if(balStockQty > orderQty)
{
if(allocQty<pendQty)
{
colorCode="yellow";
}
else if(allocQty == pendQty)
{
colorCode="green";
}
}
else if(balStockQty > 0)
{
if(allocQty<pendQty)
{
colorCode="red";
}
else if(allocQty == pendQty)
{
colorCode="green";
}
}
else if(balStockQty <= 0)
{
colorCode="red";
}
}
}
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
return colorCode;
}
public String getImagePath(String lineItemStr) throws ITMException
{
String retImgPath = "", itemCode = "", itemRefSer = "", docId = "",itemDescr = "";
PreparedStatement pstmt = null;
ResultSet rs = null;
String sql = "";
Connection conn = null;
try
{
conn = getConnection();
itemCode = getValue(lineItemStr, "item_code");
itemDescr = removeSpecialChar(getValue(lineItemStr, "item_descr"));
sql = " SELECT REF_SER FROM TRANSETUP WHERE TRAN_WINDOW = 'w_item'";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if(rs.next())
{
itemRefSer = checkNullAndTrim(rs.getString("REF_SER"));
}
if(rs != null)
{
rs.close();rs = null;
}
if(pstmt != null)
{
pstmt.close();pstmt = null;
}
sql = " SELECT DOC_CONTENTS.DOC_ID FROM DOC_CONTENTS, DOC_TRANSACTION_LINK, USERS "
+ " WHERE DOC_TRANSACTION_LINK.DOC_ID = DOC_CONTENTS.DOC_ID AND USERS.CODE = DOC_CONTENTS.ADD_USER "
+ " AND REF_SER = ? AND REF_ID = ? ORDER BY DOC_CONTENTS.DOC_ID ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemRefSer);
pstmt.setString(2, itemCode);
rs = pstmt.executeQuery();
if(rs.next())
{
docId = checkNullAndTrim(rs.getString("DOC_ID"));
retImgPath = "/ibase/WebITMDocumentHandlerServlet?OBJ_NAME=item&REF_ID="+itemCode+"&ACTION=GET_DOCUMENT&CLIENT=WEB1&DOC_ID="+docId+"&DOC_TYPE=jpg";
}
else
{
retImgPath = getCustomImagePath(itemCode.trim(),itemDescr,"itemcode");
}
}
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if (rs != null)
{
rs.close();rs = null;
}
if (pstmt != null )
{
pstmt.close();pstmt = null;
}
if (conn != null && !conn.isClosed())
{
conn.close();conn = null;
}
}
catch (Exception e)
{
throw new ITMException(e);
}
}
return retImgPath;
}
public String getCustomImagePath(String value,String altColImg, String object)
{
String imagePath = "";
try
{
File objDir = new File (CommonConstants.RIALITE_PROFILE_PATH +File.separator+ object);
if(!objDir.exists())
{
objDir.mkdir();
}
if( fileExist(value, object))
{
imagePath = File.separator+"ibase"+File.separator+"resource"+File.separator+ object+File.separator + value + ".png";
}
else
{
File f = new File(CommonConstants.RIALITE_PROFILE_PATH +File.separator+ object+File.separator + value + ".png");
BufferedImage bi = createLabelImage(altColImg);
ImageIO.write(bi,"PNG",f);
imagePath = File.separator+"ibase"+File.separator+"resource"+File.separator+ object+File.separator + value + ".png";
}
}
catch(Exception e)
{
System.out.println("PopUpDataAccessEJB.getCustomeImagePath()::getCustomImagePath");
e.printStackTrace();
}
return imagePath;
}
public boolean fileExist(String value, String object)
{
boolean flag = true;
try
{
String path = CommonConstants.RIALITE_PROFILE_PATH +File.separator+ object+File.separator + value + ".png";
File f = new File(path);
if( !f.exists() )
{
flag = false;
}
else
{
flag = true;
}
}
catch (Exception e)
{
System.out.println("PopUpDataAccessEJB.fileExist()"+e.getMessage());
}
return flag;
}
public BufferedImage createLabelImage(String value)
{
int width = 400, height = 400;
BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
try
{
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
File fontFile = new File(CommonConstants.APPLICATION_CONTEXT+"webitm"+File.separator+"css"+File.separator+"fonts"+File.separator+"Museo300-Regular.ttf");
ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, fontFile));
Graphics2D g = bi.createGraphics();
String text = checkNull(dynamicMenuImage(value));
int centerX = 200, centerY = 200;
int ovalWidth = 400, ovalHeight = 400;
Font font = new Font("Museo 300", Font.PLAIN, 200);
g.setFont(font);
Color c = Color.decode("#cfbebe");
g.setColor(c);
g.fillOval(centerX-ovalWidth/2, centerY-ovalHeight/2,ovalWidth, ovalHeight);
FontMetrics fm = g.getFontMetrics();
double textWidth = fm.getStringBounds(text,g).getWidth();
g.setColor(Color.WHITE);
g.drawString(text, (int) (centerX - textWidth/2), (int) ( (centerY + fm.getMaxAscent() / 2) ) - 2);
}
catch (Exception e)
{
System.out.println("PopUpDataAccessEJB.createLabelImage()"+e.getMessage());
}
return bi;
}
private String dynamicMenuImage(String objDescr)
{
StringBuffer mnIconBuffer = new StringBuffer();
String[] refSr = null;
objDescr = objDescr.toUpperCase();
objDescr = checkNull(objDescr);
objDescr = objDescr.trim();
if( objDescr != "" )
{
if( objDescr.indexOf(" ") != -1 )
{
refSr = objDescr.split(" ");
}
else if( objDescr.indexOf("-") != -1 )
{
refSr = objDescr.split("-");
}
else if( objDescr.indexOf("_") != -1 )
{
refSr = objDescr.split("_");
}
else if( objDescr.indexOf(":") != -1 )
{
refSr = objDescr.split(":");
}
String menuStr = "";
if( refSr != null )
{
for( int i = 0; i <= refSr.length; i++ )
{
if( mnIconBuffer.length() < 2 && checkNull( refSr[i] ) != "" )
{
menuStr = refSr[i];
menuStr = menuStr.trim();
if( menuStr != ":" && !"".equalsIgnoreCase(menuStr) )
{
mnIconBuffer.append( menuStr.charAt(0) );
}
}
}
}
else
{
mnIconBuffer.append( objDescr.charAt(0) );
}
}
String menuIconPath = mnIconBuffer.toString();
return menuIconPath;
}
public String removeSpecialChar(String inputStr)
{
String retStr = "";
if(inputStr.indexOf("&")!= -1)
{
retStr = inputStr.replaceAll("&", "AND");
}
else
{
retStr = inputStr.replaceAll("[-()%^!@#$%*{}]", " ");
}
return retStr;
}
private static String checkNullAndTrim(String input)
{
if (input==null)
{
input="";
}
return input.trim();
}
} }
...@@ -116,8 +116,7 @@ button.accordion { ...@@ -116,8 +116,7 @@ button.accordion {
button.accordion.active, button.accordion:hover { button.accordion.active, button.accordion:hover {
border : 1px solid #ddd !important; border : 1px solid #ddd !important;
} }
button.activeAccor{ button.accordion.activeAccor{
border : 1px solid #fbd850 !important;
background-color: #fdf5ce; background-color: #fdf5ce;
} }
button.accordion.active{ button.accordion.active{
...@@ -128,9 +127,9 @@ button.accordionSO.accordion { ...@@ -128,9 +127,9 @@ button.accordionSO.accordion {
background-color: white; background-color: white;
border:0px solid #ddd !important; border:0px solid #ddd !important;
border-top:1px solid #ddd !important; border-top:1px solid #ddd !important;
border-bottom:1px solid #ddd !important; border-bottom:0px solid #ddd !important;
border-radius:0px; border-radius:0px;
padding: 6px; padding: 4px;
color: #000; color: #000;
cursor: pointer; cursor: pointer;
width: 100%; width: 100%;
...@@ -141,31 +140,28 @@ button.accordionSO.accordion { ...@@ -141,31 +140,28 @@ button.accordionSO.accordion {
transition: 0.6s; transition: 0.6s;
line-height: 20px; line-height: 20px;
} }
button.accordionSO, button.accordion:first-child{
margin-top:2px !important;
}
button.accordionSO.active, button.accordionSO:hover { button.accordionSO.active, button.accordionSO:hover {
border-top:1px solid #ccc !important; border-top:1px solid #ccc !important;
border-bottom:1px solid #ccc !important;
background-color: #eee;
} }
button.accordionSO.active{ button.accordionSO.active{
border-bottom : 0px solid #fbd850 !important; border-bottom : 0px solid #fbd850 !important;
background-color: #eee;
} }
div.panel { div.panel {
padding:0px; padding:0px;
border:1px solid #ddd !important; border:1px solid #ccc !important;
background-color: white; background-color: white;
max-height: 0; max-height: 0;
overflow: hidden; overflow: hidden;
transition: 0.4s ease-in-out; transition: 0.4s ease-in-out;
opacity: 0; opacity: 0;
overflow: auto;
} }
.panel.panelSO {
border: none !important;
}
div.panel.show { div.panel.show {
border-top:1px solid lightgray !important; border-top:0px solid lightgray !important;
opacity: 1; opacity: 1;
max-height: 2000px; max-height: 2000px;
} }
...@@ -175,7 +171,7 @@ div.panel.show { ...@@ -175,7 +171,7 @@ div.panel.show {
padding-top:2px; padding-top:2px;
} }
div.panelSO.show{ div.panelSO.show{
padding : 2 0px; padding : 0px;
border:0px solid lightgray !important; border:0px solid lightgray !important;
border-bottom:0px solid lightgray !important; border-bottom:0px solid lightgray !important;
overflow-x:scroll; overflow-x:scroll;
...@@ -223,4 +219,56 @@ div.panelSO.show{ ...@@ -223,4 +219,56 @@ div.panelSO.show{
.c100{ .c100{
margin: 0px !important; margin: 0px !important;
z-index:0 !important; z-index:0 !important;
} }
\ No newline at end of file
.custImg{
z-index: 25 !important;
width: 32px;
height: 32px;
top: 4px;
left: 4px;
border-radius:50%;
position: absolute;
}
.itemImg{
width: 24px;
height: 24px;
border-radius:50%;
margin-top:6px;
margin-right:3px;
float: left;
}
.qtyHighlight{
width: 5px;
height: 5px;
float: right;
margin-top:10px;
}
.imagePanel
{
display:none;
float:right;
right:0;
margin-top:2px;
margin-right:8px;
width:200px;
height:250px;
border:1px solid lightgray;
position: absolute;
z-index: 30;
background: white;
}
.closeDiv{
position: absolute;
float: left;
margin:-8px;
text-align:center;
line-height:22px;
background-color: #777;
color:white;
width:22px;
height:22px;
border-radius:50%;
cursor: pointer;
}
...@@ -781,7 +781,6 @@ function updateDisplaySummary(custId,tableId,tableNo) ...@@ -781,7 +781,6 @@ function updateDisplaySummary(custId,tableId,tableNo)
var custPercentage = Math.round(custTotalAllocQty/custTotalQty*100); var custPercentage = Math.round(custTotalAllocQty/custTotalQty*100);
document.getElementById("custPercVal"+custId).innerHTML = custPercentage; document.getElementById("custPercVal"+custId).innerHTML = custPercentage;
document.getElementById("custLine"+custId).innerHTML = custLineCnt; document.getElementById("custLine"+custId).innerHTML = custLineCnt;
document.getElementById("custPercText"+custId).innerHTML = custPercentage+"%";
var custPecrObj = document.getElementById("percClass"+custId); var custPecrObj = document.getElementById("percClass"+custId);
custPecrObj.className = "c100 small"; custPecrObj.className = "c100 small";
...@@ -803,7 +802,6 @@ function updateDisplaySummary(custId,tableId,tableNo) ...@@ -803,7 +802,6 @@ function updateDisplaySummary(custId,tableId,tableNo)
var prevCustPerc = document.getElementById("prevCustPerc"+custId).value; var prevCustPerc = document.getElementById("prevCustPerc"+custId).value;
custPecrObj.className = "c100 small"; custPecrObj.className = "c100 small";
custPecrObj.classList.add("p"+prevCustPerc); custPecrObj.classList.add("p"+prevCustPerc);
document.getElementById("custPercText"+custId).innerHTML = prevCustPerc+"%";
} }
tableObj = document.getElementById(tableId); tableObj = document.getElementById(tableId);
...@@ -839,7 +837,7 @@ function updateDisplaySummary(custId,tableId,tableNo) ...@@ -839,7 +837,7 @@ function updateDisplaySummary(custId,tableId,tableNo)
} }
function setCheckboxRow(event,curRow,tableNo,custId,tableId) function setCheckboxRow(event,curRow,tableNo,custId,tableId)
{ {
if (event.target.type !== 'checkbox' && event.target.type != 'select-one' && event.target.type != 'text') if (event.target.nodeName !== 'INPUT' && event.target.nodeName != 'SELECT' && event.target.nodeName != 'IMG')
{ {
if(curRow.cells[0].childNodes != undefined) if(curRow.cells[0].childNodes != undefined)
{ {
...@@ -871,7 +869,16 @@ function setCheckboxRow(event,curRow,tableNo,custId,tableId) ...@@ -871,7 +869,16 @@ function setCheckboxRow(event,curRow,tableNo,custId,tableId)
checkedCount += 1; checkedCount += 1;
} }
} }
document.getElementById("selectAll"+tableNo).checked = (checkedCount === chkElements.length); if(checkedCount == chkElements.length)
{
document.getElementById("selectAll"+tableNo).checked = (checkedCount === chkElements.length);
document.getElementById("selectAll"+tableNo).setAttribute('checked','checked');
}
else
{
document.getElementById("selectAll"+tableNo).checked = false;
document.getElementById("selectAll"+tableNo).removeAttribute('checked');
}
} }
updateDisplaySummary(custId,tableId,tableNo); updateDisplaySummary(custId,tableId,tableNo);
...@@ -933,7 +940,17 @@ function selectThisRow(curObj, rowId, tableNo, custId, tableId) ...@@ -933,7 +940,17 @@ function selectThisRow(curObj, rowId, tableNo, custId, tableId)
checkedCount += 1; checkedCount += 1;
} }
} }
document.getElementById("selectAll"+tableNo).checked = (checkedCount === chkElements.length); if(checkedCount == chkElements.length)
{
document.getElementById("selectAll"+tableNo).checked = (checkedCount === chkElements.length);
document.getElementById("selectAll"+tableNo).setAttribute('checked','checked');
}
else
{
document.getElementById("selectAll"+tableNo).checked = false;
document.getElementById("selectAll"+tableNo).removeAttribute('checked');
}
} }
updateDisplaySummary(custId,tableId,tableNo); updateDisplaySummary(custId,tableId,tableNo);
...@@ -985,4 +1002,43 @@ function displayDataFromSession(retHtmlData) ...@@ -985,4 +1002,43 @@ function displayDataFromSession(retHtmlData)
var overlay = document.getElementById( "overlay" ); var overlay = document.getElementById( "overlay" );
overlay.removeAttribute('style'); overlay.removeAttribute('style');
document.getElementById("buttonreplacement").style.display = "none"; document.getElementById("buttonreplacement").style.display = "none";
} }
\ No newline at end of file function showItemImage(itemCode,itemDescr)
{
var url = "/ibase/WavegenWizServlet?REF_ID="+itemCode+"&action=GET_IMG_PATH&ITEM_DESCR="+itemDescr+"";
makeRequest(url, getImgPath);
}
function getImgPath(retVal)
{
document.getElementById("sideImagePanel").style.display="block";
if(document.getElementById("sideImagePanel").innerHTML != "")
{
document.getElementById("sideImagePanel").innerHTML = "";
}
var xmlDoc = loadXMLString(retVal);
var imgNode = xmlDoc.getElementsByTagName("imgPath")[0];
var imgPath = imgNode.childNodes[0].nodeValue;
var closeDiv = document.createElement("div");
closeDiv.setAttribute("class","closeDiv");
closeDiv.innerHTML = "X";
document.getElementById("sideImagePanel").appendChild(closeDiv);
var imgElement = document.createElement("img");
imgElement.setAttribute("src", imgPath);
imgElement.setAttribute("class", "imagePanelSrc");
imgElement.setAttribute("height", "100%");
imgElement.setAttribute("width", "100%");
document.getElementById("sideImagePanel").appendChild(imgElement);
}
window.onclick = function (event)
{
if(!event.target.matches(".imagePanelSrc") && !event.target.matches(".itemImg"))
{
document.getElementById("sideImagePanel").style.display="none";
}
}
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
{ {
this.attributes.expanded.value = "false"; this.attributes.expanded.value = "false";
} }
this.classList.remove("activeAccor"); this.classList.remove("activeAccor");
this.classList.toggle("active"); this.classList.toggle("active");
this.nextElementSibling.classList.toggle("show"); this.nextElementSibling.classList.toggle("show");
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
</xsl:for-each> </xsl:for-each>
</table> </table>
</div> </div>
<div id="sideImagePanel" class="imagePanel"></div>
<div id="popHelpContainer"></div> <div id="popHelpContainer"></div>
<div id="overlay"></div> <div id="overlay"></div>
<div id="mainPageHeaderContatiner"> <div id="mainPageHeaderContatiner">
...@@ -240,11 +240,12 @@ ...@@ -240,11 +240,12 @@
</xsl:if> </xsl:if>
<xsl:if test ="$dbID != '0'"> <xsl:if test ="$dbID != '0'">
<xsl:variable name="custDbID"><xsl:value-of select="@domID"/></xsl:variable> <xsl:variable name="custDbID"><xsl:value-of select="@domID"/></xsl:variable>
<xsl:variable name="custCode"><xsl:value-of select="cust_code"/></xsl:variable>
<button class="accordion" id="custPerc{$custDbID}" type="button" expanded="false"> <button class="accordion" id="custPerc{$custDbID}" type="button" expanded="false">
<xsl:variable name="allocPerc"><xsl:value-of select="total_alloc_perc"/></xsl:variable> <xsl:variable name="allocPerc"><xsl:value-of select="total_alloc_perc"/></xsl:variable>
<input type="hidden" id="prevCustPerc{$custDbID}" value="{$allocPerc}"/> <input type="hidden" id="prevCustPerc{$custDbID}" value="{$allocPerc}"/>
<div id="percClass{$custDbID}" class="c100 small p{$allocPerc}"> <div id="percClass{$custDbID}" class="c100 small p{$allocPerc}">
<span id="custPercText{$custDbID}" class="percText"><xsl:value-of select="total_alloc_perc"/>%</span> <img src="/ibase/resource/customer/{$custCode}.png" class="custImg"/>
<div class="slice"> <div class="slice">
<div id="custbar{$custDbID}" class="bar"></div> <div id="custbar{$custDbID}" class="bar"></div>
<div id="custfill{$custDbID}" class="fill"></div> <div id="custfill{$custDbID}" class="fill"></div>
...@@ -265,7 +266,7 @@ ...@@ -265,7 +266,7 @@
<xsl:variable name="soAllocPerc"><xsl:value-of select="alloc_perc"/></xsl:variable> <xsl:variable name="soAllocPerc"><xsl:value-of select="alloc_perc"/></xsl:variable>
<input type="hidden" id="prevSoPerc{$soDbID}" value="{$soAllocPerc}"/> <input type="hidden" id="prevSoPerc{$soDbID}" value="{$soAllocPerc}"/>
<button class="accordion accordionSO" type="button" expanded="false"> <button class="accordion accordionSO" type="button" expanded="false">
<div id="soPercClass{$soDbID}" class="c100 small p{$soAllocPerc}" style="margin-left:5px !important;"> <div id="soPercClass{$soDbID}" class="c100 small p{$soAllocPerc}" style="margin-left:10px !important;">
<span id="soPercText{$soDbID}" class="percText"><xsl:value-of select="alloc_perc"/>%</span> <span id="soPercText{$soDbID}" class="percText"><xsl:value-of select="alloc_perc"/>%</span>
<div class="slice"> <div class="slice">
<div id="sobar{$soDbID}" class="bar"></div> <div id="sobar{$soDbID}" class="bar"></div>
...@@ -355,6 +356,8 @@ ...@@ -355,6 +356,8 @@
<xsl:variable name="exp_lev"><xsl:value-of select="exp_lev"/></xsl:variable> <xsl:variable name="exp_lev"><xsl:value-of select="exp_lev"/></xsl:variable>
<xsl:variable name="last_col"><xsl:value-of select="last_col"/></xsl:variable> <xsl:variable name="last_col"><xsl:value-of select="last_col"/></xsl:variable>
<xsl:variable name="part_qty_real"><xsl:value-of select="part_qty_real"/></xsl:variable> <xsl:variable name="part_qty_real"><xsl:value-of select="part_qty_real"/></xsl:variable>
<xsl:variable name="qty_highlighter"><xsl:value-of select="qty_highlighter"/></xsl:variable>
<xsl:variable name="image_path"><xsl:value-of select="image_path"/></xsl:variable>
<tr class='trClass' id="{$linedbID}" onclick="setCheckboxRow(event,this,{$soDbID},'{$custDbID}','details{$soDbID}');"> <tr class='trClass' id="{$linedbID}" onclick="setCheckboxRow(event,this,{$soDbID},'{$custDbID}','details{$soDbID}');">
<td nowrap="true" style="border-left:0px solid black !important;"> <td nowrap="true" style="border-left:0px solid black !important;">
<Input type='checkbox' value="true" class="selectAll{$soDbID}" name="Detail2.{normalize-space($linedbID)}.selectbox" id="Detail2.{normalize-space($linedbID)}.selectbox" onclick="setCheckbox(this,'{$linedbID}','{$soDbID}','{$custDbID}','details{$soDbID}');" tabindex="-1" /> <Input type='checkbox' value="true" class="selectAll{$soDbID}" name="Detail2.{normalize-space($linedbID)}.selectbox" id="Detail2.{normalize-space($linedbID)}.selectbox" onclick="setCheckbox(this,'{$linedbID}','{$soDbID}','{$custDbID}','details{$soDbID}');" tabindex="-1" />
...@@ -387,8 +390,9 @@ ...@@ -387,8 +390,9 @@
<xsl:value-of select="due_date"/> <xsl:value-of select="due_date"/>
<input type="hidden" name="Detail2.{normalize-space($linedbID)}.due_date" value="{$due_date}"></input> <input type="hidden" name="Detail2.{normalize-space($linedbID)}.due_date" value="{$due_date}"></input>
</td> </td>
<td nowrap="true"> <td nowrap="true" style="padding:0 3px;">
<xsl:value-of select="item_code"/> <xsl:value-of select="item_code"/>
<img type="image" src="{$image_path}" class="itemImg" onclick="showItemImage('{normalize-space($item_code)}','{$item_descr}');" />
<input type="hidden" name="Detail2.{normalize-space($linedbID)}.item_code" value="{$item_code}"></input> <input type="hidden" name="Detail2.{normalize-space($linedbID)}.item_code" value="{$item_code}"></input>
</td> </td>
<td nowrap="true"> <td nowrap="true">
...@@ -407,8 +411,9 @@ ...@@ -407,8 +411,9 @@
<xsl:value-of select="stock_quantity"/> <xsl:value-of select="stock_quantity"/>
<input type="hidden" name="Detail2.{normalize-space($linedbID)}.stock_quantity" value="{$stock_quantity}"></input> <input type="hidden" name="Detail2.{normalize-space($linedbID)}.stock_quantity" value="{$stock_quantity}"></input>
</td> </td>
<td nowrap="true" align="right"> <td nowrap="true" align="right" style="padding: 0 3px;vertical-align:middle;">
<input type="text" name="Detail2.{normalize-space($linedbID)}.qty_alloc" id="Detail2.{normalize-space($linedbID)}.qty_alloc" value="{$qty_alloc}" onchange="selectThisRow(this,{$linedbID}, {$soDbID},'{$custDbID}','details{$soDbID}');" onpaste="return false;" onkeypress="return isNumberKey(event);" style="text-align:right;width:65px;"></input> <input type="text" name="Detail2.{normalize-space($linedbID)}.qty_alloc" id="Detail2.{normalize-space($linedbID)}.qty_alloc" value="{$qty_alloc}" onchange="selectThisRow(this,{$linedbID}, {$soDbID},'{$custDbID}','details{$soDbID}');" onpaste="return false;" onkeypress="return isNumberKey(event);" style="text-align:right;width:65px;float:left;"></input>
<div class="qtyHighlight" style="background-color:{$qty_highlighter}"></div>
</td> </td>
<td nowrap="true" align="right"> <td nowrap="true" align="right">
<xsl:value-of select="hold_qty"/> <xsl:value-of select="hold_qty"/>
......
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