Commit 7f7b105f authored by mmhatre's avatar mmhatre

added side panel for invoice adjustment

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@214830 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f3509b8c
<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:decimal-format NaN="0"/>
<xsl:template match="/">
<html>
<body>
<div class="mainContainer">
<div class="dataContainer">
<xsl:variable name="totAdjAmt"><xsl:value-of select="//Detail1/InvoiceAmt/totadj_amt"/></xsl:variable>
<div class="statusHeader" style="background-color:WHITE" >
<div class="statusLine">
<xsl:if test="$totAdjAmt=0">
<strong>No Adjustment against the Invoice  </strong>
</xsl:if>
<xsl:if test="$totAdjAmt=not(0)">
<div class="leftAlignDiv">
<strong>Invoice Amount:</strong>&#160;<xsl:value-of select="//Detail1/InvoiceAmt/inv_amt"/>&#160;
</div>
<div class="rightAlignDiv">
<strong>Adjust Amount:</strong>&#160;<xsl:value-of select="//Detail1/InvoiceAmt/totadj_amt"/>&#160;
</div>
</xsl:if>
</div>
</div>
</div>
<div class="dataContainer">
<xsl:for-each select="//Detail1/Invoice">
<div class='eachLineData'>
<div class="statusHeader">
<div class="statusLine">
<div class="leftAlignDiv">
<p><strong>Reference#:</strong>&#160;<xsl:value-of select="tran_id" /> </p>
</div>
<div class="rightAlignDiv">
<strong>Date :</strong>&#160;<xsl:value-of select="ref_date"/>
</div>
</div>
<div class="statusLine">
<div class="leftAlignDiv">
<strong><xsl:value-of select="ref_ser"/></strong>
</div>
<div class="rightAlignDiv">
<strong>Due Date:</strong>&#160;<xsl:value-of select="due_date"/>
</div>
</div>
<div class="statusLine">
<div class="leftAlignDiv" id="dueDateLine">
<strong>Total Amount:</strong>&#160;<xsl:value-of select="net_amt"/>
</div>
<div class="rightAlignDiv">
<strong>Adj Amount:</strong>&#160;<xsl:value-of select="rcp_amt"/>
</div>
</div>
<div class="statusLine">
<div class="leftAlignDiv" id="dueDateLine">
Currency Code:&#160;<xsl:value-of select="curr_code"/>
</div>
<div class="rightAlignDiv">
Exchange Rate:&#160;<xsl:value-of select="exch_rate"/>
</div>
</div>
</div><br/>
</div>
</xsl:for-each>
</div>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
<%@page import = "java.lang.*,java.util.*, ibase.webitm.utility.*"%>
<%
response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT");
response.setHeader("Cache-Control", "no-store, no-cache,must-revalidate");
response.addHeader("Cache-Control", "post-check=0, pre-check=0");
response.setHeader("Pragma", "no-cache");
%>
<%
System.out.println("#######################################################");
System.out.println("invoice.jsp ");
System.out.println("#######################################################");
String queryParam = request.getParameter( "QRY_PARAM" );
String paramType = request.getParameter( "QRY_PARAM_TYPE" );
String targetObject = request.getParameter( "TAR_OBJ_NAME" );
String linkDescr = request.getParameter( "LINK_DESCR" );
String objType = request.getParameter( "OBJ_TYPE" );
String objCtx = request.getParameter( "OBJ_CTXT" );
String invoiceId = request.getParameter( "INVOICE_ID" );
String refSeries = "S-INV";
%>
<html>
<head>
</head>
<body style="overflow:hidden;">
<iframe src="/ibase/webitm/jsp/InvoiceAdjustment.jsp?QRY_PARAM=<%=queryParam%>&QRY_PARAM_TYPE=<%=paramType%>&TAR_OBJ_NAME=<%=targetObject%>&LINK_DESCR=<%=linkDescr%>&OBJ_TYPE=<%=objType%>&INVOICE_ID=<%=invoiceId%>&REF_ID=<%=refSeries%>" width="100%" height="100%" class="FrameFlowPanel" style="border:none;"></iframe>
</body>
</html>
<%@page import = "java.lang.*,java.util.*, ibase.webitm.utility.*"%>
<%
response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT");
response.setHeader("Cache-Control", "no-store, no-cache,must-revalidate");
response.addHeader("Cache-Control", "post-check=0, pre-check=0");
response.setHeader("Pragma", "no-cache");
%>
<%
System.out.println("#######################################################");
System.out.println("InvoiceAdjustment.jsp ");
System.out.println("#######################################################");
ibase.utility.UserInfoBean userInfo = ( ibase.utility.UserInfoBean )session.getAttribute( "USER_INFO" );
System.out.println("TransDB ::["+userInfo.getTransDB()+"]");
if( userInfo == null )
{
out.println("Your session has been expired. Please re-login.");
}
String queryParam = request.getParameter( "QRY_PARAM" );
String paramType = request.getParameter( "QRY_PARAM_TYPE" );
String targetObject = request.getParameter( "TAR_OBJ_NAME" );
String linkDescr = request.getParameter( "LINK_DESCR" );
String objType = request.getParameter( "OBJ_TYPE" );
String objCtx = request.getParameter( "OBJ_CTXT" );
String invoiceId = request.getParameter( "INVOICE_ID" );
String refSeries = "S-INV";
System.out.println(" invoice Id ::"+invoiceId + "refSeries ::"+refSeries);
ibase.webitm.ejb.fin.InvoiceAdjustmentBean invoiceAdjustment = new ibase.webitm.ejb.fin.InvoiceAdjustmentBean();
String status = invoiceAdjustment.InvoiceAdjustmentInfo(invoiceId,refSeries,userInfo);
ibase.utility.E12GenericUtility genericUtilityObj = new ibase.utility.E12GenericUtility();
String displayThemeXSL = ( (String)session.getAttribute( "DISPLAY_THEME") )== null ? genericUtilityObj.getThemeFormat():(String)session.getAttribute( "DISPLAY_THEME");
%>
<html>
<HEAD>
<TITLE>
<%= targetObject %>
</TITLE>
<!-- Changed by Pravin on 28/07/08.[to apply theme, request ID- WS89BAS022 ]Start -->
<!-- <link type="text/css" rel="stylesheet" href="/ibase/webitm/css/default.css"/> -->
<link type="text/css" rel="stylesheet" href="/ibase/webitm/css/<%=displayThemeXSL%>/default.css"/>
<!-- Changed by Pravin on 28/07/08.[to apply theme, request ID- WS89BAS022 ]End -->
<!-- Added by Santosh on 11/02/2017 to link CSS file Start -->
<link type="text/css" rel="stylesheet" href="/ibase/webitm/css/SorderStatus.css"/>
<script type='text/javascript' language="javascript" src='/ibase/webitm/js/jquery-1.10.2.js'></script>
<!-- Added by Santosh on 11/02/2017 to link CSS file End -->
<script language="Javascript" src="../js/GlobalVar.js"></script>
<script language="Javascript" src="../js/GlobalFunc.js"></script>
<script language="Javascript" src="../js/ITMLinkPage.js"></script>
</HEAD>
<div id="linkBrowDiv">
</div>
<!-- Changed by Dhruv on 11/10/2007 to focus window on load -->
<!-- Changed by Santosh on 13/02/2017 -->
<%-- <body onLoad="loadLink(),viewLinkBrow('<%=targetObject%>','<%=queryParam%>','<%=paramType%>');window.focus();" class="" onClick = "hideContextMenu()"> --%>
<!-- <body onLoad="window.focus();removeDuplicateRows();" class="" onClick = "hideContextMenu()">
-->
<!--changes by sarita on 28NOV2017 -->
<body onLoad="window.focus();removeDuplicateRows();" class="" onClick = "hideContextMenu()" style="margin:0px;">
<!-- changes made by sanket on 12-09-16 for label width 100% from <hr style="position:absolute;top:2;left:5;height:22;width:790;background-color: #D7D7D7;font-family:Verdana"> -->
<!-- Commented by Santosh on 11/02/2017 Start -->
<%-- <hr style="position:absolute;top:2;left:5;height:22;width:99%;background-color: #D7D7D7;font-family:Verdana">
<b><a id ="menudescr" style ="position : absolute; top : 3;left:10;color: #0000FF;font-family:Tahoma;font-size: 12"><%= linkDescr %></a></b> --%>
<!-- Commented by Santosh on 11/02/2017 End -->
<!--//Added by sarita on 28NOV2017 -->
<%= status %>
</body>
<script>
link_obj_name = '<%= targetObject%>';
//Changed by Dayanand on 31/03/08 [Pass OBJ_CTXT for display link for selected form]
obj_ctx = '<%= objCtx%>';
//Changed by Roshan 22/11/07 [Gui related changes.Applying Theme]
displayTheme='<%= session.getAttribute( "DISPLAY_THEME")%>';
//Changed by Roshan 09/01/08 [to get obj type anywhere]
obj_Type = '<%= objType%>' ;
function invokeAction()
{
alert(" Not Allowed ");
}
</script>
</html>
\ No newline at end of file
package ibase.webitm.ejb.fin;
import ibase.planner.utility.ITMException;
import ibase.system.config.AppConnectParm;
import ibase.utility.CommonConstants;
import ibase.utility.E12GenericUtility;
import ibase.utility.UserInfoBean;
import java.io.File;
import javax.naming.InitialContext;
public class InvoiceAdjustmentBean
{
E12GenericUtility genericUtility = new E12GenericUtility();
private String user_lang ="en";
private String user_country = "US";
private String user_status = "V";
public String InvoiceAdjustmentInfo(String invoiceId,String ref_series,UserInfoBean userInfo) throws ITMException
{
InvoiceAdjustmentEJB invoiceAdjustmentEJB = null;
String getXmlData = "";
String xslFileName = "",finalString = "";
try
{
System.out.println("Inside InvoiceAdjustmentBean class");
System.out.println("Value of Invoice is 1234556::"+invoiceId +"ref_series ::"+ref_series);
AppConnectParm appConnect = new AppConnectParm();
InitialContext ctx = new InitialContext(appConnect.getProperty());
invoiceAdjustmentEJB = new InvoiceAdjustmentEJB();
getXmlData = invoiceAdjustmentEJB.getInvoiceAdjustmentXML(invoiceId,ref_series,userInfo);
System.out.println("Returned XML is ::::"+getXmlData);
xslFileName = getXSLFileName( "invoice_adjustment11_" + this.user_lang + "_" + this.user_country + "_" + this.user_status +".xsl" );
finalString = (genericUtility).transformToString(xslFileName, getXmlData, CommonConstants.APPLICATION_CONTEXT + File.separator + "temp", "Output", ".html");
}
catch(Exception e)
{
System.out.println("Exception Inside InvoiceAdjustmentBean InvoiceAdjustmentInfo() method ::"+e.getMessage());
throw new ITMException(e);
}
System.out.println("finalString is >>>>>>>>>>>"+finalString);
return finalString;
}
private String getXSLFileName( String xslFileName )throws ITMException
{
String retFileName = null;
try
{
String defaultPath = null;
if( CommonConstants.APPLICATION_CONTEXT != null )
{
defaultPath = CommonConstants.APPLICATION_CONTEXT + CommonConstants.ITM_CONTEXT + File.separator;
}
else
{
defaultPath = ".." + File.separator + "webapps" + File.separator + "ibase" + File.separator + CommonConstants.ITM_CONTEXT + File.separator;
}
File xslPath = new File( defaultPath + File.separator + "xsl" + File.separator + CommonConstants.THEME);
if ( !xslPath.exists() )
{
xslPath.mkdir();
}
System.out.println( " 1xslPath [" + xslPath +"] xslFileName ["+xslFileName +"]");
File xslFile = new File(xslPath , xslFileName);
if( xslFile.exists() )
{
retFileName = xslFile.getAbsolutePath();
}
else
{
throw new ITMException( new Exception( retFileName + " Wizard XSL file Not Found") );
}
}
catch (Exception e)
{
throw new ITMException(e);
}
return retFileName;
}//end of method getXSLFileName
}
\ No newline at end of file
This diff is collapsed.
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