Commit 2c105752 authored by SABURI PATEKAR's avatar SABURI PATEKAR

added validation in sales quotation amendment and customer perferred

distributor
parent bde49597
package ibase.webitm.ejb.dis;
/**
* AUTHOR : Gagandeep Bhatia 13-MAR-2026
* COMPONENT : VALIDATION AND ITEMCHANGE OF SALES QUOTATION AMENDMENT
**/
import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import javax.ejb.Stateless;
import org.w3c.dom.CDATASection;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import ibase.utility.BaseLogger;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.ejb.ValidatorLocal;
import ibase.webitm.ejb.ValidatorRemote;
import ibase.webitm.ejb.fin.FinCommon;
import ibase.webitm.ejb.sys.UtilMethods;
import ibase.webitm.utility.ITMException;
@Stateless
public class SalesQuotationAmdIC extends ValidatorEJB implements ValidatorLocal,ValidatorRemote
{
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
E12GenericUtility genericUtility = new E12GenericUtility();
DistCommon distCommon = new DistCommon();
FinCommon finCommon = new FinCommon();
public String wfValData(String xmlString, String xmlString1,String xmlString2, String objContext, String editFlag,String xtraParams) throws RemoteException, ITMException
{
String retString = "";
Document dom = null;
Document dom1 = null;
Document dom2 = null;
BaseLogger.log("3", getUserInfo(), null, "xmlString............." + xmlString);
BaseLogger.log("3", getUserInfo(), null, "xmlString1............" + xmlString1);
BaseLogger.log("3", getUserInfo(), null, "xmlString2............" + xmlString2);
try
{
if (xmlString != null && xmlString.trim().length() != 0)
{
dom = genericUtility.parseString(xmlString);
}
if (xmlString1 != null && xmlString1.trim().length() != 0)
{
dom1 = genericUtility.parseString(xmlString1);
}
if (xmlString2 != null && xmlString2.trim().length() != 0)
{
dom2 = genericUtility.parseString(xmlString2);
}
retString = wfValData(dom, dom1, dom2, objContext, editFlag,xtraParams);
BaseLogger.log("3", getUserInfo(), null, "ErrString :" + retString);
}
catch(Exception e)
{
BaseLogger.log("3", getUserInfo(), null, "Exception --["+e.getMessage()+"]");
e.printStackTrace();
throw new ITMException(e);
}
return retString;
}
public String wfValData(Document dom, Document dom1, Document dom2, String objContext, String editFlag, String xtraParams)throws RemoteException, ITMException
{
NodeList parentList = null;
Node parentNode = null;
NodeList childList = null;
Node childNode = null;
String childNodeName = "";
String userId = "";
Connection conn = null;
int currentFormNo = 0;
int ctr = 0;
int cnt = 0;
String siteCode = "" , modName = "";
String custCode="",currCode="",empCodeConf="",itemCode="",unit="",unitRate="",crTerm="",dlvTerm="",packCode="";
String taxClass="",taxChap="",taxEnv="";
Timestamp quotDate = null;
SimpleDateFormat dateFormat = null;
UtilMethods utilMethods = new UtilMethods();
DistCommon disCommon = new DistCommon();
FinCommon finCommon = new FinCommon();
String sql = "",salesPers = "",opprId = "";
PreparedStatement pstmt = null;
ResultSet rs = null;
String errCode = "" , errString = "" , errorType = "";
ArrayList<String> errList = new ArrayList<String>();
ArrayList<String> errFields = new ArrayList<String>();
StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>");
try
{
BaseLogger.log("3", getUserInfo(), null, "Inside wfValdata ***********");
conn = getConnection();
dateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat());
userId = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode"));
if (objContext != null && objContext.trim().length() > 0)
{
currentFormNo = Integer.parseInt(objContext);
}
switch (currentFormNo)
{
case 1:
{
parentList = dom.getElementsByTagName("Detail1");
parentNode = parentList.item(0);
childList = parentNode.getChildNodes();
BaseLogger.log("3", getUserInfo(), null, "Inside childList ***********"+childList);
for (ctr = 0; ctr < childList.getLength(); ctr++)
{
childNode = childList.item(ctr);
childNodeName = childNode.getNodeName();
BaseLogger.log("3", getUserInfo(), null, "Inside childNodeName ***********"+childNodeName);
if(childNodeName.equalsIgnoreCase("cust_code"))
{
custCode = genericUtility.getColumnValue("cust_code", dom);
BaseLogger.log("3", getUserInfo(), null, "custCode ["+custCode+"]");
if(custCode == null || custCode.trim().length() == 0)
{
errCode="VMCUSTCD1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
else
{
sql="select count(*) from customer where cust_code=? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCode);
rs = pstmt.executeQuery();
if(rs.next())
{
cnt = rs.getInt(1);
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt==0)
{
errCode="VTCUSTCD1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if(childNodeName.equalsIgnoreCase("curr_code"))
{
currCode= genericUtility.getColumnValue("curr_code", dom);
if(currCode==null || currCode.trim().length()==0)
{
errCode="VECUR2";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
else
{
sql="select count(*) from currency where curr_code=? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, currCode);
rs = pstmt.executeQuery();
if(rs.next())
{
cnt = rs.getInt(1);
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt==0)
{
errCode="VTCURRCD1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if (childNodeName.equalsIgnoreCase("emp_code__conf")) {
empCodeConf = genericUtility.getColumnValue("em_code__conf", dom);
if (empCodeConf != null && empCodeConf.trim().length() > 0) {
sql = "select count(*) from employee where emp_code=? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCodeConf);
rs = pstmt.executeQuery();
if (rs.next()) {
cnt = rs.getInt(1);
}
if (rs != null) {
rs.close();
rs = null;
}
if (pstmt != null) {
pstmt.close();
pstmt = null;
}
if (cnt == 0) {
errCode = "VMEMP1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if(childNodeName.equalsIgnoreCase("cr_term"))
{
crTerm= genericUtility.getColumnValue("cr_term", dom);
if(crTerm!=null && crTerm.trim().length()>0)
{
sql = "select count(*) from crterm where cr_term = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, crTerm);
rs = pstmt.executeQuery();
if(rs.next())
{
cnt = rs.getInt(1);
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt == 0)
{
errCode = "VTCRTERM1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if(childNodeName.equalsIgnoreCase("item_ser"))
{
String itemSer= genericUtility.getColumnValue("item_ser", dom);
if (itemSer == null || itemSer.trim().length() == 0) {
errCode = "VTITEMSER5";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
else
{
sql = "select count(*) from itemser where item_ser = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemSer);
rs = pstmt.executeQuery();
if(rs.next())
{
cnt = rs.getInt(1);
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt == 0)
{
errCode = "VTITMSER1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if(childNodeName.equalsIgnoreCase("dlv_term"))
{
dlvTerm= genericUtility.getColumnValue("dlv_term", dom);
if(dlvTerm!=null && dlvTerm.trim().length()>0)
{
sql = "select count(*) from delivery_term where dlv_term = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, dlvTerm);
rs = pstmt.executeQuery();
if(rs.next())
{
cnt = rs.getInt(1);
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt == 0)
{
errCode = "VMDLVTERM1"; //new message defined
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if (childNodeName.equalsIgnoreCase("sales_pers")) {
salesPers = genericUtility.getColumnValue("sales_pers", dom);
if (salesPers != null && salesPers.trim().length() > 0) {
sql = "select count(*) from sales_pers where sales_pers= ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, salesPers);
rs = pstmt.executeQuery();
if (rs.next()) {
cnt = rs.getInt(1);
}
if (rs != null) {
rs.close();
rs = null;
}
if (pstmt != null) {
pstmt.close();
pstmt = null;
}
if (cnt == 0) {
errCode = "VTSALPRN";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if (childNodeName.equalsIgnoreCase("oppr_id")) {
opprId = genericUtility.getColumnValue("oppr_id", dom);
BaseLogger.log("3", getUserInfo(), null, "opprId 362 ["+opprId+"]");
if (opprId != null && opprId.trim().length() > 0) {
sql = "select count(*) from opportunity where oppr_id= ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, opprId);
rs = pstmt.executeQuery();
if (rs.next()) {
cnt = rs.getInt(1);
}
if (rs != null) {
rs.close();
rs = null;
}
if (pstmt != null) {
pstmt.close();
pstmt = null;
}
if (cnt == 0) {
errCode = "VTOPPRID";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
//Added By Sakshi P on 29/Oct/2025
// tax_class
else if (childNodeName.equalsIgnoreCase("tax_class")) {
taxClass = checkNull(genericUtility.getColumnValue("tax_class", dom));
BaseLogger.log("3", getUserInfo(), null, "taxClass: " + taxClass);
if (taxClass.trim().length() != 0) {
if (!(isExist(conn, "taxclass", "tax_class", taxClass))) {
errCode = "VTTCLASS1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
BaseLogger.log("3", getUserInfo(), null, "Tax class not define in tax class master.");
}
}
}
// tax_chap
else if (childNodeName.equalsIgnoreCase("tax_chap")) {
taxChap = checkNull(genericUtility.getColumnValue("tax_chap", dom));
BaseLogger.log("3", getUserInfo(), null, "taxChap: " + taxChap);
if (taxChap.trim().length() > 0) {
if (!(isExist(conn, "taxchap", "tax_chap", taxChap))) {
errCode = "VTTCHAP1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
BaseLogger.log("3", getUserInfo(), null, "Tax chapter not define in tax chapter master");
}
}
}
// tax_env
else if (childNodeName.equalsIgnoreCase("tax_env")) {
taxEnv = checkNull(genericUtility.getColumnValue("tax_env", dom));
quotDate = Timestamp.valueOf(
genericUtility.getValidDateString(genericUtility.getColumnValue("quot_date", dom),
genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat())
+ " 00:00:00.0");
if (taxEnv.trim().length() != 0) {
if (!(isExist(conn, "taxenv", "tax_env", taxEnv))) {
errCode = "VTTENV1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
BaseLogger.log("3", getUserInfo(), null, "TAX ENVIRONMENT NOT DEFINED");
} else {
errCode = distCommon.getCheckTaxEnvStatus(taxEnv, quotDate, "S", conn);
if (errCode != null && errCode.trim().length() > 0) {
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
BaseLogger.log("3", getUserInfo(), null, "TAX ENVIRONMENT NOT DEFINED");
}
}
}
}
} // end for
} // End of Case 1
break;
case 2 :
{
parentList = dom.getElementsByTagName("Detail" + currentFormNo);
parentNode = parentList.item(0);
childList = parentNode.getChildNodes();
for (ctr = 0; ctr < childList.getLength(); ctr++)
{
childNode = childList.item(ctr);
childNodeName = childNode.getNodeName();
if(childNodeName.equalsIgnoreCase("item_code"))
{
itemCode = genericUtility.getColumnValue("item_code", dom);
if(itemCode==null || itemCode.trim().length()==0)
{
errCode = "VITMCODE";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
else
{
sql = "select count(*) from item where item_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, itemCode);
rs = pstmt.executeQuery();
if(rs.next())
{
cnt = rs.getInt(1);
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt == 0)
{
errCode = "VTITEM1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if(childNodeName.equalsIgnoreCase("unit"))
{
unit= genericUtility.getColumnValue("unit", dom);
if(unit==null || unit.trim().length()==0)
{
errCode = "VMUNIT";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
else
{
sql = "select count(*) from uom where unit = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, unit);
rs = pstmt.executeQuery();
if(rs.next())
{
cnt = rs.getInt(1);
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt == 0)
{
errCode = "VTUNIT1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if(childNodeName.equalsIgnoreCase("unit__rate"))
{
unitRate= genericUtility.getColumnValue("unit__rate", dom);
if(unitRate==null || unitRate.trim().length()==0)
{
//errCode = "VMBUSUNI01";
errCode = "VMUNIT";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
else
{
sql = "select count(*) from uom where unit = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, unitRate);
rs = pstmt.executeQuery();
if(rs.next())
{
cnt = rs.getInt(1);
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt == 0)
{
errCode = "VTUNIT1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if(childNodeName.equalsIgnoreCase("cr_term"))
{
crTerm= genericUtility.getColumnValue("cr_term", dom);
if(crTerm!=null && crTerm.trim().length()>0)
{
sql = "select count(*) from crterm where cr_term = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, crTerm);
rs = pstmt.executeQuery();
if(rs.next())
{
cnt = rs.getInt(1);
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt == 0)
{
errCode = "VTCRTERM1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if(childNodeName.equalsIgnoreCase("dlv_term"))
{
dlvTerm= genericUtility.getColumnValue("dlv_term", dom);
if(dlvTerm!=null && dlvTerm.trim().length()>0)
{
sql = "select count(*) from delivery_term where dlv_term = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, dlvTerm);
rs = pstmt.executeQuery();
if(rs.next())
{
cnt = rs.getInt(1);
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt == 0)
{
errCode = "VMDLVTERM1"; //new message defined
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
else if(childNodeName.equalsIgnoreCase("pack_code"))
{
packCode= genericUtility.getColumnValue("pack_code", dom);
if(packCode!=null && packCode.trim().length()>0)
{
sql = "select count(*) from packing where pack_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, packCode);
rs = pstmt.executeQuery();
if(rs.next())
{
cnt = rs.getInt(1);
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt == 0)
{
errCode = "VTPKCD1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}
}//end for
} //end case 2
break;
} //end switch
int errListSize = errList.size();
BaseLogger.log("3", getUserInfo(), null, "errListSize::::::::::"+errListSize);
int count = 0;
String errFldName = null;
if (errList != null && errListSize > 0)
{
for (count = 0; count < errListSize; count++)
{
errCode = errList.get(count);
errFldName = errFields.get(count);
BaseLogger.log("3", getUserInfo(), null, " testing :errCode .:" + errCode+"errString>>>>>>>>>"+errString);
errString = getErrorString(errFldName, errCode, userId);
errorType = errorType(conn, errCode);
if (errString.length() > 0)
{
String bifurErrString = errString.substring(errString.indexOf("<Errors>") + 8, errString.indexOf("<trace>"));
bifurErrString = bifurErrString + errString.substring(errString.indexOf("</trace>") + 8, errString.indexOf("</Errors>"));
errStringXml.append(bifurErrString);
errString = "";
}
if (errorType.equalsIgnoreCase("E"))
{
break;
}
}
errList.clear();
errList = null;
errFields.clear();
errFields = null;
errStringXml.append("</Errors> </Root> \r\n");
}//end of if for errList
else
{
errStringXml = new StringBuffer("");
}
errString = errStringXml.toString();
}
catch(Exception e)
{
BaseLogger.log("3", getUserInfo(), null, "Exception --["+e.getMessage()+"]");
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.close();
conn = null;
}
}
catch(Exception e)
{
BaseLogger.log("3", getUserInfo(), null, "Exception --["+e.getMessage()+"]");
e.printStackTrace();
throw new ITMException(e);
}
}
errString = errStringXml.toString();
BaseLogger.log("3", getUserInfo(), null, "testing : final errString : " + errString);
return errString;
}
public String itemChanged(String xmString, String xmString1, String xmString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException
{
Document dom = null;
Document dom1 = null;
Document dom2 = null;
String errString = null;
BaseLogger.log("3", getUserInfo(), null, "currFrmXmlStr::"+xmString);
BaseLogger.log("3", getUserInfo(), null, "hdrFrmXmlStr::"+xmString1);
BaseLogger.log("3", getUserInfo(), null, "allFrmXmlStr::"+xmString2);
try
{
if (xmString != null && xmString.trim().length()!=0)
{
dom = genericUtility.parseString(xmString);
}
if (xmString1 != null && xmString1.trim().length()!=0)
{
dom1 = genericUtility.parseString(xmString1);
}
if (xmString2 != null && xmString2.trim().length()!=0)
{
dom2 = genericUtility.parseString(xmString2);
}
errString = itemChanged(dom, dom1, dom2, objContext, currentColumn, editFlag, xtraParams);
BaseLogger.log("3", getUserInfo(), null, "ErrString :" + errString);
}
catch (Exception e)
{
BaseLogger.log("3", getUserInfo(), null, "Exception : ItemChanged(String,String):" + e.getMessage());
e.printStackTrace();
throw new ITMException(e);
}
return errString;
}
public String itemChanged(Document dom, Document dom1, Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException
{
NodeList parentNodeList = null, detailNodeList = null;
NodeList childNodeList = null;
Node parentNode = null;
Node childNode = null;
String childNodeName = null;
int ctr = 0;
int childNodeListLength = 0;
String columnValue = "";
StringBuffer valueXmlString = new StringBuffer();
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
String sql = "";
int currentFormNo = 0;
SimpleDateFormat sdf = null;
FinCommon finCommon = new FinCommon();
String currentDateTime = "", loginSite = "", loginCode = "";
String custCode = "", contPers = "", currCode = "", currCodeFinEnt = "", salesPers = "", salesPersDescr = "", custDescr ="", contPrefix = "";
String detCntStr = "", quotNo = "", unit = "", itemCode = "", itemDescr = "", unitRate = "";
String samplQty = "", unitSampl = "", schDate = "", schDateUpto = "";
String crTerm = "", dlvAt = "", dlvTerm = "", packCode = "", packInstr = "", remarks = "";
String itemSpec = "", specDescr = "", expectedResult = "";
int linecnt = 0;
double exchRate = 0;
try
{
conn = getConnection();
loginSite = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode");
loginCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
Timestamp todaysDate = new java.sql.Timestamp(System.currentTimeMillis());
currentDateTime = sdf.format(todaysDate);
if(objContext != null && objContext.trim().length() > 0)
{
currentFormNo = Integer.parseInt(objContext);
}
valueXmlString.append("<?xml version=\"1.0\"?>\r\n<Root>\r\n<Header>\r\n<editFlag>");
valueXmlString.append(editFlag).append("</editFlag>\r\n</Header>\r\n");
switch (currentFormNo)
{
case 1:
{
valueXmlString.append("<Detail1>");
parentNodeList = dom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes();
childNodeListLength = childNodeList.getLength();
do
{
childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName();
if (childNodeName.equals(currentColumn))
{
childNode.getFirstChild();
}
ctr++;
}
while ((ctr < childNodeListLength) && (!childNodeName.equals(currentColumn)));
BaseLogger.log("3", getUserInfo(), null, "CURRENT COLUMN ["+currentColumn+"]");
if(currentColumn.equalsIgnoreCase("itm_default"))
{
valueXmlString.append("<quot_date>").append("<![CDATA["+currentDateTime+"]]>").append("</quot_date>");
valueXmlString.append("<inq_date>").append("<![CDATA["+currentDateTime+"]]>").append("</inq_date>");
valueXmlString.append("<valid_upto>").append("<![CDATA["+currentDateTime+"]]>").append("</valid_upto>");
valueXmlString.append("<status_date>").append("<![CDATA["+currentDateTime+"]]>").append("</status_date>");
}
else if(currentColumn.equalsIgnoreCase("cust_code"))
{
String lsItemser="",lsSiteCode="",taxChapHdr="",taxClassHdr="",taxEnvHdr="";
String custTaxOpt="",orderType="",stanCodeFr="",custCodeTax="",custCodeBill="",stanCodeTo="",lsCustCodeDlv="";
custCode=genericUtility.getColumnValue("cust_code", dom);
lsItemser = checkNull(genericUtility.getColumnValue("item_ser", dom));
lsSiteCode = checkNull(genericUtility.getColumnValue("site_code", dom));
BaseLogger.log("3", getUserInfo(), null, "custCode ::::::: "+custCode + "\t" + "lsItemser ::::::"+lsItemser);
sql= "select cust_name,cont_pers,cont_pfx,curr_code,sales_pers,cr_term,dlv_term from customer where cust_code= ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,custCode);
rs = pstmt.executeQuery();
if(rs.next())
{
custDescr=rs.getString("cust_name");
contPers=rs.getString("cont_pers");
contPrefix=rs.getString("cont_pfx");
currCode=rs.getString("curr_code");
salesPers=rs.getString("sales_pers");
crTerm=rs.getString("cr_term");
dlvTerm=rs.getString("dlv_term");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
valueXmlString.append("<cust_name>").append("<![CDATA["+custDescr +"]]>").append("</cust_name>");
valueXmlString.append("<cont_pers>").append("<![CDATA["+contPers +"]]>").append("</cont_pers>");
valueXmlString.append("<sales_pers>").append("<![CDATA["+salesPers+"]]>").append("</sales_pers>");
valueXmlString.append("<cr_term>").append("<![CDATA["+crTerm+"]]>").append("</cr_term>");
valueXmlString.append("<dlv_term>").append("<![CDATA["+dlvTerm+"]]>").append("</dlv_term>");
sql= "select sp_name from sales_pers where sales_pers= ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,salesPers);
rs = pstmt.executeQuery();
if(rs.next())
{
salesPersDescr=rs.getString("sp_name");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
valueXmlString.append("<sp_name>").append("<![CDATA["+salesPersDescr+"]]>").append("</sp_name>");
if(currCode!=null && currCode.trim().length()>0)
{
valueXmlString.append("<curr_code>").append("<![CDATA["+currCode+"]]>").append("</curr_code>");
}
sql= "select curr_code from finent f, site s "
+" where f.fin_entity=s.fin_entity and s.site_code =? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,loginSite);
rs = pstmt.executeQuery();
if(rs.next())
{
currCodeFinEnt=rs.getString("curr_code");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(currCodeFinEnt.equalsIgnoreCase(currCode))
{
valueXmlString.append("<exch_rate protect = \"1\" >").append("<![CDATA[" + 1 + "]]>").append("</exch_rate>");
}
else
{
exchRate=finCommon.getDailyExchRateSellBuy(currCode, currCodeFinEnt, loginSite, currentDateTime, "S", conn);
BaseLogger.log("3", getUserInfo(), null, "exch rate by calling fincommon method>>"+exchRate);
valueXmlString.append("<exch_rate protect = \"0\" >").append("<![CDATA[" + exchRate + "]]>").append("</exch_rate>");
}
//Added by Sakshi.P on 15/Oct/2025
sql = "select stan_code from site where site_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsSiteCode);
rs = pstmt.executeQuery();
if (rs.next()) {
stanCodeFr = rs.getString("stan_code");
}
rs.close();rs = null;
pstmt.close();pstmt = null;
sql = "select stan_code from customer where cust_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCode);
rs = pstmt.executeQuery();
if (rs.next()) {
stanCodeTo = rs.getString("stan_code");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
BaseLogger.log("3", getUserInfo(), null, "stanCodeFr======["+stanCodeFr+"]");
BaseLogger.log("3", getUserInfo(), null, "stanCodeTo====== ["+stanCodeTo+"]");
taxChapHdr = distCommon.getTaxChap("", lsItemser, "C", custCode, lsSiteCode, conn);
taxClassHdr = distCommon.getTaxClass("C", custCode, "", lsSiteCode, conn);
sql = " select tax_env from site_customer where site_code = ? and cust_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsSiteCode);
pstmt.setString(2, custCode);
rs = pstmt.executeQuery();
if(rs.next())
{
taxEnvHdr= rs.getString("tax_env");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(taxEnvHdr==null || taxEnvHdr.trim().length()==0)
{
sql = " select tax_env from customer where cust_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCode);
rs = pstmt.executeQuery();
if(rs.next())
{
taxEnvHdr= rs.getString("tax_env");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(taxEnvHdr==null || taxEnvHdr.trim().length()==0)
{
taxEnvHdr = distCommon.getTaxEnv(stanCodeFr, stanCodeTo, taxChapHdr, taxClassHdr, lsSiteCode, conn);
}
}
BaseLogger.log("3", getUserInfo(), null, "tax class======["+taxClassHdr+"]");
BaseLogger.log("3", getUserInfo(), null, "tax chap======["+taxChapHdr+"]");
BaseLogger.log("3", getUserInfo(), null, "tax env 11111::taxChapHdr["+taxEnvHdr+"]");
valueXmlString.append("<tax_class>").append("<![CDATA[" + taxClassHdr + "]]>").append("</tax_class>");
setNodeValue(dom, "tax_class", getAbsString(taxClassHdr));
valueXmlString.append("<tax_chap>").append("<![CDATA[" + taxChapHdr + "]]>").append("</tax_chap>");
setNodeValue(dom, "tax_chap", getAbsString(taxChapHdr));
valueXmlString.append("<tax_env>").append("<![CDATA[" + taxEnvHdr + "]]>").append("</tax_env>");
setNodeValue(dom, "tax_env", getAbsString(taxEnvHdr));
//end
}
else if(currentColumn.equalsIgnoreCase("sales_pers"))
{
salesPers=genericUtility.getColumnValue("sales_pers", dom);
sql= "select sp_name from sales_pers where sales_pers= ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,salesPers);
rs = pstmt.executeQuery();
if(rs.next())
{
salesPersDescr=rs.getString("sp_name");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
valueXmlString.append("<sp_name>").append("<![CDATA["+salesPersDescr+"]]>").append("</sp_name>");
}
else if(currentColumn.equalsIgnoreCase("curr_code"))
{
currCode=genericUtility.getColumnValue("curr_code", dom);
sql= "select curr_code from finent f, site s "
+" where f.fin_entity=s.fin_entity and s.site_code =? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,loginSite);
rs = pstmt.executeQuery();
if(rs.next())
{
currCodeFinEnt=rs.getString("curr_code");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(currCodeFinEnt.equalsIgnoreCase(currCode))
{
valueXmlString.append("<exch_rate protect = \"1\" >").append("<![CDATA[" + 1 + "]]>").append("</exch_rate>");
}
else
{
exchRate=finCommon.getDailyExchRateSellBuy(currCode, currCodeFinEnt, loginSite, currentDateTime, "S", conn);
BaseLogger.log("3", getUserInfo(), null, "exch rate by calling fincommon method>>"+exchRate);
valueXmlString.append("<exch_rate protect = \"0\" >").append("<![CDATA[" + exchRate + "]]>").append("</exch_rate>");
}
}
else if(currentColumn.equalsIgnoreCase("quot_no"))
{
String quotType="",inqSource="",empCodeConf1="",status1="",enqNo="",sampleRef="",termTable="";
String stockistCodeDlv="",dlvLocation="",priceList1="",itemSer1="",parentQuotNo="";
String custName="", opprId ="", origQuotRed="";
String taxClassHdr="",taxChapHdr="",taxEnvHdr="",siteCode1="";
Timestamp quotDateTs=null,inqDateTs=null,validUptoTs=null,statusDateTs=null;
double freight1=0,exchRate1=0,vat1=0,quotationCost1=0;
int prnpQuot1=0,supplyLeadtime1=0;
String errString="";
quotNo = checkNull(genericUtility.getColumnValue("quot_no", dom));
BaseLogger.log("3", getUserInfo(), null, "INSIDE IC quot_no .... "+quotNo);
if(currentColumn.equalsIgnoreCase("quot_no"))
{
if(quotNo.length() > 0)
{
String sqlObj = "SELECT COUNT(*) FROM SALES_QUOT WHERE QUOT_NO = ? AND CONFIRMED = 'Y'";
pstmt = conn.prepareStatement(sqlObj);
pstmt.setString(1, quotNo);
rs = pstmt.executeQuery();
int count = 0;
if(rs.next())
{
count = rs.getInt(1);
}
if(count == 0)
{
String errCode = "VTINVQNO";
errString = itmDBAccessEJB.getErrorString("", errCode, "", "", conn);
if(rs != null) { rs.close(); rs = null; }
if(pstmt != null) { pstmt.close(); pstmt = null; }
return errString;
}
if(rs != null) { rs.close(); rs = null; }
if(pstmt != null) { pstmt.close(); pstmt = null; }
}
}
if(currentColumn.equalsIgnoreCase("quot_no") && quotNo.length() > 0)
{
sql = " select quot_date, quot_type, cust_code, inq_date, inq_source, valid_upto, " +
" emp_code__conf, status, status_date, curr_code, exch_rate, cont_pers, sales_pers, " +
" enq_no, sample_ref, freight, cr_term, dlv_term, term_table, " +
" stockist_code__dlv, dlv_location, site_code, price_list, supply_leadtime, item_ser, " +
" tax_class, tax_chap, tax_env, parent_quot_no, prnp_quot, vat, quotation_cost ," +
" oppr_id, orig_quot_ref " +
" from SALES_QUOT where quot_no = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, quotNo);
rs = pstmt.executeQuery();
if(rs.next())
{
quotDateTs = rs.getTimestamp("quot_date");
quotType = checkNull(rs.getString("quot_type"));
custCode = checkNull(rs.getString("cust_code"));
inqDateTs = rs.getTimestamp("inq_date");
inqSource = checkNull(rs.getString("inq_source"));
validUptoTs = rs.getTimestamp("valid_upto");
empCodeConf1 = checkNull(rs.getString("emp_code__conf"));
status1 = checkNull(rs.getString("status"));
statusDateTs = rs.getTimestamp("status_date");
currCode = checkNull(rs.getString("curr_code"));
exchRate1 = rs.getDouble("exch_rate");
contPers = checkNull(rs.getString("cont_pers"));
salesPers = checkNull(rs.getString("sales_pers"));
enqNo = checkNull(rs.getString("enq_no"));
sampleRef = checkNull(rs.getString("sample_ref"));
freight1 = rs.getDouble("freight");
crTerm = checkNull(rs.getString("cr_term"));
dlvTerm = checkNull(rs.getString("dlv_term"));
termTable = checkNull(rs.getString("term_table"));
stockistCodeDlv = checkNull(rs.getString("stockist_code__dlv"));
dlvLocation = checkNull(rs.getString("dlv_location"));
siteCode1 = checkNull(rs.getString("site_code"));
priceList1 = checkNull(rs.getString("price_list"));
supplyLeadtime1 = rs.getInt("supply_leadtime");
itemSer1 = checkNull(rs.getString("item_ser"));
taxClassHdr = checkNull(rs.getString("tax_class"));
taxChapHdr = checkNull(rs.getString("tax_chap"));
taxEnvHdr = checkNull(rs.getString("tax_env"));
parentQuotNo = checkNull(rs.getString("parent_quot_no"));
prnpQuot1 = rs.getInt("prnp_quot");
vat1 = rs.getDouble("vat");
quotationCost1 = rs.getDouble("quotation_cost");
opprId = checkNull(rs.getString("oppr_id"));
origQuotRed = checkNull(rs.getString("orig_quot_ref"));
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
// Fetch customer name
sql = "select cust_name from customer where cust_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCode);
rs = pstmt.executeQuery();
if(rs.next())
{
custName = checkNull(rs.getString("cust_name"));
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
// Fetch sales person name
sql = "select sp_name from sales_pers where sales_pers = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, salesPers);
rs = pstmt.executeQuery();
if(rs.next())
{
salesPersDescr = checkNull(rs.getString("sp_name"));
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
// Set header fields from original quotation
if(quotDateTs != null)
{
valueXmlString.append("<quot_date>").append("<![CDATA["+sdf.format(quotDateTs)+"]]>").append("</quot_date>");
}
valueXmlString.append("<quot_type>").append("<![CDATA["+quotType+"]]>").append("</quot_type>");
valueXmlString.append("<cust_code>").append("<![CDATA["+custCode+"]]>").append("</cust_code>");
valueXmlString.append("<cust_name>").append("<![CDATA["+custName+"]]>").append("</cust_name>");
if(inqDateTs != null)
{
valueXmlString.append("<inq_date>").append("<![CDATA["+sdf.format(inqDateTs)+"]]>").append("</inq_date>");
}
valueXmlString.append("<inq_source>").append("<![CDATA["+inqSource+"]]>").append("</inq_source>");
if(validUptoTs != null)
{
valueXmlString.append("<valid_upto_o>").append("<![CDATA["+sdf.format(validUptoTs)+"]]>").append("</valid_upto_o>");
valueXmlString.append("<valid_upto>").append("<![CDATA["+sdf.format(validUptoTs)+"]]>").append("</valid_upto>");
}
valueXmlString.append("<emp_code__conf>").append("<![CDATA["+empCodeConf1+"]]>").append("</emp_code__conf>");
valueXmlString.append("<status>").append("<![CDATA["+status1+"]]>").append("</status>");
if(statusDateTs != null)
{
valueXmlString.append("<status_date>").append("<![CDATA["+sdf.format(statusDateTs)+"]]>").append("</status_date>");
}
valueXmlString.append("<curr_code>").append("<![CDATA["+currCode+"]]>").append("</curr_code>");
valueXmlString.append("<exch_rate>").append("<![CDATA["+exchRate1+"]]>").append("</exch_rate>");
valueXmlString.append("<cont_pers>").append("<![CDATA["+contPers+"]]>").append("</cont_pers>");
valueXmlString.append("<sales_pers>").append("<![CDATA["+salesPers+"]]>").append("</sales_pers>");
valueXmlString.append("<sp_name>").append("<![CDATA["+salesPersDescr+"]]>").append("</sp_name>");
valueXmlString.append("<enq_no>").append("<![CDATA["+enqNo+"]]>").append("</enq_no>");
valueXmlString.append("<sample_ref>").append("<![CDATA["+sampleRef+"]]>").append("</sample_ref>");
valueXmlString.append("<freight>").append("<![CDATA["+freight1+"]]>").append("</freight>");
valueXmlString.append("<cr_term>").append("<![CDATA["+crTerm+"]]>").append("</cr_term>");
valueXmlString.append("<dlv_term>").append("<![CDATA["+dlvTerm+"]]>").append("</dlv_term>");
valueXmlString.append("<term_table>").append("<![CDATA["+termTable+"]]>").append("</term_table>");
valueXmlString.append("<stockist_code__dlv>").append("<![CDATA["+stockistCodeDlv+"]]>").append("</stockist_code__dlv>");
valueXmlString.append("<dlv_location>").append("<![CDATA["+dlvLocation+"]]>").append("</dlv_location>");
valueXmlString.append("<site_code>").append("<![CDATA["+siteCode1+"]]>").append("</site_code>");
valueXmlString.append("<price_list>").append("<![CDATA["+priceList1+"]]>").append("</price_list>");
valueXmlString.append("<supply_leadtime>").append("<![CDATA["+supplyLeadtime1+"]]>").append("</supply_leadtime>");
valueXmlString.append("<item_ser>").append("<![CDATA["+itemSer1+"]]>").append("</item_ser>");
valueXmlString.append("<tax_class>").append("<![CDATA["+taxClassHdr+"]]>").append("</tax_class>");
setNodeValue(dom, "tax_class", getAbsString(taxClassHdr));
valueXmlString.append("<tax_chap>").append("<![CDATA["+taxChapHdr+"]]>").append("</tax_chap>");
setNodeValue(dom, "tax_chap", getAbsString(taxChapHdr));
valueXmlString.append("<tax_env>").append("<![CDATA["+taxEnvHdr+"]]>").append("</tax_env>");
setNodeValue(dom, "tax_env", getAbsString(taxEnvHdr));
valueXmlString.append("<parent_quot_no>").append("<![CDATA["+parentQuotNo+"]]>").append("</parent_quot_no>");
valueXmlString.append("<prnp_quot>").append("<![CDATA["+prnpQuot1+"]]>").append("</prnp_quot>");
valueXmlString.append("<vat>").append("<![CDATA["+vat1+"]]>").append("</vat>");
valueXmlString.append("<quotation_cost>").append("<![CDATA["+quotationCost1+"]]>").append("</quotation_cost>");
valueXmlString.append("<oppr_id>").append("<![CDATA["+opprId+"]]>").append("</oppr_id>");
valueXmlString.append("<orig_quot_ref>").append("<![CDATA["+origQuotRed+"]]>").append("</orig_quot_ref>");
}
}
valueXmlString.append("</Detail1>");
// Set quot_no in second form as protected (uneditable)
if(quotNo != null && quotNo.trim().length() > 0)
{
String amdNo1 = checkNull(genericUtility.getColumnValue("amd_no", dom));
valueXmlString.append("<Detail2>");
valueXmlString.append("<quot_no protect=\"1\">").append("<![CDATA[" + quotNo + "]]>").append("</quot_no>");
valueXmlString.append("<amd_no protect=\"1\">").append("<![CDATA[" + amdNo1 + "]]>").append("</amd_no>");
valueXmlString.append("</Detail2>");
valueXmlString.append("<Detail3>");
valueXmlString.append("<quot_no protect=\"1\">").append("<![CDATA[" + quotNo + "]]>").append("</quot_no>");
valueXmlString.append("<amd_no protect=\"1\">").append("<![CDATA[" + amdNo1 + "]]>").append("</amd_no>");
valueXmlString.append("</Detail3>");
}
}
break;
case 2:
{
parentNodeList = dom.getElementsByTagName("Detail2");
parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes();
valueXmlString.append("<Detail2>");
childNodeListLength = childNodeList.getLength();
do
{
childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName();
if (childNodeName.equals(currentColumn))
{
if (childNode.getFirstChild() != null)
{
columnValue = childNode.getFirstChild().getNodeValue().trim();
}
}
ctr++;
}
while ((ctr < childNodeListLength) && (!childNodeName.equals(currentColumn)));
BaseLogger.log("3", getUserInfo(), null, "CURRENT COLUMN ["+currentColumn+"]");
if (currentColumn.trim().equalsIgnoreCase("itm_defaultedit"))
{
BaseLogger.log("3", getUserInfo(), null, "Item Default Edit+++++");
quotNo= checkNull(genericUtility.getColumnValue("quot_no", dom1));
String amdNoEdit = checkNull(genericUtility.getColumnValue("amd_no", dom1));
valueXmlString.append("<quot_no protect=\"1\">").append("<![CDATA[" + quotNo + "]]>").append("</quot_no>");
valueXmlString.append("<amd_no protect=\"1\">").append("<![CDATA[" + amdNoEdit + "]]>").append("</amd_no>");
String lcrate1 = "", lcQty1 = "" , taxAmtStr= "" , discountStr= "";
double lcrate = 0 ,lcQty =0 , taxamt= 0 , discount = 0, netAmount = 0.0;
lcrate1 = checkNull(genericUtility.getColumnValue("rate", dom));
lcrate = (lcrate1 == null || lcrate1.trim().length() == 0) ? 0 : Double.parseDouble(lcrate1);
lcQty1 = checkNull(genericUtility.getColumnValue("quantity", dom));
lcQty = (lcQty1 == null || lcQty1.trim().length() == 0) ? 0 : Double.parseDouble(lcQty1);
taxAmtStr = checkNull(genericUtility.getColumnValue("tax_amt", dom,"2"));
BaseLogger.log("3", getUserInfo(), null, "taxAmtStr----)[" + taxAmtStr + "]");
taxamt = (taxAmtStr == null || taxAmtStr.trim().length() == 0) ? 0 : Double.parseDouble(taxAmtStr);
BaseLogger.log("3", getUserInfo(), null, "Quantity[" + lcQty+ "]");
BaseLogger.log("3", getUserInfo(), null, "Rate[" + lcrate+ "]");
netAmount = (lcQty*lcrate)+taxamt ;
netAmount = finCommon.getRequiredDecimal(netAmount,2);
BaseLogger.log("3", getUserInfo(), null, "Net Amount(lcQty*lcrate)+taxamt-discount)[" + netAmount+ "]");
valueXmlString.append("<net_amt>").append("<![CDATA["+netAmount+"]]>").append("</net_amt>");
}
else if(currentColumn.equalsIgnoreCase("itm_default"))
{
quotNo= checkNull(genericUtility.getColumnValue("quot_no", dom1));
String amdNoF2 = checkNull(genericUtility.getColumnValue("amd_no", dom1));
detCntStr = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"detCnt");
BaseLogger.log("3", getUserInfo(), null, "Values of detCntStr ["+detCntStr+"]");
detailNodeList = dom2.getElementsByTagName("Detail2");
linecnt = detailNodeList.getLength();
valueXmlString.append("<quot_no protect=\"1\">").append("<![CDATA[" + quotNo + "]]>").append("</quot_no>");
valueXmlString.append("<amd_no protect=\"1\">").append("<![CDATA[" + amdNoF2 + "]]>").append("</amd_no>");
// above commented pb code migrated to the following
if (linecnt > 1 )
{
Node currDetail = detailNodeList.item(linecnt - 1);
unit= genericUtility.getColumnValueFromNode("unit", currDetail);
itemCode= genericUtility.getColumnValueFromNode("item_code", currDetail);
itemDescr= genericUtility.getColumnValueFromNode("item_descr", currDetail);
unitRate= genericUtility.getColumnValueFromNode("unit__rate", currDetail);
samplQty= genericUtility.getColumnValueFromNode("sampl_qty", currDetail);
unitSampl= genericUtility.getColumnValueFromNode("unit__sampl", currDetail);
BaseLogger.log("3", getUserInfo(), null, "before getting dom");
schDate = checkNull(genericUtility.getColumnValueFromNode("sch_date",currDetail));
schDateUpto = checkNull(genericUtility.getColumnValueFromNode("sch_date_upto",currDetail));
BaseLogger.log("3", getUserInfo(), null, "schdate>>>"+schDate+" "+"sch date upto>>>>"+schDateUpto);
crTerm= genericUtility.getColumnValueFromNode("cr_term", currDetail);
dlvAt= genericUtility.getColumnValueFromNode("dlv_at", currDetail);
dlvTerm= genericUtility.getColumnValueFromNode("dlv_term", currDetail);
packCode= genericUtility.getColumnValueFromNode("pack_code", currDetail);
packInstr= genericUtility.getColumnValueFromNode("pack_instr", currDetail);
remarks= genericUtility.getColumnValueFromNode("remarks", currDetail);
itemSpec= genericUtility.getColumnValueFromNode("item_spec", currDetail);
valueXmlString.append("<unit>").append("<![CDATA[" + unit + "]]>").append("</unit>");
valueXmlString.append("<item_code>").append("<![CDATA[" + itemCode + "]]>").append("</item_code>");
valueXmlString.append("<item_descr>").append("<![CDATA[" + itemDescr + "]]>").append("</item_descr>");
valueXmlString.append("<unit__rate>").append("<![CDATA[" + unitRate + "]]>").append("</unit__rate>");
valueXmlString.append("<sampl_qty>").append("<![CDATA[" + samplQty + "]]>").append("</sampl_qty>");
valueXmlString.append("<unit__sampl>").append("<![CDATA[" + unitSampl + "]]>").append("</unit__sampl>");
valueXmlString.append("<sch_date>").append("<![CDATA[" + schDate + "]]>").append("</sch_date>");
valueXmlString.append("<sch_date_upto>").append("<![CDATA[" + schDateUpto + "]]>").append("</sch_date_upto>");
valueXmlString.append("<dlv_at>").append("<![CDATA[" + dlvAt + "]]>").append("</dlv_at>");
valueXmlString.append("<pack_code>").append("<![CDATA[" + packCode + "]]>").append("</pack_code>");
valueXmlString.append("<pack_instr>").append("<![CDATA[" + packInstr + "]]>").append("</pack_instr>");
valueXmlString.append("<remarks>").append("<![CDATA[" + remarks + "]]>").append("</remarks>");
valueXmlString.append("<item_spec>").append("<![CDATA[" + itemSpec + "]]>").append("</item_spec>");
valueXmlString.append("<cr_term>").append("<![CDATA[" + crTerm + "]]>").append("</cr_term>");
valueXmlString.append("<dlv_term>").append("<![CDATA[" + dlvTerm + "]]>").append("</dlv_term>");
}
else
{
crTerm= genericUtility.getColumnValue("cr_term", dom1);
dlvTerm= genericUtility.getColumnValue("dlv_term", dom1);
valueXmlString.append("<cr_term>").append("<![CDATA[" + crTerm + "]]>").append("</cr_term>");
valueXmlString.append("<dlv_term>").append("<![CDATA[" + dlvTerm + "]]>").append("</dlv_term>");
}
}
else if(currentColumn.equalsIgnoreCase("item_code"))
{
itemCode=genericUtility.getColumnValue("item_code", dom);
sql= "select descr,unit from item where item_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,itemCode);
rs = pstmt.executeQuery();
if(rs.next())
{
itemDescr=rs.getString("descr");
unit=rs.getString("unit");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
valueXmlString.append("<item_descr>").append("<![CDATA["+itemDescr+"]]>").append("</item_descr>");
valueXmlString.append("<unit>").append("<![CDATA["+unit+"]]>").append("</unit>");
valueXmlString.append("<unit__rate>").append("<![CDATA["+unit+"]]>").append("</unit__rate>");
valueXmlString.append("<unit__sampl>").append("<![CDATA["+unit+"]]>").append("</unit__sampl>");
sql= "Select a.spec_descr, b.expected_result "
+" from qc_tabledet b, "
+" qlty_specs a "
+" where a.spec_code = b.spec_code and "
+" b.qc_tableno = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,itemCode);
rs = pstmt.executeQuery();
if(rs.next())
{
specDescr=rs.getString("spec_descr");
expectedResult=rs.getString("expected_result");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
itemSpec=itemSpec + specDescr + " " +expectedResult; //str1 = str1 + s1 + ' ' + s2 + space(101 - len(s1+s2))
valueXmlString.append("<item_spec>").append("<![CDATA["+itemSpec+"]]>").append("</item_spec>");
// Fetch original quotation detail data for the selected item_code
String quotNoHdr = checkNull(genericUtility.getColumnValue("quot_no", dom1));
BaseLogger.log("3", getUserInfo(), null, "quotNoHdr for SALES_QUOTDET fetch: ["+quotNoHdr+"] itemCode: ["+itemCode+"]");
if(quotNoHdr != null && quotNoHdr.trim().length() > 0 && itemCode != null && itemCode.trim().length() > 0)
{
double detQuantity=0,detRate=0,detRateClg=0,detSamplQty=0,detPackQty=0;
String detUnitRate="",detUnitSampl="",detRemarks="",detPackInstr="",detCrTerm="",detDlvTerm="";
String detPackCode="",detDlvAt="",detSpecRef="",detItemSpec="";
Timestamp detSchDate=null,detSchDateUpto=null;
sql = " select quantity, rate, rate__clg, unit__rate, sch_date, sampl_qty, unit__sampl, " +
" remarks, pack_instr, cr_term, dlv_term, item_spec, pack_code, " +
" sch_date_upto, pack_qty, dlv_at, spec_ref " +
" from SALES_QUOTDET where quot_no = ? and item_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, quotNoHdr);
pstmt.setString(2, itemCode);
rs = pstmt.executeQuery();
if(rs.next())
{
detQuantity = rs.getDouble("quantity");
detRate = rs.getDouble("rate");
detRateClg = rs.getDouble("rate__clg");
detUnitRate = checkNull(rs.getString("unit__rate"));
detSchDate = rs.getTimestamp("sch_date");
detSamplQty = rs.getDouble("sampl_qty");
detUnitSampl = checkNull(rs.getString("unit__sampl"));
detRemarks = checkNull(rs.getString("remarks"));
detPackInstr = checkNull(rs.getString("pack_instr"));
detCrTerm = checkNull(rs.getString("cr_term"));
detDlvTerm = checkNull(rs.getString("dlv_term"));
detItemSpec = checkNull(rs.getString("item_spec"));
detPackCode = checkNull(rs.getString("pack_code"));
detSchDateUpto = rs.getTimestamp("sch_date_upto");
detPackQty = rs.getDouble("pack_qty");
detDlvAt = checkNull(rs.getString("dlv_at"));
detSpecRef = checkNull(rs.getString("spec_ref"));
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
valueXmlString.append("<quantity_o>").append("<![CDATA["+detQuantity+"]]>").append("</quantity_o>");
valueXmlString.append("<quantity>").append("<![CDATA["+detQuantity+"]]>").append("</quantity>");
valueXmlString.append("<rate>").append("<![CDATA["+detRate+"]]>").append("</rate>");
valueXmlString.append("<rate__clg>").append("<![CDATA["+detRateClg+"]]>").append("</rate__clg>");
if(detUnitRate != null && detUnitRate.trim().length() > 0)
{
valueXmlString.append("<unit__rate_o>").append("<![CDATA["+detUnitRate+"]]>").append("</unit__rate_o>");
valueXmlString.append("<unit__rate>").append("<![CDATA["+detUnitRate+"]]>").append("</unit__rate>");
}
if(detSchDate != null)
{
valueXmlString.append("<sch_date>").append("<![CDATA["+sdf.format(detSchDate)+"]]>").append("</sch_date>");
}
valueXmlString.append("<sampl_qty>").append("<![CDATA["+detSamplQty+"]]>").append("</sampl_qty>");
if(detUnitSampl != null && detUnitSampl.trim().length() > 0)
{
valueXmlString.append("<unit__sampl>").append("<![CDATA["+detUnitSampl+"]]>").append("</unit__sampl>");
}
valueXmlString.append("<remarks>").append("<![CDATA["+detRemarks+"]]>").append("</remarks>");
valueXmlString.append("<pack_instr>").append("<![CDATA["+detPackInstr+"]]>").append("</pack_instr>");
valueXmlString.append("<cr_term>").append("<![CDATA["+detCrTerm+"]]>").append("</cr_term>");
valueXmlString.append("<dlv_term>").append("<![CDATA["+detDlvTerm+"]]>").append("</dlv_term>");
if(detItemSpec != null && detItemSpec.trim().length() > 0)
{
valueXmlString.append("<item_spec>").append("<![CDATA["+detItemSpec+"]]>").append("</item_spec>");
}
valueXmlString.append("<pack_code>").append("<![CDATA["+detPackCode+"]]>").append("</pack_code>");
if(detSchDateUpto != null)
{
valueXmlString.append("<sch_date_upto>").append("<![CDATA["+sdf.format(detSchDateUpto)+"]]>").append("</sch_date_upto>");
}
valueXmlString.append("<pack_qty>").append("<![CDATA["+detPackQty+"]]>").append("</pack_qty>");
valueXmlString.append("<dlv_at>").append("<![CDATA["+detDlvAt+"]]>").append("</dlv_at>");
valueXmlString.append("<spec_ref>").append("<![CDATA["+detSpecRef+"]]>").append("</spec_ref>");
}
//Added by Sakshi.P on 27/Oct/2025
String lsTaxChapHdr="",lsTaxClassHdr="",lsTaxEnvHdr="",lsSiteCode="",stanCodeFr="",stanCodeTo="",lsItemser="";
String taxChapHdr="",taxClassHdr="",taxEnvHdr="",custCode1="";
lsTaxChapHdr = checkNull(genericUtility.getColumnValue("tax_chap", dom1));
lsTaxClassHdr = checkNull(genericUtility.getColumnValue("tax_class", dom1));
lsTaxEnvHdr = checkNull(genericUtility.getColumnValue("tax_env", dom1));
lsSiteCode= checkNull(genericUtility.getColumnValue("site_code", dom1));
lsItemser= checkNull(genericUtility.getColumnValue("item_ser", dom1));
custCode1=genericUtility.getColumnValue("cust_code", dom1);
BaseLogger.log("3", getUserInfo(), null, "lsTaxChapHdr dom1:["+lsTaxChapHdr+"] lsTaxClassHdr dom1 ["+lsTaxClassHdr+"]lsTaxEnvHdr dom1"+lsTaxEnvHdr);
sql = "select stan_code from site where site_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsSiteCode);
rs = pstmt.executeQuery();
if (rs.next()) {
stanCodeFr = rs.getString("stan_code");
}
rs.close();rs = null;
pstmt.close();pstmt = null;
sql = "select stan_code from customer where cust_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCode1);
rs = pstmt.executeQuery();
if (rs.next()) {
stanCodeTo = rs.getString("stan_code");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
BaseLogger.log("3", getUserInfo(), null, "stanCodeFr======["+stanCodeFr+"]");
BaseLogger.log("3", getUserInfo(), null, "stanCodeTo====== ["+stanCodeTo+"]");
taxChapHdr = distCommon.getTaxChap(itemCode, lsItemser, "C", custCode1, lsSiteCode, conn);
taxClassHdr = distCommon.getTaxClass("C", custCode1, itemCode, lsSiteCode, conn);
BaseLogger.log("3", getUserInfo(), null, "lsTaxChap from method ["+taxChapHdr+"]lsTaxClass"+taxClassHdr);
if (lsTaxEnvHdr == null || lsTaxEnvHdr.trim().length() == 0) {
sql = " select tax_env from site_customer where site_code = ? and cust_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsSiteCode);
pstmt.setString(2, custCode1);
rs = pstmt.executeQuery();
if(rs.next())
{
taxEnvHdr= rs.getString("tax_env");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(taxEnvHdr==null || taxEnvHdr.trim().length()==0)
{
sql = " select tax_env from customer where cust_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCode1);
rs = pstmt.executeQuery();
if(rs.next())
{
taxEnvHdr= rs.getString("tax_env");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(taxEnvHdr==null || taxEnvHdr.trim().length()==0)
{
taxEnvHdr = distCommon.getTaxEnv(stanCodeFr, stanCodeTo, taxChapHdr, taxClassHdr, lsSiteCode, conn);
BaseLogger.log("3", getUserInfo(), null, "tax ENV From discommon["+taxEnvHdr+"]");
}
}
}
else
{
taxEnvHdr = lsTaxEnvHdr;
}
BaseLogger.log("3", getUserInfo(), null, "tax class222======["+taxClassHdr+"]");
BaseLogger.log("3", getUserInfo(), null, "tax chap222======["+taxChapHdr+"]");
BaseLogger.log("3", getUserInfo(), null, "tax env2222 taxChapHdr["+taxEnvHdr+"]");
valueXmlString.append("<tax_class>").append("<![CDATA[" + taxClassHdr + "]]>").append("</tax_class>");
setNodeValue(dom, "tax_class", getAbsString(taxClassHdr));
valueXmlString.append("<tax_chap>").append("<![CDATA[" + taxChapHdr + "]]>").append("</tax_chap>");
setNodeValue(dom, "tax_chap", getAbsString(taxChapHdr));
valueXmlString.append("<tax_env>").append("<![CDATA[" + taxEnvHdr + "]]>").append("</tax_env>");
setNodeValue(dom, "tax_env", getAbsString(taxEnvHdr));
}
else if(currentColumn.equalsIgnoreCase("pack_code"))
{
packCode=genericUtility.getColumnValue("pack_code", dom);
sql= "select descr from packing where pack_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,packCode);
rs = pstmt.executeQuery();
if(rs.next())
{
packInstr=rs.getString("descr");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
valueXmlString.append("<pack_instr>").append("<![CDATA["+packInstr+"]]>").append("</pack_instr>");
}
else if(currentColumn.equalsIgnoreCase("rate"))
{
//Added by Sakshi p on 16/Oct/2025
valueXmlString = (gbfIcRate(valueXmlString, dom, dom1, dom2, editFlag, xtraParams, objContext,
conn));
}
valueXmlString.append("</Detail2>");
// Set quot_no and amd_no in third form as protected (uneditable)
quotNo = checkNull(genericUtility.getColumnValue("quot_no", dom1));
String amdNo2 = checkNull(genericUtility.getColumnValue("amd_no", dom1));
valueXmlString.append("<Detail3>");
valueXmlString.append("<quot_no protect=\"1\">").append("<![CDATA[" + quotNo + "]]>").append("</quot_no>");
valueXmlString.append("<amd_no protect=\"1\">").append("<![CDATA[" + amdNo2 + "]]>").append("</amd_no>");
valueXmlString.append("</Detail3>");
}
break;
case 3:
{
parentNodeList = dom.getElementsByTagName("Detail3");
parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes();
valueXmlString.append("<Detail3>");
childNodeListLength = childNodeList.getLength();
do
{
childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName();
if (childNodeName.equals(currentColumn))
{
if (childNode.getFirstChild() != null)
{
columnValue = childNode.getFirstChild().getNodeValue().trim();
}
}
ctr++;
}
while ((ctr < childNodeListLength) && (!childNodeName.equals(currentColumn)));
BaseLogger.log("3", getUserInfo(), null, "CURRENT COLUMN CASE 3 ["+currentColumn+"]");
if(currentColumn.equalsIgnoreCase("itm_defaultedit"))
{
BaseLogger.log("3", getUserInfo(), null, "Item Default Edit Form 3+++++");
quotNo = checkNull(genericUtility.getColumnValue("quot_no", dom1));
String amdNoF3Edit = checkNull(genericUtility.getColumnValue("amd_no", dom1));
custCode = checkNull(genericUtility.getColumnValue("cust_code", dom1));
valueXmlString.append("<quot_no protect=\"1\">").append("<![CDATA[" + quotNo + "]]>").append("</quot_no>");
valueXmlString.append("<amd_no protect=\"1\">").append("<![CDATA[" + amdNoF3Edit + "]]>").append("</amd_no>");
valueXmlString.append("<cust_code protect=\"1\">").append("<![CDATA[" + custCode + "]]>").append("</cust_code>");
}
else if(currentColumn.equalsIgnoreCase("itm_default"))
{
quotNo = checkNull(genericUtility.getColumnValue("quot_no", dom1));
String amdNo3 = checkNull(genericUtility.getColumnValue("amd_no", dom1));
custCode = checkNull(genericUtility.getColumnValue("cust_code", dom1));
valueXmlString.append("<quot_no protect=\"1\">").append("<![CDATA[" + quotNo + "]]>").append("</quot_no>");
valueXmlString.append("<amd_no protect=\"1\">").append("<![CDATA[" + amdNo3 + "]]>").append("</amd_no>");
valueXmlString.append("<cust_code protect=\"1\">").append("<![CDATA[" + custCode + "]]>").append("</cust_code>");
// Fetch stockist data from original quotation table SALES_QUOT_STOCKIST
if(quotNo != null && quotNo.trim().length() > 0)
{
String custCodeStk = "";
String custCodeDist = "";
String stkName = "";
String distName = "";
detailNodeList = dom2.getElementsByTagName("Detail3");
linecnt = detailNodeList.getLength();
BaseLogger.log("3", getUserInfo(), null, "Detail3 linecnt ["+linecnt+"]");
valueXmlString.append("<line_no>").append("<![CDATA[" + linecnt + "]]>").append("</line_no>");
sql = " select cust_code__stk, cust_code__dist from SALES_QUOT_STOCKIST " +
" where quot_no = ? and line_no = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, quotNo);
pstmt.setInt(2, linecnt);
rs = pstmt.executeQuery();
if(rs.next())
{
custCodeStk = checkNull(rs.getString("cust_code__stk"));
custCodeDist = checkNull(rs.getString("cust_code__dist"));
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
// Fetch stockist name
if(custCodeStk.length() > 0)
{
sql = "select cust_name from customer where cust_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCodeStk);
rs = pstmt.executeQuery();
if(rs.next())
{
stkName = checkNull(rs.getString("cust_name"));
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
// Fetch distributor name
if(custCodeDist.length() > 0)
{
sql = "select cust_name from customer where cust_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCodeDist);
rs = pstmt.executeQuery();
if(rs.next())
{
distName = checkNull(rs.getString("cust_name"));
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
valueXmlString.append("<cust_code__stk protect=\"1\">").append("<![CDATA[" + custCodeStk + "]]>").append("</cust_code__stk>");
// valueXmlString.append("<stk_name protect=\"1\">").append("<![CDATA[" + stkName + "]]>").append("</stk_name>");
valueXmlString.append("<cust_code__dist protect=\"1\">").append("<![CDATA[" + custCodeDist + "]]>").append("</cust_code__dist>");
// valueXmlString.append("<dist_name protect=\"1\">").append("<![CDATA[" + distName + "]]>").append("</dist_name>");
}
}
valueXmlString.append("</Detail3>");
}
break;
} //end switch
valueXmlString.append("</Root>\r\n");
} //end try
catch(Exception e)
{
BaseLogger.log("3", getUserInfo(), null, "Exception from itemchanged method --["+e.getMessage()+"]");
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.close();
conn = null;
}
}
catch(Exception e)
{
BaseLogger.log("3", getUserInfo(), null, "Exception from itemchanged finally --["+e.getMessage()+"]");
e.printStackTrace();
throw new ITMException(e);
}
}
return valueXmlString.toString();
}
public String checkNull(String inputStr) throws ITMException
{
try
{
if(inputStr != null && inputStr.trim().length() > 0)
{
return inputStr.trim();
}
else
{
return "";
}
}
catch(Exception e)
{
BaseLogger.log("3", getUserInfo(), null, "Exception in checknull--["+e.getMessage()+"]");
e.printStackTrace();
throw new ITMException(e);
}
}
private static void setNodeValue(Document dom, String nodeName, String nodeVal) throws Exception {
Node tempNode = dom.getElementsByTagName(nodeName).item(0);
if (tempNode != null) {
if (tempNode.getFirstChild() == null) {
CDATASection cDataSection = dom.createCDATASection(nodeVal);
tempNode.appendChild(cDataSection);
} else {
tempNode.getFirstChild().setNodeValue(nodeVal);
}
}
tempNode = null;
}
private static String getAbsString(String str) {
return (str == null || str.trim().length() == 0 || "null".equalsIgnoreCase(str.trim()) ? "" : str.trim());
}
private StringBuffer gbfIcRate(StringBuffer valueXmlString, Document dom, Document dom1, Document dom2,
String editFlag, String xtraParams, String objContext, Connection conn) throws ITMException {
PreparedStatement pstmt = null;
ResultSet rs = null;
double ldRate = 0.00, mQty = 0.00;
try {
ldRate = Double.parseDouble(checkDouble(genericUtility.getColumnValue("rate", dom)));
BaseLogger.log("3", getUserInfo(), null, "@ Rate is:" + ldRate);
mQty = Double.parseDouble(checkDouble(genericUtility.getColumnValue("quantity", dom)));
BaseLogger.log("3", getUserInfo(), null, "mQty>>>>>" + mQty);
double netAmount = 0.0, taxamt = 0.0;
String taxAmtStr = "";
taxAmtStr = checkNull(genericUtility.getColumnValue("tax_amt", dom));
BaseLogger.log("3", getUserInfo(), null, "taxAmtStr----)[" + taxAmtStr + "]");
taxamt = (taxAmtStr == null || taxAmtStr.trim().length() == 0) ? 0 : Double.parseDouble(taxAmtStr);
netAmount = (mQty * ldRate);
netAmount = finCommon.getRequiredDecimal(netAmount, 2);
BaseLogger.log("3", getUserInfo(), null, "Net Amount(mQty*ldRate)[" + netAmount + "]");
valueXmlString.append("<net_amt>").append("<![CDATA[" + netAmount + "]]>").append("</net_amt>");
} catch (NumberFormatException e) {
e.printStackTrace();
throw e;
} catch (ITMException e) {
e.printStackTrace();
throw e;
} catch (Exception e) {
e.printStackTrace();
throw new ITMException(e);
}
return valueXmlString;
}
public double checkNullForDouble(String inputStr) throws ITMException
{
double retVal = 0.0;
try
{
if(inputStr == null || inputStr.trim().length() == 0)
{
retVal = 0.0;
}
else
{
retVal = Double.parseDouble(inputStr);
}
}
catch(Exception e)
{
BaseLogger.log("3", getUserInfo(), null, "Exception in checknull--["+e.getMessage()+"]");
e.printStackTrace();
retVal = 0.0;
throw new ITMException(e);
}
return retVal;
}
private String checkDouble(String input) {
if (input == null || input.trim().length() == 0) {
input = "0";
}
return input;
}
private String errorType(Connection conn , String errorCode)
{
String msgType = "";
PreparedStatement pstmt = null ;
ResultSet rs = null;
try
{
String sql = "SELECT MSG_TYPE FROM MESSAGES WHERE MSG_NO = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,errorCode);
rs = pstmt.executeQuery();
while(rs.next())
{
msgType = rs.getString("MSG_TYPE");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
catch(Exception ex)
{
ex.printStackTrace();
}
finally
{
try
{
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(Exception e)
{
e.printStackTrace();
}
}
return msgType;
}
private boolean isExist(Connection conn, String tableName, String columnName, String value)
throws ITMException, RemoteException {
PreparedStatement pstmt = null;
ResultSet rs = null;
String sql = "";
boolean status = false;
try {
sql = "SELECT count(*) from " + tableName + " where " + columnName + " = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, value);
rs = pstmt.executeQuery();
if (rs.next()) {
if (rs.getBoolean(1)) {
status = true;
}
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
} catch (Exception e) {
BaseLogger.log("3", getUserInfo(), null, "Exception in isExist ");
e.printStackTrace();
throw new ITMException(e);
}
BaseLogger.log("3", getUserInfo(), null, "returning String from isExist ");
return status;
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Sybase_eDataWindow>
<Sybase_eDataWindow>
<Release>9</Release>
<BaseDefinition>
<units>1</units>
<timer_interval>0</timer_interval>
<color>79741120</color>
<processing>0</processing>
<HTMLDW>no</HTMLDW>
<print>
<documentname></documentname>
<printername></printername>
<orientation>0</orientation>
<margin>
<left>24</left>
<right>24</right>
<top>24</top>
<bottom>24</bottom>
</margin>
<paper>
<source>0</source>
<size>0</size>
</paper>
<prompt>no</prompt>
<canusedefaultprinter>yes</canusedefaultprinter>
<buttons>no</buttons>
<preview.buttons>no</preview.buttons>
<cliptext>no</cliptext>
<overrideprintjob>no</overrideprintjob>
</print>
</BaseDefinition>
<Summary>
<height>0</height>
<color>536870912</color>
</Summary>
<Footer>
<height>0</height>
<color>536870912</color>
</Footer>
<Detail>
<height>523</height>
<color>536870912</color>
</Detail>
<TableDefinition>
<table_column>
<type size="10">char</type>
<name>amd_no</name>
<dbname>SALES_QUOT_STOCKIST_AMD.amd_no</dbname>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<key>yes</key>
<initial>auto_generate()</initial>
</table_column>
<table_column>
<type size="10">char</type>
<name>quot_no</name>
<dbname>SALES_QUOT_STOCKIST_AMD.quot_no</dbname>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
</table_column>
<table_column>
<type size="10">char</type>
<name>cust_code</name>
<dbname>SALES_QUOT_STOCKIST_AMD.cust_code</dbname>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
</table_column>
<table_column>
<type size="10">char</type>
<name>cust_code__stk</name>
<dbname>SALES_QUOT_STOCKIST_AMD.cust_code__stk</dbname>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
</table_column>
<table_column>
<type size="10">char</type>
<name>cust_code__dist</name>
<dbname>SALES_QUOT_STOCKIST_AMD.cust_code__dist</dbname>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
</table_column>
<table_column>
<type>number</type>
<name>line_no</name>
<dbname>SALES_QUOT_STOCKIST_AMD.line_no</dbname>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
</table_column>
<retrieve>SELECT SALES_QUOT_STOCKIST_AMD.AMD_NO AS AMD_NO, SALES_QUOT_STOCKIST_AMD.QUOT_NO AS QUOT_NO, SALES_QUOT_STOCKIST_AMD.CUST_CODE AS CUST_CODE, SALES_QUOT_STOCKIST_AMD.CUST_CODE__STK AS CUST_CODE__STK, SALES_QUOT_STOCKIST_AMD.CUST_CODE__DIST AS CUST_CODE__DIST, SALES_QUOT_STOCKIST_AMD.LINE_NO AS LINE_NO
FROM SALES_QUOT_STOCKIST_AMD
WHERE SALES_QUOT_STOCKIST_AMD.AMD_NO = ? </retrieve>
<updatewhere>0</updatewhere>
<updatekeyinplace>no</updatekeyinplace>
<update>SALES_QUOT_STOCKIST_AMD</update><argument>
<table_name>SALES_QUOT_STOCKIST_AMD</table_name>
<name>amd_no</name>
<type>string</type>
</argument>
</TableDefinition><TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Amendment No</text>
<border>0</border>
<color>0</color>
<x>10</x>
<y>10</y>
<height>15</height>
<width>100</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>amd_no_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>79741120</color>
</background>
</TextObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Quotation No</text>
<border>0</border>
<color>0</color>
<x>20</x>
<y>20</y>
<height>15</height>
<width>100</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>quot_no_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>79741120</color>
</background>
</TextObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Customer</text>
<border>0</border>
<color>0</color>
<x>30</x>
<y>30</y>
<height>15</height>
<width>100</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>79741120</color>
</background>
</TextObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Stockist </text>
<border>0</border>
<color>0</color>
<x>50</x>
<y>50</y>
<height>15</height>
<width>100</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code__stk_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>79741120</color>
</background>
</TextObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Distributor</text>
<border>0</border>
<color>0</color>
<x>70</x>
<y>70</y>
<height>15</height>
<width>100</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code__dist_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>79741120</color>
</background>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>2</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>20</x>
<y>10</y>
<height>15</height>
<width>100</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>amd_no</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>upper</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<imemode>0</imemode>
<required>yes</required>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>16777215</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>2</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>30</x>
<y>20</y>
<height>15</height>
<width>100</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>quot_no</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>upper</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>16777215</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>2</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>40</x>
<y>30</y>
<height>15</height>
<width>100</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>upper</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>16777215</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>2</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>60</x>
<y>50</y>
<height>15</height>
<width>100</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code__stk</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>upper</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>16777215</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>2</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>80</x>
<y>70</y>
<height>15</height>
<width>100</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code__dist</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>upper</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>16777215</color>
</background>
</ColumnObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Line No</text>
<border>0</border>
<color>0</color>
<x>90</x>
<y>90</y>
<height>15</height>
<width>100</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>line_no_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>79741120</color>
</background>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>2</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>100</x>
<y>90</y>
<height>15</height>
<width>100</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>line_no</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>upper</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>16777215</color>
</background>
</ColumnObject>
<GroupBox>
<band>Detail</band>
<text>General</text>
<border>2</border>
<color>33554432</color>
<x>5</x>
<y>10</y>
<height>419</height>
<width>651</width>
<name>gb_1</name>
<visible>1</visible>
<font>
<face>Liberation Sans</face>
<height>-11</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>1073741824</color>
</background>
</GroupBox>
<GroupBox>
<band>Detail</band>
<text>Others</text>
<border>2</border>
<color>33554432</color>
<x>5</x>
<y>80</y>
<height>419</height>
<width>651</width>
<name>gb_1</name>
<visible>1</visible>
<font>
<face>Liberation Sans</face>
<height>-11</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>1073741824</color>
</background>
</GroupBox>
<HtmlTable>
<border>1</border>
</HtmlTable>
<HtmlGen>
<clientevents>1</clientevents>
<clientvalidation>1</clientvalidation>
<clientcomputedfields>1</clientcomputedfields>
<clientformatting>0</clientformatting>
<clientscriptable>0</clientscriptable>
<generatejavascript>1</generatejavascript>
<encodeselflinkargs>1</encodeselflinkargs>
<netscapelayers>0</netscapelayers>
</HtmlGen>
<Export.XML>
<headgroups>1</headgroups>
<includewhitespace>0</includewhitespace>
<metadatatype>0</metadatatype>
<savemetadata>0</savemetadata>
</Export.XML>
<Import.XML>
</Import.XML>
<Export.PDF>
<method>0</method>
<distill.custompostscript>0</distill.custompostscript>
<xslfop.print>0</xslfop.print>
</Export.PDF>
</Sybase_eDataWindow>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Sybase_eDataWindow>
<Sybase_eDataWindow>
<Release>9</Release>
<BaseDefinition>
<units>1</units>
<timer_interval>0</timer_interval>
<color>79741120</color>
<processing>0</processing>
<HTMLDW>no</HTMLDW>
<print>
<documentname></documentname>
<printername></printername>
<orientation>0</orientation>
<margin>
<left>24</left>
<right>24</right>
<top>24</top>
<bottom>24</bottom>
</margin>
<paper>
<source>0</source>
<size>0</size>
</paper>
<prompt>no</prompt>
<canusedefaultprinter>yes</canusedefaultprinter>
<buttons>no</buttons>
<preview.buttons>no</preview.buttons>
<cliptext>no</cliptext>
<overrideprintjob>no</overrideprintjob>
</print>
</BaseDefinition>
<Summary>
<height>0</height>
<color>536870912</color>
</Summary>
<Footer>
<height>0</height>
<color>536870912</color>
</Footer>
<Detail>
<height>523</height>
<color>536870912</color>
</Detail>
<TableDefinition>
<table_column>
<type size="10">char</type>
<name>amd_no</name>
<dbname>SALES_QUOT_STOCKIST_AMD.amd_no</dbname>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<key>yes</key>
<initial>auto_generate()</initial>
</table_column>
<table_column>
<type size="10">char</type>
<name>quot_no</name>
<dbname>SALES_QUOT_STOCKIST_AMD.quot_no</dbname>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
</table_column>
<table_column>
<type size="10">char</type>
<name>cust_code</name>
<dbname>SALES_QUOT_STOCKIST_AMD.cust_code</dbname>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
</table_column>
<table_column>
<type size="10">char</type>
<name>cust_code__stk</name>
<dbname>SALES_QUOT_STOCKIST_AMD.cust_code__stk</dbname>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
</table_column>
<table_column>
<type size="10">char</type>
<name>cust_code__dist</name>
<dbname>SALES_QUOT_STOCKIST_AMD.cust_code__dist</dbname>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
</table_column>
<table_column>
<type>number</type>
<name>line_no</name>
<dbname>SALES_QUOT_STOCKIST_AMD.line_no</dbname>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
</table_column>
<retrieve>SELECT SALES_QUOT_STOCKIST_AMD.AMD_NO AS AMD_NO, SALES_QUOT_STOCKIST_AMD.QUOT_NO AS QUOT_NO, SALES_QUOT_STOCKIST_AMD.CUST_CODE AS CUST_CODE, SALES_QUOT_STOCKIST_AMD.CUST_CODE__STK AS CUST_CODE__STK, SALES_QUOT_STOCKIST_AMD.CUST_CODE__DIST AS CUST_CODE__DIST, SALES_QUOT_STOCKIST_AMD.LINE_NO AS LINE_NO
FROM SALES_QUOT_STOCKIST_AMD
WHERE SALES_QUOT_STOCKIST_AMD.AMD_NO = ? </retrieve>
<updatewhere>0</updatewhere>
<updatekeyinplace>no</updatekeyinplace>
<update>SALES_QUOT_STOCKIST_AMD</update><argument>
<table_name>SALES_QUOT_STOCKIST_AMD</table_name>
<name>amd_no</name>
<type>string</type>
</argument>
</TableDefinition><TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Amendment No</text>
<border>0</border>
<color>0</color>
<x>10</x>
<y>10</y>
<height>15</height>
<width>100</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>amd_no_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>79741120</color>
</background>
</TextObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Quotation No</text>
<border>0</border>
<color>0</color>
<x>20</x>
<y>20</y>
<height>15</height>
<width>100</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>quot_no_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>79741120</color>
</background>
</TextObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Customer</text>
<border>0</border>
<color>0</color>
<x>30</x>
<y>30</y>
<height>15</height>
<width>100</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>79741120</color>
</background>
</TextObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Stockist</text>
<border>0</border>
<color>0</color>
<x>50</x>
<y>50</y>
<height>15</height>
<width>100</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code__stk_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>79741120</color>
</background>
</TextObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Distributor</text>
<border>0</border>
<color>0</color>
<x>70</x>
<y>70</y>
<height>15</height>
<width>100</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code__dist_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>79741120</color>
</background>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>2</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>10</x>
<y>10</y>
<height>15</height>
<width>100</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>amd_no</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>upper</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<imemode>0</imemode>
<required>yes</required>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>16777215</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>2</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>20</x>
<y>20</y>
<height>15</height>
<width>100</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>quot_no</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>upper</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>16777215</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>2</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>30</x>
<y>30</y>
<height>15</height>
<width>100</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>upper</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>16777215</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>2</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>50</x>
<y>50</y>
<height>15</height>
<width>100</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code__stk</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>upper</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>16777215</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>2</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>70</x>
<y>70</y>
<height>15</height>
<width>100</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code__dist</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>upper</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>16777215</color>
</background>
</ColumnObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Line No</text>
<border>0</border>
<color>0</color>
<x>90</x>
<y>90</y>
<height>15</height>
<width>100</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>line_no_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>79741120</color>
</background>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>2</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>100</x>
<y>90</y>
<height>15</height>
<width>100</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>line_no</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>upper</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>16777215</color>
</background>
</ColumnObject>
<GroupBox>
<band>Detail</band>
<text>General</text>
<border>2</border>
<color>33554432</color>
<x>5</x>
<y>10</y>
<height>419</height>
<width>651</width>
<name>gb_1</name>
<visible>1</visible>
<font>
<face>Liberation Sans</face>
<height>-11</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>1073741824</color>
</background>
</GroupBox>
<GroupBox>
<band>Detail</band>
<text>Others</text>
<border>2</border>
<color>33554432</color>
<x>5</x>
<y>80</y>
<height>419</height>
<width>651</width>
<name>gb_1</name>
<visible>1</visible>
<font>
<face>Liberation Sans</face>
<height>-11</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>1073741824</color>
</background>
</GroupBox>
<HtmlTable>
<border>1</border>
</HtmlTable>
<HtmlGen>
<clientevents>1</clientevents>
<clientvalidation>1</clientvalidation>
<clientcomputedfields>1</clientcomputedfields>
<clientformatting>0</clientformatting>
<clientscriptable>0</clientscriptable>
<generatejavascript>1</generatejavascript>
<encodeselflinkargs>1</encodeselflinkargs>
<netscapelayers>0</netscapelayers>
</HtmlGen>
<Export.XML>
<headgroups>1</headgroups>
<includewhitespace>0</includewhitespace>
<metadatatype>0</metadatatype>
<savemetadata>0</savemetadata>
</Export.XML>
<Import.XML>
</Import.XML>
<Export.PDF>
<method>0</method>
<distill.custompostscript>0</distill.custompostscript>
<xslfop.print>0</xslfop.print>
</Export.PDF>
</Sybase_eDataWindow>
...@@ -140,7 +140,7 @@ CREATE TABLE SALES_QUOTDET_AMD ...@@ -140,7 +140,7 @@ CREATE TABLE SALES_QUOTDET_AMD
PRIMARY KEY (AMD_NO, LINE_NO) PRIMARY KEY (AMD_NO, LINE_NO)
); );
CREATE TABLE QUOT_STOCKIST_AMD CREATE TABLE SALES_QUOT_STOCKIST_AMD
( (
AMD_NO CHAR(10) NOT NULL, AMD_NO CHAR(10) NOT NULL,
QUOT_NO CHAR(10), QUOT_NO CHAR(10),
...@@ -149,7 +149,8 @@ CREATE TABLE QUOT_STOCKIST_AMD ...@@ -149,7 +149,8 @@ CREATE TABLE QUOT_STOCKIST_AMD
CUST_CODE__STK CHAR(10), CUST_CODE__STK CHAR(10),
CUST_CODE__DIST CHAR(10), CUST_CODE__DIST CHAR(10),
CONSTRAINT PK_QUOT_STOCKIST_AMD PRIMARY KEY (AMD_NO, LINE_NO) CONSTRAINT PK_QUOT_STOCKIST_AMD
PRIMARY KEY (AMD_NO, LINE_NO)
); );
Insert into OBJ_FORMS (WIN_NAME,TITLE,OBJ_BROW_NAME,OBJ_EDIT_NAME,CROSS_UPDATE_EXPR,EXPR_FLD_INFO,TARGET_FLD_INFO,EXPR_COMMENT,FORM_NO,SCR_FLAG,AUTO_ACCEPT_SCAN,SCAN_FLAG,SCAN_METADATA,PROPERTY_INFO,SCAN_DELIMITER,COLUMN_ON_SAVE,AFTER_SAVE,EXT_SETUP,EXT_METADATA,EXT_COM,AUTO_ACCEPT_WEIGHDATA,FORM_TYPE,DISP_METADATA,PARENT_KEY_COL,QTY_COL,RATE_COL,ASSISTED_MODE,STORAGE_KEY_METADATA,SELECTION_MODE,DEFAULT_VIEW,AUTO_ADDON_ENTRY,DUPLICATE_ADD,DEFAULT_ROW_CNT,FREEZE_COL_POS,IS_MANDATORY,TRAN_ID_COL,SELECTION_OPT,KEY_INFO,THUMB_OBJ,THUMB_IMAGE_COL,THUMB_ALT_COL,FORM_NAME,FORM_ICON,FORM_VIEW_OPTS,X_COLUMN,Y_COLUMN,ACTION_ARG,VALUE_COL,NO_ART_COL,CHG_DATE,CHG_USER,CHG_TERM) values ('w_sales_quot_amd','SQ amendment',null,null,null,null,null,null,'1','F',null,null,null,null,null,null,null,null,null,null,null,null,'<html><div style=''width:100%;overflow:hidden;margin-bottom:2px''><span style=''float:left''><b>AMD No:</b> Insert into OBJ_FORMS (WIN_NAME,TITLE,OBJ_BROW_NAME,OBJ_EDIT_NAME,CROSS_UPDATE_EXPR,EXPR_FLD_INFO,TARGET_FLD_INFO,EXPR_COMMENT,FORM_NO,SCR_FLAG,AUTO_ACCEPT_SCAN,SCAN_FLAG,SCAN_METADATA,PROPERTY_INFO,SCAN_DELIMITER,COLUMN_ON_SAVE,AFTER_SAVE,EXT_SETUP,EXT_METADATA,EXT_COM,AUTO_ACCEPT_WEIGHDATA,FORM_TYPE,DISP_METADATA,PARENT_KEY_COL,QTY_COL,RATE_COL,ASSISTED_MODE,STORAGE_KEY_METADATA,SELECTION_MODE,DEFAULT_VIEW,AUTO_ADDON_ENTRY,DUPLICATE_ADD,DEFAULT_ROW_CNT,FREEZE_COL_POS,IS_MANDATORY,TRAN_ID_COL,SELECTION_OPT,KEY_INFO,THUMB_OBJ,THUMB_IMAGE_COL,THUMB_ALT_COL,FORM_NAME,FORM_ICON,FORM_VIEW_OPTS,X_COLUMN,Y_COLUMN,ACTION_ARG,VALUE_COL,NO_ART_COL,CHG_DATE,CHG_USER,CHG_TERM) values ('w_sales_quot_amd','SQ amendment',null,null,null,null,null,null,'1','F',null,null,null,null,null,null,null,null,null,null,null,null,'<html><div style=''width:100%;overflow:hidden;margin-bottom:2px''><span style=''float:left''><b>AMD No:</b>
...@@ -171,8 +172,8 @@ Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERAC ...@@ -171,8 +172,8 @@ Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERAC
Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERACTIVE,RIGHTS_CHAR,TITLE,FORM_NO,SERVICE_HANDLER,PLACEMENT,ACTION_TYPE,TRAN_TYPE,CHG_DATE,CHG_TERM,CHG_USER,IS_CONFIRMATION_REQ,SEP_DUTY_OPT,RE_AUTH_OPT,SHOW_IN_PANEL,PAGE_CONTEXT,TYPE,ACTION_ARG,SWIPE_POSITION,MULTI_ROW_OPT,ACTION_ID,DEF_NODATA,IN_PROC_INTRUPT,ESTIMATED_TIME,ACTION_GROUP,DISPLAY_OPT,DISPLAY_MODE,SHOW_CONFIRM,REC_SPECIFIC) values ('sales_quot_amd',65,'ibase/resource/objaction/submit.svg','Workflow Submit','wf_submit_auto','a','S','Submit','1','2',null,'U',null,to_date('28-02-25','DD-MM-RR'),'GAGANB',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,'2','000',null); Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERACTIVE,RIGHTS_CHAR,TITLE,FORM_NO,SERVICE_HANDLER,PLACEMENT,ACTION_TYPE,TRAN_TYPE,CHG_DATE,CHG_TERM,CHG_USER,IS_CONFIRMATION_REQ,SEP_DUTY_OPT,RE_AUTH_OPT,SHOW_IN_PANEL,PAGE_CONTEXT,TYPE,ACTION_ARG,SWIPE_POSITION,MULTI_ROW_OPT,ACTION_ID,DEF_NODATA,IN_PROC_INTRUPT,ESTIMATED_TIME,ACTION_GROUP,DISPLAY_OPT,DISPLAY_MODE,SHOW_CONFIRM,REC_SPECIFIC) values ('sales_quot_amd',65,'ibase/resource/objaction/submit.svg','Workflow Submit','wf_submit_auto','a','S','Submit','1','2',null,'U',null,to_date('28-02-25','DD-MM-RR'),'GAGANB',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,'2','000',null);
INSERT INTO TRANSETUP (TRAN_WINDOW,SAVE_FLAG,VAL_FLAG,KEY_FLAG,KEY_STRING,UDF_1,UDF_2,UDF_3,UDF_4,UDF_5,REPEATE_ADD,CHG_DATE,CHG_USER,CHG_TERM,EDI_OPTION,SITE_ACC_COL,CONFIRM_COL,CONFIRM_VAL,REPEAT_ADD_DET,REPEATADDDET,LOAD_MODE,AUTO_CONFIRM,LEDG_POST_CONF,CHG_DATE_ON_CONF,TRAN_ID_COL,MAIL_OPTION,CONFIRM_MODE,GARBAGE_OPT,VAL_FLAG_EDI,VERIFY_PASSWORD,CUST_ACC_COL,SALES_PERS_ACC_COL,SUPP_ACC_COL,ITEM_SER_ACC_CODE,EMP_ACC_COL,ITEM_SER_ACC_COL,WORKFLOW_OPT,TABLE_NAME,APPLICATION,TABLE_DESC,TRAN_DATE_COL,TRAN_ID__FROM,TRAN_ID__TO,TABLE_NAME_DET1,TABLE_NAME_DET2,TABLE_NAME_DET3,MULTITIRE_OPT,REF_SER,VIEW_MODE,TAX_FORMS,SIGN_STATUS,USER_TRAN_WINDOW,OBJ_NAME__PARENT,IGNOREERRLIST_ONLOAD,CHILDDATA_ARGOPT,EDIT_TMPLT,WRKFLW_INIT,EDITTAX,FORMAL_ARGS,AUDIT_TRAIL_OPT,EDIT_OPT,CACHE_OPT,OPTIMIZE_MODE,EDIT_EXPR,RATE_COL,QTY_COL,EDIT_EXPR_INP,RCP_CACHE_STATUS,PRINT_CONTROL,TRANSFER_MODE,PROFILE_ID__RES,TRAN_COMPL_MSG,PERIOD_OPTION,WRKFLW_PRIORITY,EXEC_TYPE,DISP_META_DATA,ALLOW_ATTACH,START_FORM,ISATTACHMENT,HEADER_FORM_NO,CONFIRM_DATE_COL,CONFIRM_BY_COL,MSG_ONSAVE,WF_STATUS,RESTART_FORM,CMS_PATH,BROW_DATA_DEF,DEF_VIEW,VIEW_OPTS,ISGWTINITIATED,DEFAULT_DATA_ROW,IN_WF_VAL,IN_WF_COL,CANCEL_VAL,CANCEL_COL,THUMB_ALT_COL,THUMB_IMAGE_COL,THUMB_OBJ,ATTACH_COUNT_MIN,FUNCTION_TYPE,COMPL_ACTION,DEFAULT_EDITOR,MSG_NO,OBJ_TYPE,STATUS_COL,ENABLE_EDITOR,OFFLINE_OPT,CLOSE_COL,CLOSE_VAL,THREAD_KEY_COL,LOAD_ORDER,SYNC_FROM_APP,TITLE,OBJ_NAME) INSERT INTO TRANSETUP (TRAN_WINDOW,SAVE_FLAG,VAL_FLAG,KEY_FLAG,KEY_STRING,UDF_1,UDF_2,UDF_3,UDF_4,UDF_5,REPEATE_ADD,CHG_DATE,CHG_USER,CHG_TERM,EDI_OPTION,SITE_ACC_COL,CONFIRM_COL,CONFIRM_VAL,REPEAT_ADD_DET,REPEATADDDET,LOAD_MODE,AUTO_CONFIRM,LEDG_POST_CONF,CHG_DATE_ON_CONF,TRAN_ID_COL,MAIL_OPTION,CONFIRM_MODE,GARBAGE_OPT,VAL_FLAG_EDI,VERIFY_PASSWORD,CUST_ACC_COL,SALES_PERS_ACC_COL,SUPP_ACC_COL,ITEM_SER_ACC_CODE,EMP_ACC_COL,ITEM_SER_ACC_COL,WORKFLOW_OPT,TABLE_NAME,APPLICATION,TABLE_DESC,TRAN_DATE_COL,TRAN_ID__FROM,TRAN_ID__TO,TABLE_NAME_DET1,TABLE_NAME_DET2,TABLE_NAME_DET3,MULTITIRE_OPT,REF_SER,VIEW_MODE,TAX_FORMS,SIGN_STATUS,USER_TRAN_WINDOW,OBJ_NAME__PARENT,IGNOREERRLIST_ONLOAD,CHILDDATA_ARGOPT,EDIT_TMPLT,WRKFLW_INIT,EDITTAX,FORMAL_ARGS,AUDIT_TRAIL_OPT,EDIT_OPT,CACHE_OPT,OPTIMIZE_MODE,EDIT_EXPR,RATE_COL,QTY_COL,EDIT_EXPR_INP,RCP_CACHE_STATUS,PRINT_CONTROL,TRANSFER_MODE,PROFILE_ID__RES,TRAN_COMPL_MSG,PERIOD_OPTION,WRKFLW_PRIORITY,EXEC_TYPE,DISP_META_DATA,ALLOW_ATTACH,START_FORM,ISATTACHMENT,HEADER_FORM_NO,CONFIRM_DATE_COL,CONFIRM_BY_COL,MSG_ONSAVE,WF_STATUS,RESTART_FORM,CMS_PATH,BROW_DATA_DEF,DEF_VIEW,VIEW_OPTS,ISGWTINITIATED,DEFAULT_DATA_ROW,IN_WF_VAL,IN_WF_COL,CANCEL_VAL,CANCEL_COL,THUMB_ALT_COL,THUMB_IMAGE_COL,THUMB_OBJ,ATTACH_COUNT_MIN,FUNCTION_TYPE,COMPL_ACTION,DEFAULT_EDITOR,MSG_NO,OBJ_TYPE,STATUS_COL,ENABLE_EDITOR,OFFLINE_OPT,CLOSE_COL,CLOSE_VAL,THREAD_KEY_COL,LOAD_ORDER,SYNC_FROM_APP,TITLE,OBJ_NAME) VALUES ('w_sales_quot_amd','2','2','A','SQAMD,seq05',NULL,NULL,NULL,NULL,NULL,'N',TO_DATE('04-MAR-26 00:00:00','DD-MON-RR HH24:MI:SS'),'BASE ','SYSTEM','0','SITE_CODE','confirmed','Y','Y',NULL,NULL,'N','N',NULL,'amd_no',NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4','SALES_QUOT_AMD','DIS','SALES QUOTATION AMENDMENT','quot_date',NULL,NULL,NULL,NULL,NULL,NULL,'S-QUOT','F','2',NULL,NULL,NULL,NULL,NULL,NULL,'sales_quot_amd',NULL,NULL,'2','3',NULL,NULL,NULL,'RATE','QUANTITY',NULL,NULL,NULL,NULL,NULL,NULL,'W',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Y',NULL,NULL,NULL,NULL,NULL,NULL,'X','status',NULL,NULL,NULL,NULL,NULL,NULL,'compact',NULL,'C',NULL,'C',NULL,'status','C',NULL,NULL,NULL,NULL,NULL);
VALUES ('w_sales_quot_amd','2','2','A','SQAMD,seq05',NULL,NULL,NULL,NULL,NULL,'N',TO_DATE('04-03-26','DD-MM-RR'),'BASE','SYSTEM','0','SITE_CODE','confirmed','Y','Y',NULL,NULL,'N','N',NULL,'amd_no',NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'4','SALES_QUOT_AMD','DIS','SALES QUOTATION AMENDMENT','quot_date',NULL,NULL,NULL,NULL,NULL,NULL,'S-QUOT','F','2',NULL,NULL,NULL,NULL,NULL,NULL,'sales_quot_amd',NULL,NULL,'2','3',NULL,NULL,NULL,'RATE','QUANTITY',NULL,NULL,NULL,NULL,NULL,NULL,'W',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Y',NULL,NULL,NULL,NULL,NULL,NULL,'X','status',NULL,NULL,NULL,NULL,NULL,NULL,'compact',NULL,'C',NULL,'C',NULL,'status','C',NULL,NULL,NULL,NULL,NULL,NULL);
Insert into SYSTEM_EVENTS (OBJ_NAME,EVENT_CODE,EVENT_CONTEXT,SERVICE_CODE,METHOD_RULE,OVERWRITE_CORE,CHG_DATE,CHG_USER,CHG_TERM,RESULT_HANDLE,COMP_TYPE,COMP_NAME,COMM_FORMAT,FIELD_NAME,FORM_NO) values ('sales_quot_amd','post_item_change','1','poic_default_ejb',null,'0',to_date('04-12-07','DD-MM-RR'),'Jiten ','user3','2','JB','ibase.webitm.ejb.dis.SalesQuotationAmdIC',null,null,null); Insert into SYSTEM_EVENTS (OBJ_NAME,EVENT_CODE,EVENT_CONTEXT,SERVICE_CODE,METHOD_RULE,OVERWRITE_CORE,CHG_DATE,CHG_USER,CHG_TERM,RESULT_HANDLE,COMP_TYPE,COMP_NAME,COMM_FORMAT,FIELD_NAME,FORM_NO) values ('sales_quot_amd','post_item_change','1','poic_default_ejb',null,'0',to_date('04-12-07','DD-MM-RR'),'Jiten ','user3','2','JB','ibase.webitm.ejb.dis.SalesQuotationAmdIC',null,null,null);
Insert into SYSTEM_EVENTS (OBJ_NAME,EVENT_CODE,EVENT_CONTEXT,SERVICE_CODE,METHOD_RULE,OVERWRITE_CORE,CHG_DATE,CHG_USER,CHG_TERM,RESULT_HANDLE,COMP_TYPE,COMP_NAME,COMM_FORMAT,FIELD_NAME,FORM_NO) values ('sales_quot_amd','wf_submit_auto','2','prcm_default_ejb',null,'0',to_date('10-03-26','DD-MM-RR'),'AJIT ',null,'2','JB','ibase.webitm.utility.GenericSubmit',null,null,null); Insert into SYSTEM_EVENTS (OBJ_NAME,EVENT_CODE,EVENT_CONTEXT,SERVICE_CODE,METHOD_RULE,OVERWRITE_CORE,CHG_DATE,CHG_USER,CHG_TERM,RESULT_HANDLE,COMP_TYPE,COMP_NAME,COMM_FORMAT,FIELD_NAME,FORM_NO) values ('sales_quot_amd','wf_submit_auto','2','prcm_default_ejb',null,'0',to_date('10-03-26','DD-MM-RR'),'AJIT ',null,'2','JB','ibase.webitm.utility.GenericSubmit',null,null,null);
...@@ -212,7 +213,28 @@ Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,AR ...@@ -212,7 +213,28 @@ Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,AR
Insert into SYSTEM_EVENT_SERVICES (SERVICE_CODE,SERVICE_DESCR,SERVICE_URI,SERVICE_PROVIDER,METHOD_NAME,RETURN_VALUE,RETURN_TYPE,RETURN_DESCR,RETURN_XFRM,CHG_DATE,CHG_USER,CHG_TERM,SERVICE_NAMESPACE,RES_ELEM,SOAP_ACTION,SERVICE_TYPE,SERVICE_HANDLER,DESCR) values ('poic_default_ejb','Item Changed','http://localhost:9090/axis/services/ValidatorService',null,'itemChanged','String','S',null,null,to_date('28-08-19','DD-MM-RR'),'BASE ','BASE',null,null,null,null,null,null); Insert into SYSTEM_EVENT_SERVICES (SERVICE_CODE,SERVICE_DESCR,SERVICE_URI,SERVICE_PROVIDER,METHOD_NAME,RETURN_VALUE,RETURN_TYPE,RETURN_DESCR,RETURN_XFRM,CHG_DATE,CHG_USER,CHG_TERM,SERVICE_NAMESPACE,RES_ELEM,SOAP_ACTION,SERVICE_TYPE,SERVICE_HANDLER,DESCR) values ('poic_default_ejb','Item Changed','http://localhost:9090/axis/services/ValidatorService',null,'itemChanged','String','S',null,null,to_date('28-08-19','DD-MM-RR'),'BASE ','BASE',null,null,null,null,null,null);
Insert into SYSTEM_EVENT_SERVICES (SERVICE_CODE,SERVICE_DESCR,SERVICE_URI,SERVICE_PROVIDER,METHOD_NAME,RETURN_VALUE,RETURN_TYPE,RETURN_DESCR,RETURN_XFRM,CHG_DATE,CHG_USER,CHG_TERM,SERVICE_NAMESPACE,RES_ELEM,SOAP_ACTION,SERVICE_TYPE,SERVICE_HANDLER,DESCR) values ('prcm_default_ejb','Action To confirm indent requisition','http://localhost:9090/axis/services/ActionHandlerService','Base','confirm','String','S',null,null,to_date('24-01-18','DD-MM-RR'),'base ','base',null,null,null,null,null,null); Insert into SYSTEM_EVENT_SERVICES (SERVICE_CODE,SERVICE_DESCR,SERVICE_URI,SERVICE_PROVIDER,METHOD_NAME,RETURN_VALUE,RETURN_TYPE,RETURN_DESCR,RETURN_XFRM,CHG_DATE,CHG_USER,CHG_TERM,SERVICE_NAMESPACE,RES_ELEM,SOAP_ACTION,SERVICE_TYPE,SERVICE_HANDLER,DESCR) values ('prcm_default_ejb','Action To confirm indent requisition','http://localhost:9090/axis/services/ActionHandlerService','Base','confirm','String','S',null,null,to_date('24-01-18','DD-MM-RR'),'base ','base',null,null,null,null,null,null);
-- 19-MAR-26
UPDATE obj_forms
SET title = 'SQ Amendment',
disp_metadata = '<html><div style=''width:100%;overflow:hidden;margin-bottom:2px''><span style=''float:left''><b>AMD No:</b>
{amd_no}</span><span style=''float:right''><b>AMD Date:</b> {amd_date}</span></div><div style=''width:100%;overflow:hidden;margin-bottom:2px''><span
style=''float:left''><b>Customer:</b> {cust_code}</span><span style=''float:right''><b>Quot No:</b> {quot_no}</span></div></html>'
WHERE win_name = 'w_sales_quot_amd'
AND form_no = 1;
-- Approve Workflow component linking system entries
Insert into SYSTEM_EVENTS (OBJ_NAME,EVENT_CODE,EVENT_CONTEXT,SERVICE_CODE,METHOD_RULE,OVERWRITE_CORE,CHG_DATE,CHG_USER,CHG_TERM,RESULT_HANDLE,COMP_TYPE,COMP_NAME,COMM_FORMAT,FIELD_NAME,FORM_NO) values ('sales_quot_amd','post_sign','1','post_sign_sales_quot_amd',null,'0',to_date('19-MAR-26 00:00:00','DD-MON-RR HH24:MI:SS'),'BASE ','BASE','2','JB','ibase.webitm.ejb.dis.SalesQuotationAmdAprv',null,null,null);
Insert into SYSTEM_EVENT_SERVICES (SERVICE_CODE,SERVICE_DESCR,SERVICE_URI,SERVICE_PROVIDER,METHOD_NAME,RETURN_VALUE,RETURN_TYPE,RETURN_DESCR,RETURN_XFRM,CHG_DATE,CHG_USER,CHG_TERM,SERVICE_NAMESPACE,RES_ELEM,SOAP_ACTION,SERVICE_TYPE,SERVICE_HANDLER,DESCR) values ('post_sign_sales_quot_amd','method for process','http://localhost:9090/axis/services/ValidatorService','BASE','updateWFStatus',null,null,null,null,to_date('19-MAR-26 00:00:00','DD-MON-RR HH24:MI:SS'),'BASE ','BASE',null,null,null,null,null,null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('post_sign_sales_quot_amd',1,'COMPONENT_TYPE ','I',null,'S',null,to_date('19-MAR-26 00:00:00','DD-MON-RR HH24:MI:SS'),'BASE ','BASE','JB');
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('post_sign_sales_quot_amd',2,'COMPONENT_NAME ','I',null,'S',null,to_date('19-MAR-26 00:00:00','DD-MON-RR HH24:MI:SS'),'BASE ','BASE','ibase.webitm.ejb.dis.SalesQuotationAmdAprv');
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('post_sign_sales_quot_amd',3,'XML_DATA_ALL','I',null,'S',null,to_date('19-MAR-26 00:00:00','DD-MON-RR HH24:MI:SS'),'BASE ','BASE',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('post_sign_sales_quot_amd',4,'DB_CONN','I',null,'S.Connection',null,to_date('19-MAR-26 00:00:00','DD-MON-RR HH24:MI:SS'),'BASE ','BASE',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('post_sign_sales_quot_amd',5,'XTRA_PARAMS','I','Extra Arguments','S',null,to_date('19-MAR-26 00:00:00','DD-MON-RR HH24:MI:SS'),'BASE','BASE',null);
Insert into messages (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION) values
('VTINVQNO ','Invalid Quotation Number','Please Enter Valid Quotation Number','E','Y',null,null,null,to_date('25-03-26','DD-MM-RR'),'System ','System',null,null);
...@@ -12,6 +12,7 @@ CREATE TABLE CUSTOMER_PREF_DIST ( ...@@ -12,6 +12,7 @@ CREATE TABLE CUSTOMER_PREF_DIST (
PRIMARY KEY (CUST_CODE, CUST_CODE__STK) PRIMARY KEY (CUST_CODE, CUST_CODE__STK)
); );
Insert into USER_RIGHTS (PROFILE_ID,APPLICATION,MENU_ROW,MENU_COL,MENU_SUBCOL,LEVEL_4,LEVEL_5,MENU_NAME,RIGHTS,ACC_FILT,DEF_FILT,OBJ_NAME,FAV_OPTION,FAV_ORDER,EXCLUDE_RIGHTS_CHAR,ATTACH_RIGHTS,NO_OFFLINE_ALLWD,MOB_DEPLOY,DEVICE_SECURITY,DEVICE_ACC_CLASS) values ('ADMIN ','SCS',4,1,4,0,0,'Customer Preferred Distributor','*',null,null,'customer_pref_dist',null,null,null,null,null,'B',null,null); Insert into USER_RIGHTS (PROFILE_ID,APPLICATION,MENU_ROW,MENU_COL,MENU_SUBCOL,LEVEL_4,LEVEL_5,MENU_NAME,RIGHTS,ACC_FILT,DEF_FILT,OBJ_NAME,FAV_OPTION,FAV_ORDER,EXCLUDE_RIGHTS_CHAR,ATTACH_RIGHTS,NO_OFFLINE_ALLWD,MOB_DEPLOY,DEVICE_SECURITY,DEVICE_ACC_CLASS) values ('ADMIN ','SCS',4,1,4,0,0,'Customer Preferred Distributor','*',null,null,'customer_pref_dist',null,null,null,null,null,'B',null,null);
Insert into ITM2MENU (APPLICATION,LEVEL_1,LEVEL_2,LEVEL_3,LEVEL_4,LEVEL_5,WIN_NAME,DESCR,COMMENTS,MENU_PATH,ICON_PATH,CLOSE_ICON,OPEN_ICON,OBJ_TYPE,CHG_DATE,CHG_TERM,CHG_USER,MOB_DEPLOY,DEFAULT_STATE,DEF_ACTION,MOB_DEPLY,ENT_TYPES) values ('SCS',4,1,4,0,0,'w_customer_pref_dist','Customer Preferred Distributor','Map Hospital to Stockist and Distributor','SCS.4.1.4.0.0','assignment.png',null,null,'T',null,null,null,'B',null,null,null,'0 '); Insert into ITM2MENU (APPLICATION,LEVEL_1,LEVEL_2,LEVEL_3,LEVEL_4,LEVEL_5,WIN_NAME,DESCR,COMMENTS,MENU_PATH,ICON_PATH,CLOSE_ICON,OPEN_ICON,OBJ_TYPE,CHG_DATE,CHG_TERM,CHG_USER,MOB_DEPLOY,DEFAULT_STATE,DEF_ACTION,MOB_DEPLY,ENT_TYPES) values ('SCS',4,1,4,0,0,'w_customer_pref_dist','Customer Preferred Distributor','Map Hospital to Stockist and Distributor','SCS.4.1.4.0.0','assignment.png',null,null,'T',null,null,null,'B',null,null,null,'0 ');
...@@ -33,8 +34,8 @@ Insert into OBJ_FORMS (WIN_NAME,TITLE,OBJ_BROW_NAME,OBJ_EDIT_NAME,CROSS_UPDATE_E ...@@ -33,8 +34,8 @@ Insert into OBJ_FORMS (WIN_NAME,TITLE,OBJ_BROW_NAME,OBJ_EDIT_NAME,CROSS_UPDATE_E
</html>',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,'assignment.png',null,null,null,null,null,null,null,null,null); </html>',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,'assignment.png',null,null,null,null,null,null,null,null,null);
INSERT INTO TRANSETUP (TRAN_WINDOW,SAVE_FLAG,VAL_FLAG,KEY_FLAG,KEY_STRING,UDF_1,UDF_2,UDF_3,UDF_4,UDF_5,REPEATE_ADD,CHG_DATE,CHG_USER,CHG_TERM,EDI_OPTION,SITE_ACC_COL,CONFIRM_COL,CONFIRM_VAL,REPEAT_ADD_DET,REPEATADDDET,LOAD_MODE,AUTO_CONFIRM,LEDG_POST_CONF,CHG_DATE_ON_CONF,TRAN_ID_COL,MAIL_OPTION,CONFIRM_MODE,GARBAGE_OPT,VAL_FLAG_EDI,VERIFY_PASSWORD,CUST_ACC_COL,SALES_PERS_ACC_COL,SUPP_ACC_COL,ITEM_SER_ACC_CODE,EMP_ACC_COL,ITEM_SER_ACC_COL,WORKFLOW_OPT,TABLE_NAME,APPLICATION,TABLE_DESC,TRAN_DATE_COL,TRAN_ID__FROM,TRAN_ID__TO,TABLE_NAME_DET1,TABLE_NAME_DET2,TABLE_NAME_DET3,MULTITIRE_OPT,REF_SER,VIEW_MODE,TAX_FORMS,SIGN_STATUS,USER_TRAN_WINDOW,OBJ_NAME__PARENT,IGNOREERRLIST_ONLOAD,CHILDDATA_ARGOPT,EDIT_TMPLT,WRKFLW_INIT,EDITTAX,FORMAL_ARGS,AUDIT_TRAIL_OPT,EDIT_OPT,CACHE_OPT,OPTIMIZE_MODE,EDIT_EXPR,RATE_COL,QTY_COL,EDIT_EXPR_INP,RCP_CACHE_STATUS,PRINT_CONTROL,TRANSFER_MODE,PROFILE_ID__RES,TRAN_COMPL_MSG,PERIOD_OPTION,WRKFLW_PRIORITY,EXEC_TYPE,DISP_META_DATA,ALLOW_ATTACH,START_FORM,ISATTACHMENT,HEADER_FORM_NO,CONFIRM_DATE_COL,CONFIRM_BY_COL,MSG_ONSAVE,WF_STATUS,RESTART_FORM,CMS_PATH,BROW_DATA_DEF,DEF_VIEW,VIEW_OPTS,ISGWTINITIATED,DEFAULT_DATA_ROW,IN_WF_VAL,IN_WF_COL,CANCEL_VAL,CANCEL_COL,THUMB_ALT_COL,THUMB_IMAGE_COL,THUMB_OBJ,ATTACH_COUNT_MIN,FUNCTION_TYPE,COMPL_ACTION,DEFAULT_EDITOR,MSG_NO,OBJ_TYPE,STATUS_COL,ENABLE_EDITOR,OFFLINE_OPT,CLOSE_COL,CLOSE_VAL,THREAD_KEY_COL,LOAD_ORDER,SYNC_FROM_APP,TITLE,OBJ_NAME) INSERT INTO TRANSETUP (TRAN_WINDOW,SAVE_FLAG,VAL_FLAG,KEY_FLAG,KEY_STRING,UDF_1,UDF_2,UDF_3,UDF_4,UDF_5,REPEATE_ADD,CHG_DATE,CHG_USER,CHG_TERM,EDI_OPTION,SITE_ACC_COL,CONFIRM_COL,CONFIRM_VAL,REPEAT_ADD_DET,REPEATADDDET,LOAD_MODE,AUTO_CONFIRM,LEDG_POST_CONF,CHG_DATE_ON_CONF,TRAN_ID_COL,MAIL_OPTION,CONFIRM_MODE,GARBAGE_OPT,VAL_FLAG_EDI,VERIFY_PASSWORD,CUST_ACC_COL,SALES_PERS_ACC_COL,SUPP_ACC_COL,ITEM_SER_ACC_CODE,EMP_ACC_COL,ITEM_SER_ACC_COL,WORKFLOW_OPT,TABLE_NAME,APPLICATION,TABLE_DESC,TRAN_DATE_COL,TRAN_ID__FROM,TRAN_ID__TO,TABLE_NAME_DET1,TABLE_NAME_DET2,TABLE_NAME_DET3,MULTITIRE_OPT,REF_SER,VIEW_MODE,TAX_FORMS,SIGN_STATUS,USER_TRAN_WINDOW,OBJ_NAME__PARENT,IGNOREERRLIST_ONLOAD,CHILDDATA_ARGOPT,EDIT_TMPLT,WRKFLW_INIT,EDITTAX,FORMAL_ARGS,AUDIT_TRAIL_OPT,EDIT_OPT,CACHE_OPT,OPTIMIZE_MODE,EDIT_EXPR,RATE_COL,QTY_COL,EDIT_EXPR_INP,RCP_CACHE_STATUS,PRINT_CONTROL,TRANSFER_MODE,PROFILE_ID__RES,TRAN_COMPL_MSG,PERIOD_OPTION,WRKFLW_PRIORITY,EXEC_TYPE,DISP_META_DATA,ALLOW_ATTACH,START_FORM,ISATTACHMENT,HEADER_FORM_NO,CONFIRM_DATE_COL,CONFIRM_BY_COL,MSG_ONSAVE,WF_STATUS,RESTART_FORM,CMS_PATH,BROW_DATA_DEF,DEF_VIEW,VIEW_OPTS,ISGWTINITIATED,DEFAULT_DATA_ROW,IN_WF_VAL,IN_WF_COL,CANCEL_VAL,CANCEL_COL,THUMB_ALT_COL,THUMB_IMAGE_COL,THUMB_OBJ,ATTACH_COUNT_MIN,FUNCTION_TYPE,COMPL_ACTION,DEFAULT_EDITOR,MSG_NO,OBJ_TYPE,STATUS_COL,ENABLE_EDITOR,OFFLINE_OPT,CLOSE_COL,CLOSE_VAL,THREAD_KEY_COL,LOAD_ORDER,SYNC_FROM_APP,TITLE,OBJ_NAME) VALUES ('w_customer_pref_dist',NULL,NULL,'M',NULL,NULL,NULL,NULL,NULL,NULL,NULL,TO_DATE('27-02-26','DD-MM-RR'),'System','System',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'CUST_CODE,CUST_CODE__STK',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'CUSTOMER_PREF_DIST',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'N',NULL,NULL,NULL,'M',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Y',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'compact',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
VALUES ('w_customer_pref_dist',NULL,NULL,'M',NULL,NULL,NULL,NULL,NULL,NULL,NULL,TO_DATE('27-02-26','DD-MM-RR'),'System','System',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'CUST_CODE,CUST_CODE__STK',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'CUSTOMER_PREF_DIST',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'F',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'N',NULL,NULL,NULL,'M',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Y',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'compact',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
Insert into POPHELP (FIELD_NAME,MOD_NAME,SQL_STR,DW_OBJECT,MSG_TITLE,WIDTH,HEIGHT,CHG_DATE,CHG_USER,CHG_TERM,DIST_OPT,FILTER_STRING,SQL_INPUT,DEFAULT_COL,POP_ALIGN,QUERY_MODE,PAGE_CONTEXT,POPHELP_COLS,POPHELP_SOURCE,MULTI_OPT,HELP_OPTION,POPUP_XSL_NAME,AUTO_FILL_LEN,THUMB_OBJ,THUMB_IMAGE_COL,THUMB_ALT_COL,AUTO_MIN_LENGTH,OBJ_NAME__DS,DATA_MODEL_NAME,VALIDATE_DATA,ITEM_CHANGE,MSG_NO,FILTER_EXPR,LAYOUT) values ('CUST_CODE','W_CUSTOMER_PREF_DIST','SELECT CUST_CODE,CUST_NAME FROM CUSTOMER WHERE CUST_TYPE = ''R''','customer_pref_dist','Customer',0,0,to_date('31-03-22','DD-MM-RR'),'Saburi ','BASE ','1',null,null,1,'L',null,null,null,null,0,'2',null,'3','Icon','cust_code','cust_name','2 ',null,null,null,null,null,null,null); Insert into POPHELP (FIELD_NAME,MOD_NAME,SQL_STR,DW_OBJECT,MSG_TITLE,WIDTH,HEIGHT,CHG_DATE,CHG_USER,CHG_TERM,DIST_OPT,FILTER_STRING,SQL_INPUT,DEFAULT_COL,POP_ALIGN,QUERY_MODE,PAGE_CONTEXT,POPHELP_COLS,POPHELP_SOURCE,MULTI_OPT,HELP_OPTION,POPUP_XSL_NAME,AUTO_FILL_LEN,THUMB_OBJ,THUMB_IMAGE_COL,THUMB_ALT_COL,AUTO_MIN_LENGTH,OBJ_NAME__DS,DATA_MODEL_NAME,VALIDATE_DATA,ITEM_CHANGE,MSG_NO,FILTER_EXPR,LAYOUT) values ('CUST_CODE','W_CUSTOMER_PREF_DIST','SELECT CUST_CODE,CUST_NAME FROM CUSTOMER WHERE CUST_TYPE = ''R''','customer_pref_dist','Customer',0,0,to_date('31-03-22','DD-MM-RR'),'Saburi ','BASE ','1',null,null,1,'L',null,null,null,null,0,'2',null,'3','Icon','cust_code','cust_name','2 ',null,null,null,null,null,null,null);
Insert into POPHELP (FIELD_NAME,MOD_NAME,SQL_STR,DW_OBJECT,MSG_TITLE,WIDTH,HEIGHT,CHG_DATE,CHG_USER,CHG_TERM,DIST_OPT,FILTER_STRING,SQL_INPUT,DEFAULT_COL,POP_ALIGN,QUERY_MODE,PAGE_CONTEXT,POPHELP_COLS,POPHELP_SOURCE,MULTI_OPT,HELP_OPTION,POPUP_XSL_NAME,AUTO_FILL_LEN,THUMB_OBJ,THUMB_IMAGE_COL,THUMB_ALT_COL,AUTO_MIN_LENGTH,OBJ_NAME__DS,DATA_MODEL_NAME,VALIDATE_DATA,ITEM_CHANGE,MSG_NO,FILTER_EXPR,LAYOUT) values ('CUST_CODE__DIST','W_CUSTOMER_PREF_DIST','SELECT CUST_CODE,CUST_NAME FROM CUSTOMER WHERE CUST_TYPE = ''D''','customer_pref_dist','Customer',0,0,to_date('31-03-22','DD-MM-RR'),'Saburi ','BASE ','1',null,null,1,'L',null,null,null,null,0,'2',null,'3','Icon','cust_code','cust_name','2 ',null,null,null,null,null,null,null); Insert into POPHELP (FIELD_NAME,MOD_NAME,SQL_STR,DW_OBJECT,MSG_TITLE,WIDTH,HEIGHT,CHG_DATE,CHG_USER,CHG_TERM,DIST_OPT,FILTER_STRING,SQL_INPUT,DEFAULT_COL,POP_ALIGN,QUERY_MODE,PAGE_CONTEXT,POPHELP_COLS,POPHELP_SOURCE,MULTI_OPT,HELP_OPTION,POPUP_XSL_NAME,AUTO_FILL_LEN,THUMB_OBJ,THUMB_IMAGE_COL,THUMB_ALT_COL,AUTO_MIN_LENGTH,OBJ_NAME__DS,DATA_MODEL_NAME,VALIDATE_DATA,ITEM_CHANGE,MSG_NO,FILTER_EXPR,LAYOUT) values ('CUST_CODE__DIST','W_CUSTOMER_PREF_DIST','SELECT CUST_CODE,CUST_NAME FROM CUSTOMER WHERE CUST_TYPE = ''D''','customer_pref_dist','Customer',0,0,to_date('31-03-22','DD-MM-RR'),'Saburi ','BASE ','1',null,null,1,'L',null,null,null,null,0,'2',null,'3','Icon','cust_code','cust_name','2 ',null,null,null,null,null,null,null);
...@@ -61,3 +62,41 @@ Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY,EXEC_AT,JS_ARG ...@@ -61,3 +62,41 @@ Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY,EXEC_AT,JS_ARG
Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY,EXEC_AT,JS_ARG) values ('customer_pref_dist','1 ','cust_code__stk','Y',null,null); Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY,EXEC_AT,JS_ARG) values ('customer_pref_dist','1 ','cust_code__stk','Y',null,null);
-- Upload Utility option
Insert into OBJ_LINKS (OBJ_NAME,FORM_NO,FIELD_NAME,TARGET_OBJ_NAME,LINK_FORM_NAME,LINK_TITLE,LINK_URI,LINK_TYPE,LINK_ARG,UPDATE_FLAG,LINK_NAME,RIGHTS_CHAR,IMAGE,SHOW_IN_PANEL,SHORTCUT_CHAR,AUTO_INVOKE,SWIPE_POSITION,TITLE,DESCR,SHOW_CONFIRM,DISPLAY_MODE,LINE_NO,LINK_ID,REC_SPECIFIC,PAGE_CONTEXT,CHG_DATE,CHG_USER,CHG_TERM) values ('customer_pref_dist','1','home_8',' ',' ','Upload Utility','/ibase/webitm/jsp/E12UploadTemplate.jsp?reset=true','3','customer_pref_dist.String:OBJ_NAME, Customer Preferred Distributor.String:OBJ_DESC, fromHomePage.String:FROM_HOMEPAGE','1',null,'U',null,'3',null,null,null,null,null,null,'3',22,null,1,null,null,null,null);
update queries -- 25 March 2026
UPDATE POPHELP
SET SQL_STR =
'select ''Enter minimum three characters of customer name'' as cust_name, '''' as city, '''' as cust_code, '''' as ADDR1,
'' '' as ADDR2,'' '' as ADDR3
from dual
where ''?'' is null or length(''?'') < 3
union all
SELECT cust_name, city, cust_code, ADDR1, ADDR2, ADDR3
FROM CUSTOMER
WHERE (upper(cust_code) LIKE upper(''%?%'')
OR upper(cust_name) LIKE upper(''%?%''))
and length(''?'') >= 3',
DW_OBJECT = NULL,
WIDTH = NULL,
HEIGHT = NULL,
CHG_DATE = TO_DATE('17-03-16','DD-MM-RR'),
CHG_USER = 'EA001 ',
CHG_TERM = 'localhost.local',
DIST_OPT = '0',
SQL_INPUT = ':cust_code,:cust_code,:cust_code,:cust_code,:cust_code',
DEFAULT_COL = 3
WHERE FIELD_NAME = 'CUST_CODE'
AND MOD_NAME = 'W_CUSTOMER_PREF_DIST';
update MESSAGES set MSG_STR='Invalid Customer', MSG_DESCR='Please Enter Valid Customer' where MSG_NO='VCCUSTCODE';
update MESSAGES set MSG_STR='Invalid Stockist', MSG_DESCR='Please Enter Valid Stockist' where MSG_NO='VCCUSTSTK';
update MESSAGES set MSG_STR='Invalid Distributor', MSG_DESCR='Please Enter Valid Distributor' where MSG_NO='VCUSTDIST';
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