Commit 4ecc8e79 authored by Mohammed Dohadwala's avatar Mohammed Dohadwala

Committed on 16th March

parent 067d09e0
-- Table creation for Quotation Stockist (Third detail form in Sales Quotation)
CREATE TABLE SALES_QUOT_STOCKIST ( QUOT_NO CHAR(10) NOT NULL, LINE_NO NUMBER(4) NOT NULL, CUST_CODE CHAR(10), CUST_CODE__STK CHAR(10), CUST_CODE__DIST CHAR(10), CONSTRAINT PK_SALES_QUOT_STK PRIMARY KEY (QUOT_NO, LINE_NO) );
-- Form metadata entry for Quotation Stockist detail form in Sales Quotation screen
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_salesquot','Quotation Stockist','Exam11','Exam21',null,null,null,null,'3','T',null,null,null,null,null,null,null,null,null,null,null,null,null,'line_no','quantity','rate',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,'DetailForm.png',null,null,null,null,null,null,null,null,null);
-- Pophelp configuration for selecting Stockist from Customer Preferred Distributor mapping
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__STK','W_SALESQUOT','SELECT DISTINCT CPD.CUST_CODE__STK AS CUST_CODE, STK.CUST_NAME FROM CUSTOMER_PREF_DIST CPD JOIN CUSTOMER STK ON STK.CUST_CODE = CPD.CUST_CODE__STK',null,'Stockist Details',0,0,null,null,null,'1',null,null,1,'L',null,null,null,null,0,'1',null,'9',null,null,null,null,null,null,null,null,null,null,null);
-- Item change configuration for Stockist field in Sales Quotation form
Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY,EXEC_AT,JS_ARG) values ('salesquot','3 ','cust_code__stk','Y',null,null);
-- Item change configuration for default item logic in Sales Quotation form
Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY,EXEC_AT,JS_ARG) values ('salesquot','3 ','itm_default','Y',null,null);
package ibase.webitm.ejb.dis;
/**
* AUTHOR : MANISH MHATRE 10-3-2021
* COMPONENT : VALIDATION AND ITEMCHANGE OF SALES QUOTATION
**/
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 SalesQuotationIC 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();
for (ctr = 0; ctr < childList.getLength(); ctr++)
{
childNode = childList.item(ctr);
childNodeName = childNode.getNodeName();
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);
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;
// case 3 start
//Added by Ajit on 06-MARCH to add the validation if the transaction is not acknowedge [Start]
case 3 :
{
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();
BaseLogger.log("3", getUserInfo(), null, "Case 3 salesQuotationIC");
String quotNo = genericUtility.getColumnValue("quot_no", dom1);
BaseLogger.log("3", getUserInfo(), null, "Case 3 itm_default salesQuotationIC quotNo::"+quotNo);
String status = "";
String checkAcknowledgeStatusSql = "select status from sales_quot where quot_no = ?";
PreparedStatement checkAcknowledgeStatusPs = conn.prepareStatement(checkAcknowledgeStatusSql);
checkAcknowledgeStatusPs.setString(1, quotNo);
ResultSet checkAcknowledgeStatusRs = checkAcknowledgeStatusPs.executeQuery();
while(checkAcknowledgeStatusRs.next()) {
status = checkAcknowledgeStatusRs.getString("status");
BaseLogger.log("3", getUserInfo(), null, "Case 3 itm_default salesQuotationIC status::"+status);
}
if(!status.trim().equalsIgnoreCase("A")) {
BaseLogger.log("3", getUserInfo(), null, "Case 3 itm_default salesQuotationIC transaction is not acknowledged: status::"+status);
errCode = "NOACKN";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
if(checkAcknowledgeStatusRs != null)
{
checkAcknowledgeStatusRs.close();
checkAcknowledgeStatusRs = null;
}
if(checkAcknowledgeStatusPs != null)
{
checkAcknowledgeStatusPs.close();
checkAcknowledgeStatusPs = null;
}
}
}//end case 3
break;
//Added by Ajit on 06-MARCH to add the validation if the transaction is not acknowedge [End]
} //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, "currFrmXmlStr26Feb::"+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 );
System.out.println ( "ErrString :" + errString);
}
catch (Exception e)
{
System.out.println ( "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 cnt =0;
int currentFormNo = 0;
Timestamp todaysDate = null;
SimpleDateFormat sdf =null;
FinCommon finCommon = new FinCommon();
UtilMethods utilMethods = new UtilMethods();
DistCommon disCommon = new DistCommon();
String currentDateTime = "",loginSite="",loginCode="";
String custCode="",custDescr="",contPers="",contPrefix="",currCode="",currCodeFinEnt="",salesPers="",salesPersDescr="",actionTitle="";
String detCntStr="",quotNo="",unit="",itemCode="",itemDescr="",unitRate="",samplQty="",unitSampl="",schDate="",schDateUpto="",crTerm="",dlvAt="",dlvTerm="",packCode="",packInstr="",remarks="",itemSpec="",specDescr="",expectedResult="";
int linecnt=0;
double exchRate=0;
try
{
BaseLogger.log("3", getUserInfo(), null, "SalesQuotationIc --> editFlag ["+editFlag+"]");
BaseLogger.log("3", getUserInfo(), null, "SalesQuotationIc --> xtraParams ["+xtraParams.toString()+"]");
conn = getConnection();
loginSite = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode");
loginCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
actionTitle = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams, "actionTitle"));
BaseLogger.log("3", getUserInfo(), null, "SalesQuotationIc --> actionTitle ["+actionTitle+"]");
quotNo= checkNull(genericUtility.getColumnValue("quot_no", dom));
BaseLogger.log("3", getUserInfo(), null, "SalesQuotationIc --> quotNo ["+quotNo+"]");
sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
todaysDate = new java.sql.Timestamp(System.currentTimeMillis()) ;
currentDateTime = sdf.format(todaysDate);
//tranDate = sdf.format(todaysDate.toString());
//BaseLogger.log("3", getUserInfo(), null, "tranDate ---["+tranDate+"]");
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>");
}
}
valueXmlString.append("</Detail1>");
}
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+++++");
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= genericUtility.getColumnValue("quot_no", dom);
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>").append("<![CDATA[" + quotNo + "]]>").append("</quot_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>");
//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>");
}
break;
// case 3 start
// Added by Mohammed on 06-MARCH: Populate cust_code__dist from cust_code__stk.
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 ["+currentColumn+"]");
if(currentColumn.equalsIgnoreCase("cust_code__stk"))
{
String custCodeStk = "";
String custCodeDist = "";
custCodeStk = checkNull(genericUtility.getColumnValue("cust_code__stk", dom));
custCode = checkNull(genericUtility.getColumnValue("cust_code", dom1));
BaseLogger.log("3", getUserInfo(), null, "cust_code from Detail1 [" + custCode + "]");
BaseLogger.log("3", getUserInfo(), null, "custCodeStk [" + custCodeStk + "]");
BaseLogger.log("3", getUserInfo(), null, "custCode [" + custCode + "]");
sql = "select cust_code__dist from customer_pref_dist "
+ "where cust_code__stk = ? and cust_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCodeStk);
pstmt.setString(2, custCode);
rs = pstmt.executeQuery();
if(rs.next())
{
custCodeDist = rs.getString("cust_code__dist");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
custCodeDist = checkNull(custCodeDist);
valueXmlString.append("<cust_code__dist>")
.append("<![CDATA["+custCodeDist+"]]>")
.append("</cust_code__dist>");
}
valueXmlString.append("</Detail3>");
}
break;
//end case 3
} //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(conn != null)
{
conn.close();
conn = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch(Exception e)
{
BaseLogger.log("3", getUserInfo(), null, "Exception from itemchanged method --["+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 {
// TODO Auto-generated method stub
PreparedStatement pstmt = null;
ResultSet rs = null;
double ldRate = 0.00, mQty = 0.00,lcOrdValue = 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, discount = 0.0 , taxamt= 0.0;
String discountStr = "" , 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(lcQty*lcrate)+taxamt-discount)[" + netAmount+ "]");
valueXmlString.append("<net_amt>").append("<![CDATA["+netAmount+"]]>").append("</net_amt>");
} catch (NumberFormatException e) {
// TODO Auto-generated catch block
e.printStackTrace();
throw e; //Added By Mukesh Chauhan on 06/08/19
} catch (ITMException e) {
// TODO Auto-generated catch block
e.printStackTrace();
throw e; //Added By Mukesh Chauhan on 05/08/19
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
throw new ITMException(e); //Added By Mukesh Chauhan on 05/08/19
}
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
$PBExportHeader$salesquot13.srd
release 9;
datawindow(units=1 timer_interval=0 color=67108864 processing=1 HTMLDW=no print.printername="" print.documentname="" print.orientation = 0 print.margin.left = 24 print.margin.right = 24 print.margin.top = 24 print.margin.bottom = 24 print.paper.source = 0 print.paper.size = 0 print.canusedefaultprinter=yes print.prompt=no print.buttons=no print.preview.buttons=no print.cliptext=no print.overrideprintjob=no print.collate=yes hidegrayline=no grid.lines=0 )
header(height=20 color="536870912" )
summary(height=0 color="536870912" )
footer(height=0 color="536870912" )
detail(height=23 color="536870912" )
table(column=(type=char(10) update=yes updatewhereclause=yes key=yes name=quot_no dbname="quot_stockist.quot_no" )
column=(type=decimal(0) update=yes updatewhereclause=yes key=yes name=line_no dbname="quot_stockist.line_no" )
column=(type=char(10) update=yes updatewhereclause=yes name=cust_code dbname="quot_stockist.cust_code" )
column=(type=char(10) update=yes updatewhereclause=yes name=cust_code__stk dbname="quot_stockist.cust_code__stk" )
column=(type=char(10) update=yes updatewhereclause=yes name=cust_code__dist dbname="quot_stockist.cust_code__dist" )
column=(type=char(50) updatewhereclause=yes name=stockist_name dbname="stockist_name" )
column=(type=char(20) updatewhereclause=yes name=city_name dbname="city_name" )
column=(type=char(50) updatewhereclause=yes name=distributor_name dbname="distributor_name" )
column=(type=char(5) updatewhereclause=yes name=site_code dbname="site_code" )
column=(type=char(50) updatewhereclause=yes name=hospital_name dbname="hospital_name" )
retrieve="PBSELECT( VERSION(400) TABLE(NAME=~"quot_stockist~" ) COLUMN(NAME=~"quot_stockist.quot_no~") COLUMN(NAME=~"quot_stockist.line_no~") COLUMN(NAME=~"quot_stockist.cust_code~") COLUMN(NAME=~"quot_stockist.cust_code__stk~") COLUMN(NAME=~"quot_stockist.cust_code__dist~") COMPUTE(NAME=~"(select cust_name from customer where cust_code = quot_stockist.CUST_CODE__STK) as stockist_name~") COMPUTE(NAME=~"(select city from customer where cust_code = quot_stockist.CUST_CODE) as city_name~") COMPUTE(NAME=~"(select cust_name from customer where cust_code = quot_stockist.CUST_CODE__DIST) as distributor_name~") COMPUTE(NAME=~"(select SITE_CODE__PBUS from customer where cust_code = quot_stockist.CUST_CODE__DIST) as site_code~") COMPUTE(NAME=~"(select cust_name from customer where cust_code = quot_stockist.CUST_CODE) as hospital_name~")WHERE( EXP1 =~"quot_stockist.quot_no~" OP =~"=~" EXP2 =~":quot_no~" ) ) ARG(NAME = ~"quot_no~" TYPE = string) " update="quot_stockist" updatewhere=0 updatekeyinplace=no arguments=(("quot_no", string)) )
text(band=header alignment="2" text="Quot No" border="2" color="0" x="2" y="2" height="16" width="66" html.valueishtml="0" name=quot_no_t visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Line No" border="2" color="0" x="70" y="2" height="16" width="72" html.valueishtml="0" name=line_no_t visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Cust Code" border="2" color="0" x="144" y="2" height="16" width="66" html.valueishtml="0" name=cust_code_t visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Cust Code Stk" border="2" color="0" x="212" y="2" height="16" width="89" html.valueishtml="0" name=cust_code__stk_t visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Cust Code Dist" border="2" color="0" x="303" y="2" height="16" width="92" html.valueishtml="0" name=cust_code__dist_t visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Distributor Name" border="0" color="33554432" x="397" y="1" height="19" width="298" html.valueishtml="0" name=distributor_name_t visible="1" font.face="Arial" font.height="-12" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" )
text(band=header alignment="0" text="Stockist Name" border="0" color="33554432" x="697" y="1" height="19" width="298" html.valueishtml="0" name=stockist_name_t visible="1" font.face="Arial" font.height="-12" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" )
text(band=header alignment="0" text="Site Code" border="0" color="33554432" x="997" y="1" height="19" width="28" html.valueishtml="0" name=site_code_t visible="1" font.face="Arial" font.height="-12" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" )
text(band=header alignment="0" text="Hospital Name" border="0" color="33554432" x="1027" y="1" height="19" width="298" html.valueishtml="0" name=hospital_name_t visible="1" font.face="Arial" font.height="-12" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" )
text(band=header alignment="0" text="City Name" border="0" color="33554432" x="1327" y="1" height="19" width="118" html.valueishtml="0" name=city_name_t visible="1" font.face="Arial" font.height="-12" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" )
column(band=detail id=1 alignment="0" tabsequence=32766 border="2" color="33554432" x="2" y="2" height="19" width="66" format="[general]" html.valueishtml="0" name=quot_no visible="1" edit.limit=10 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=2 alignment="1" tabsequence=32766 border="2" color="33554432" x="70" y="2" height="19" width="72" format="[general]" html.valueishtml="0" name=line_no visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=3 alignment="0" tabsequence=32766 border="2" color="33554432" x="144" y="2" height="19" width="66" format="[general]" html.valueishtml="0" name=cust_code visible="1" edit.limit=10 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=4 alignment="0" tabsequence=32766 border="2" color="33554432" x="212" y="2" height="19" width="89" format="[general]" html.valueishtml="0" name=cust_code__stk visible="1" edit.limit=10 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=5 alignment="0" tabsequence=32766 border="2" color="33554432" x="303" y="2" height="19" width="92" format="[general]" html.valueishtml="0" name=cust_code__dist visible="1" edit.limit=10 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=8 alignment="0" tabsequence=32766 border="0" color="33554432" x="397" y="1" height="16" width="298" format="[general]" html.valueishtml="0" name=distributor_name visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=6 alignment="0" tabsequence=32766 border="0" color="33554432" x="697" y="1" height="16" width="298" format="[general]" html.valueishtml="0" name=stockist_name visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=9 alignment="0" tabsequence=32766 border="0" color="33554432" x="997" y="1" height="16" width="28" format="[general]" html.valueishtml="0" name=site_code visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=10 alignment="0" tabsequence=32766 border="0" color="33554432" x="1027" y="1" height="16" width="298" format="[general]" html.valueishtml="0" name=hospital_name visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=7 alignment="0" tabsequence=32766 border="0" color="33554432" x="1327" y="1" height="16" width="118" format="[general]" html.valueishtml="0" name=city_name visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" )
export.xml(headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 )
import.xml()
export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" )
\ No newline at end of file
<?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>67108864</color>
<processing>1</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>
<grid.lines>0</grid.lines>
</BaseDefinition>
<Header>
<height>20</height>
<color>536870912</color>
</Header>
<Summary>
<height>0</height>
<color>536870912</color>
</Summary>
<Footer>
<height>0</height>
<color>536870912</color>
</Footer>
<Detail>
<height>23</height>
<color>536870912</color>
</Detail>
<TableDefinition>
<table_column>
<type size="10">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<key>yes</key>
<name>quot_no</name>
<dbname>quot_stockist.quot_no</dbname>
</table_column>
<table_column>
<type precision="0">decimal</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<key>yes</key>
<name>line_no</name>
<dbname>quot_stockist.line_no</dbname>
</table_column>
<table_column>
<type size="10">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>cust_code</name>
<dbname>quot_stockist.cust_code</dbname>
</table_column>
<table_column>
<type size="10">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>cust_code__stk</name>
<dbname>quot_stockist.cust_code__stk</dbname>
</table_column>
<table_column>
<type size="10">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>cust_code__dist</name>
<dbname>quot_stockist.cust_code__dist</dbname>
</table_column>
<table_column>
<type size="50">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>stockist_name</name>
<dbname>stockist_name</dbname>
</table_column>
<table_column>
<type size="20">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>city_name</name>
<dbname>city_name</dbname>
</table_column>
<table_column>
<type size="50">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>distributor_name</name>
<dbname>distributor_name</dbname>
</table_column>
<table_column>
<type size="5">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>site_code</name>
<dbname>site_code</dbname>
</table_column>
<table_column>
<type size="50">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>hospital_name</name>
<dbname>hospital_name</dbname>
</table_column>
<retrieve>PBSELECT( VERSION(400) TABLE(NAME=&quot;quot_stockist&quot; ) COLUMN(NAME=&quot;quot_stockist.quot_no&quot;) COLUMN(NAME=&quot;quot_stockist.line_no&quot;) COLUMN(NAME=&quot;quot_stockist.cust_code&quot;) COLUMN(NAME=&quot;quot_stockist.cust_code__stk&quot;) COLUMN(NAME=&quot;quot_stockist.cust_code__dist&quot;) COMPUTE(NAME=&quot;(select cust_name from customer where cust_code = quot_stockist.CUST_CODE__STK) as stockist_name&quot;) COMPUTE(NAME=&quot;(select city from customer where cust_code = quot_stockist.CUST_CODE) as city_name&quot;) COMPUTE(NAME=&quot;(select cust_name from customer where cust_code = quot_stockist.CUST_CODE__DIST) as distributor_name&quot;) COMPUTE(NAME=&quot;(select SITE_CODE__PBUS from customer where cust_code = quot_stockist.CUST_CODE__DIST) as site_code&quot;) COMPUTE(NAME=&quot;(select cust_name from customer where cust_code = quot_stockist.CUST_CODE) as hospital_name&quot;)WHERE( EXP1 =&quot;quot_stockist.quot_no&quot; OP =&quot;=&quot; EXP2 =&quot;:quot_no&quot; ) ) ARG(NAME = &quot;quot_no&quot; TYPE = string) </retrieve>
<update>quot_stockist</update>
<updatewhere>0</updatewhere>
<updatekeyinplace>no</updatekeyinplace>
<argument>
<name>quot_no</name>
<type>string</type>
</argument>
</TableDefinition>
<TextObject>
<band>Header</band>
<alignment>2</alignment>
<text>Quot No</text>
<border>2</border>
<color>0</color>
<x>2</x>
<y>2</y>
<height>16</height>
<width>66</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>quot_no_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</TextObject>
<TextObject>
<band>Header</band>
<alignment>2</alignment>
<text>Line No</text>
<border>2</border>
<color>0</color>
<x>70</x>
<y>2</y>
<height>16</height>
<width>72</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>line_no_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</TextObject>
<TextObject>
<band>Header</band>
<alignment>2</alignment>
<text>Cust Code</text>
<border>2</border>
<color>0</color>
<x>144</x>
<y>2</y>
<height>16</height>
<width>66</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</TextObject>
<TextObject>
<band>Header</band>
<alignment>2</alignment>
<text>Cust Code Stk</text>
<border>2</border>
<color>0</color>
<x>212</x>
<y>2</y>
<height>16</height>
<width>89</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code__stk_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</TextObject>
<TextObject>
<band>Header</band>
<alignment>2</alignment>
<text>Cust Code Dist</text>
<border>2</border>
<color>0</color>
<x>303</x>
<y>2</y>
<height>16</height>
<width>92</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code__dist_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</TextObject>
<TextObject>
<band>Header</band>
<alignment>0</alignment>
<text>Distributor Name</text>
<border>0</border>
<color>33554432</color>
<x>397</x>
<y>1</y>
<height>19</height>
<width>298</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>distributor_name_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-12</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>1073741824</color>
</background>
</TextObject>
<TextObject>
<band>Header</band>
<alignment>0</alignment>
<text>Stockist Name</text>
<border>0</border>
<color>33554432</color>
<x>697</x>
<y>1</y>
<height>19</height>
<width>298</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>stockist_name_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-12</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>1073741824</color>
</background>
</TextObject>
<TextObject>
<band>Header</band>
<alignment>0</alignment>
<text>Site Code</text>
<border>0</border>
<color>33554432</color>
<x>997</x>
<y>1</y>
<height>19</height>
<width>28</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>site_code_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-12</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>1073741824</color>
</background>
</TextObject>
<TextObject>
<band>Header</band>
<alignment>0</alignment>
<text>Hospital Name</text>
<border>0</border>
<color>33554432</color>
<x>1027</x>
<y>1</y>
<height>19</height>
<width>298</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>hospital_name_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-12</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>1073741824</color>
</background>
</TextObject>
<TextObject>
<band>Header</band>
<alignment>0</alignment>
<text>City Name</text>
<border>0</border>
<color>33554432</color>
<x>1327</x>
<y>1</y>
<height>19</height>
<width>118</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>city_name_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-12</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>1073741824</color>
</background>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>1</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>2</x>
<y>2</y>
<height>19</height>
<width>66</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>quot_no</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>2</id>
<alignment>1</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>70</x>
<y>2</y>
<height>19</height>
<width>72</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>line_no</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>3</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>144</x>
<y>2</y>
<height>19</height>
<width>66</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>4</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>212</x>
<y>2</y>
<height>19</height>
<width>89</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code__stk</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>5</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>303</x>
<y>2</y>
<height>19</height>
<width>92</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code__dist</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>8</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>0</border>
<color>33554432</color>
<x>397</x>
<y>1</y>
<height>16</height>
<width>298</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>distributor_name</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>6</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>0</border>
<color>33554432</color>
<x>697</x>
<y>1</y>
<height>16</height>
<width>298</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>stockist_name</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>9</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>0</border>
<color>33554432</color>
<x>997</x>
<y>1</y>
<height>16</height>
<width>28</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>site_code</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>10</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>0</border>
<color>33554432</color>
<x>1027</x>
<y>1</y>
<height>16</height>
<width>298</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>hospital_name</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>7</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>0</border>
<color>33554432</color>
<x>1327</x>
<y>1</y>
<height>16</height>
<width>118</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>city_name</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<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>
$PBExportHeader$salesquot23.srd
release 9;
datawindow(units=1 timer_interval=0 color=1073741824 processing=0 HTMLDW=no print.printername="" print.documentname="" print.orientation = 0 print.margin.left = 24 print.margin.right = 24 print.margin.top = 24 print.margin.bottom = 24 print.paper.source = 0 print.paper.size = 0 print.canusedefaultprinter=yes print.prompt=no print.buttons=no print.preview.buttons=no print.cliptext=no print.overrideprintjob=no print.collate=yes hidegrayline=no )
summary(height=0 color="536870912" )
footer(height=1 color="536870912" )
detail(height=432 color="536870912" )
table(column=(type=char(10) update=yes updatewhereclause=yes name=cust_code__dist dbname="quot_stockist.cust_code__dist" )
column=(type=char(10) update=yes updatewhereclause=yes name=cust_code__stk dbname="quot_stockist.cust_code__stk" )
column=(type=char(10) update=yes updatewhereclause=yes key=yes name=quot_no dbname="quot_stockist.quot_no" )
column=(type=char(10) update=yes updatewhereclause=yes name=cust_code dbname="quot_stockist.cust_code" )
column=(type=decimal(0) update=yes updatewhereclause=yes key=yes name=line_no dbname="quot_stockist.line_no" )
column=(type=char(50) updatewhereclause=yes name=distributor_name dbname="distributor_name" )
column=(type=char(50) updatewhereclause=yes name=stockist_name dbname="stockist_name" )
column=(type=char(20) updatewhereclause=yes name=city_name dbname="city_name" )
column=(type=char(5) updatewhereclause=yes name=site_code dbname="site_code" )
column=(type=char(50) updatewhereclause=yes name=hospital_name dbname="hospital_name" )
column=(type=char(10) update=yes updatewhereclause=yes name=cust_code dbname="cust_code" )
retrieve="PBSELECT( VERSION(400) TABLE(NAME=~"quot_stockist~" ) COLUMN(NAME=~"quot_stockist.cust_code__dist~") COLUMN(NAME=~"quot_stockist.cust_code__stk~") COLUMN(NAME=~"quot_stockist.quot_no~") COLUMN(NAME=~"quot_stockist.cust_code~") COLUMN(NAME=~"quot_stockist.line_no~") COMPUTE(NAME=~"(select cust_name from customer where cust_code = quot_stockist.CUST_CODE__DIST) as distributor_name~") COMPUTE(NAME=~"(select cust_name from customer where cust_code = quot_stockist.CUST_CODE__STK) as stockist_name~") COMPUTE(NAME=~"(select city from customer where cust_code = quot_stockist.CUST_CODE) as city_name~") COMPUTE(NAME=~"(select SITE_CODE__PBUS from customer where cust_code = quot_stockist.CUST_CODE__DIST) as site_code~") COMPUTE(NAME=~"(select cust_name from customer where cust_code = quot_stockist.CUST_CODE) as hospital_name~") COMPUTE(NAME=~"(select cust_code from customer where cust_code = quot_stockist.CUST_CODE) as cust_code~")) " update="quot_stockist" updatewhere=0 updatekeyinplace=no )
groupbox(band=detail text="General "border="2" color="0" x="216" y="34" height="378" width="412" name=gb_1 visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" )
text(band=detail alignment="1" text="Quotation Number:" border="2" color="0" x="278" y="55" height="16" width="113" html.valueishtml="0" name=quot_no_t visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=3 alignment="0" tabsequence=32766 border="2" color="33554432" x="416" y="55" height="19" width="66" format="[general]" html.valueishtml="0" name=quot_no visible="1" edit.limit=10 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=detail alignment="1" text="Line No:" border="2" color="0" x="277" y="89" height="16" width="96" html.valueishtml="0" name=line_no_t visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=5 alignment="1" tabsequence=32766 border="2" color="33554432" x="414" y="91" height="19" width="72" format="[general]" html.valueishtml="0" name=line_no visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=detail alignment="1" text="Customer Code:" border="2" color="0" x="277" y="127" height="16" width="96" html.valueishtml="0" name=cust_code_t visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=detail alignment="1" text="Customer Code Stockist:" border="2" color="0" x="267" y="208" height="16" width="146" html.valueishtml="0" name=cust_code__stk_t visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=2 alignment="0" tabsequence=10 border="2" color="33554432" x="434" y="206" height="19" width="66" format="[general]" html.valueishtml="0" name=cust_code__stk visible="1" edit.limit=10 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=detail alignment="1" text="Customer Code Distributor:" border="2" color="0" x="268" y="276" height="16" width="161" html.valueishtml="0" name=cust_code__dist_t visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=1 alignment="0" tabsequence=32766 border="2" color="33554432" x="442" y="275" height="19" width="66" format="[general]" html.valueishtml="0" name=cust_code__dist visible="1" edit.limit=10 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=6 alignment="0" tabsequence=32766 border="2" color="33554432" x="397" y="313" height="21" width="115" format="[general]" html.valueishtml="0" name=distributor_name visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=7 alignment="0" tabsequence=32766 border="2" color="33554432" x="270" y="243" height="17" width="233" format="[general]" html.valueishtml="0" name=stockist_name visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=9 alignment="0" tabsequence=32766 border="2" color="33554432" x="275" y="315" height="17" width="110" format="[general]" html.valueishtml="0" name=site_code visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=8 alignment="0" tabsequence=32766 border="2" color="33554432" x="275" y="167" height="17" width="88" format="[general]" html.valueishtml="0" name=city_name visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=10 alignment="0" tabsequence=32766 border="2" color="33554432" x="382" y="166" height="19" width="92" format="[general]" html.valueishtml="0" name=hospital_name visible="1" edit.limit=0 edit.case=any edit.autoselect=yes edit.imemode=0 font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=11 alignment="0" tabsequence=32766 border="2" color="33554432" x="414" y="130" height="16" width="60" html.valueishtml="0" name=cust_code visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" )
export.xml(headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 )
import.xml()
export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" )
\ No newline at end of file
<?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>1073741824</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>1</height>
<color>536870912</color>
</Footer>
<Detail>
<height>432</height>
<color>536870912</color>
</Detail>
<TableDefinition>
<table_column>
<type size="10">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>cust_code__dist</name>
<dbname>quot_stockist.cust_code__dist</dbname>
</table_column>
<table_column>
<type size="10">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>cust_code__stk</name>
<dbname>quot_stockist.cust_code__stk</dbname>
</table_column>
<table_column>
<type size="10">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<key>yes</key>
<name>quot_no</name>
<dbname>quot_stockist.quot_no</dbname>
</table_column>
<table_column>
<type size="10">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>cust_code</name>
<dbname>quot_stockist.cust_code</dbname>
</table_column>
<table_column>
<type precision="0">decimal</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<key>yes</key>
<name>line_no</name>
<dbname>quot_stockist.line_no</dbname>
</table_column>
<table_column>
<type size="50">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>distributor_name</name>
<dbname>distributor_name</dbname>
</table_column>
<table_column>
<type size="50">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>stockist_name</name>
<dbname>stockist_name</dbname>
</table_column>
<table_column>
<type size="20">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>city_name</name>
<dbname>city_name</dbname>
</table_column>
<table_column>
<type size="5">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>site_code</name>
<dbname>site_code</dbname>
</table_column>
<table_column>
<type size="50">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>hospital_name</name>
<dbname>hospital_name</dbname>
</table_column>
<table_column>
<type size="10">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>cust_code</name>
<dbname>cust_code</dbname>
</table_column>
<retrieve>PBSELECT( VERSION(400) TABLE(NAME=&quot;quot_stockist&quot; ) COLUMN(NAME=&quot;quot_stockist.cust_code__dist&quot;) COLUMN(NAME=&quot;quot_stockist.cust_code__stk&quot;) COLUMN(NAME=&quot;quot_stockist.quot_no&quot;) COLUMN(NAME=&quot;quot_stockist.cust_code&quot;) COLUMN(NAME=&quot;quot_stockist.line_no&quot;) COMPUTE(NAME=&quot;(select cust_name from customer where cust_code = quot_stockist.CUST_CODE__DIST) as distributor_name&quot;) COMPUTE(NAME=&quot;(select cust_name from customer where cust_code = quot_stockist.CUST_CODE__STK) as stockist_name&quot;) COMPUTE(NAME=&quot;(select city from customer where cust_code = quot_stockist.CUST_CODE) as city_name&quot;) COMPUTE(NAME=&quot;(select SITE_CODE__PBUS from customer where cust_code = quot_stockist.CUST_CODE__DIST) as site_code&quot;) COMPUTE(NAME=&quot;(select cust_name from customer where cust_code = quot_stockist.CUST_CODE) as hospital_name&quot;) COMPUTE(NAME=&quot;(select cust_code from customer where cust_code = quot_stockist.CUST_CODE) as cust_code&quot;)) </retrieve>
<update>quot_stockist</update>
<updatewhere>0</updatewhere>
<updatekeyinplace>no</updatekeyinplace>
</TableDefinition>
<GroupBox>
<band>Detail</band>
<text>General </text>
<border>2</border>
<color>0</color>
<x>216</x>
<y>34</y>
<height>378</height>
<width>412</width>
<name>gb_1</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>1073741824</color>
</background>
</GroupBox>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Quotation Number:</text>
<border>2</border>
<color>0</color>
<x>278</x>
<y>55</y>
<height>16</height>
<width>113</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>quot_no_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>3</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>416</x>
<y>55</y>
<height>19</height>
<width>66</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>quot_no</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Line No:</text>
<border>2</border>
<color>0</color>
<x>277</x>
<y>89</y>
<height>16</height>
<width>96</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>line_no_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>5</id>
<alignment>1</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>414</x>
<y>91</y>
<height>19</height>
<width>72</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>line_no</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Customer Code:</text>
<border>2</border>
<color>0</color>
<x>277</x>
<y>127</y>
<height>16</height>
<width>96</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</TextObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Customer Code Stockist:</text>
<border>2</border>
<color>0</color>
<x>267</x>
<y>208</y>
<height>16</height>
<width>146</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code__stk_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>2</id>
<alignment>0</alignment>
<tabsequence>10</tabsequence>
<border>2</border>
<color>33554432</color>
<x>434</x>
<y>206</y>
<height>19</height>
<width>66</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code__stk</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Customer Code Distributor:</text>
<border>2</border>
<color>0</color>
<x>268</x>
<y>276</y>
<height>16</height>
<width>161</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code__dist_t</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>1</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>442</x>
<y>275</y>
<height>19</height>
<width>66</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code__dist</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>6</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>397</x>
<y>313</y>
<height>21</height>
<width>115</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>distributor_name</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>7</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>270</x>
<y>243</y>
<height>17</height>
<width>233</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>stockist_name</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>9</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>275</x>
<y>315</y>
<height>17</height>
<width>110</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>site_code</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>8</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>275</x>
<y>167</y>
<height>17</height>
<width>88</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>city_name</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>10</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>382</x>
<y>166</y>
<height>19</height>
<width>92</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>hospital_name</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>11</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>414</x>
<y>130</y>
<height>16</height>
<width>60</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cust_code</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>536870912</color>
</background>
</ColumnObject>
<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>
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