Commit 3a22c389 authored by SABURI PATEKAR's avatar SABURI PATEKAR
parents 72d14314 ee6e9228
......@@ -213,6 +213,7 @@ Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY,EXEC_AT,JS_ARG
Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY,EXEC_AT,JS_ARG) values ('rfq_wiz','2','rate_quot','Y',null,null);
Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY,EXEC_AT,JS_ARG) values ('rfq','1','item_Ser',null,null,null);
Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY,EXEC_AT,JS_ARG) values ('rfq','1','item_ser',null,null,null);
Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY,EXEC_AT,JS_ARG) values ('rfq','1','itm_default','Y',null,null);
Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERACTIVE,RIGHTS_CHAR,TITLE,FORM_NO,SERVICE_HANDLER,PLACEMENT,ACTION_TYPE,TRAN_TYPE,CHG_DATE,CHG_TERM,CHG_USER,IS_CONFIRMATION_REQ,SEP_DUTY_OPT,RE_AUTH_OPT,SHOW_IN_PANEL,PAGE_CONTEXT,TYPE,ACTION_ARG,SWIPE_POSITION,MULTI_ROW_OPT,ACTION_ID,DEF_NODATA,IN_PROC_INTRUPT,ESTIMATED_TIME,ACTION_GROUP,DISPLAY_OPT,DISPLAY_MODE,SHOW_CONFIRM,REC_SPECIFIC) values ('rfq',1,'ibase/resource/objaction/add.svg',null,'rfq_None','a','A','Add','1',null,null,'S',null,to_date('03-FEB-26','DD-MON-RR'),'System','System ',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,'2',null,null);
Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERACTIVE,RIGHTS_CHAR,TITLE,FORM_NO,SERVICE_HANDLER,PLACEMENT,ACTION_TYPE,TRAN_TYPE,CHG_DATE,CHG_TERM,CHG_USER,IS_CONFIRMATION_REQ,SEP_DUTY_OPT,RE_AUTH_OPT,SHOW_IN_PANEL,PAGE_CONTEXT,TYPE,ACTION_ARG,SWIPE_POSITION,MULTI_ROW_OPT,ACTION_ID,DEF_NODATA,IN_PROC_INTRUPT,ESTIMATED_TIME,ACTION_GROUP,DISPLAY_OPT,DISPLAY_MODE,SHOW_CONFIRM,REC_SPECIFIC) values ('rfq',2,'ibase/resource/objaction/edit.svg',null,'rfq_None','a','E','Edit','1',null,null,'S',null,to_date('03-FEB-26','DD-MON-RR'),'System','System ',null,null,null,null,null,null,null,'1 ',null,null,null,null,null,null,null,'2','000',null);
......
......@@ -11,6 +11,7 @@ import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import org.w3c.dom.Document;
......@@ -481,6 +482,24 @@ public class ReqForQuotationIC extends ValidatorEJB {
case 1:
{
valueXmlString.append("<Detail1>");
if ("itm_default".equalsIgnoreCase(currentColumn.trim())) {
BaseLogger.log("3", null, null, "ReqForQuotationIC in itm_default case 1");
// Set tran_date to current date
SimpleDateFormat dtFormat = new SimpleDateFormat(getApplDateFormat());
String currDate = dtFormat.format(Calendar.getInstance().getTime());
valueXmlString.append("<tran_date>").append("<![CDATA[" + currDate + "]]>").append("</tran_date>\r\n");
// Set req_date to current date
valueXmlString.append("<req_date>").append("<![CDATA[" + currDate + "]]>").append("</req_date>\r\n");
// Set site_code to logged in user's site code
valueXmlString.append("<site_code>").append("<![CDATA[" + siteCode + "]]>").append("</site_code>\r\n");
valueXmlString.append("<quot_type>").append("<![CDATA[C]]>").append("</quot_type>");
// Set sales_pers to logged in user's code
valueXmlString.append("<sales_pers>").append("<![CDATA[" + userCode + "]]>").append("</sales_pers>\r\n");
}
if ("cust_code".equalsIgnoreCase(currentColumn.trim())) {
BaseLogger.log("3", null, null, "ReqForQuotationIC in item change case 1 cust_code condition");
......@@ -889,12 +908,14 @@ public class ReqForQuotationIC extends ValidatorEJB {
if (rateApprvVal.compareTo(rateQuotVal) > 0) {
BaseLogger.log("3", null, null, "in rateApprvVal greater condition");
BaseLogger.log("3", null, null, "in rateApprvVal greater condition valueXmlString::"+ valueXmlString);
String detail1Xml = "<mgmnt_apprv><![CDATA[Y]]></mgmnt_apprv><wf_status><![CDATA[P]]></wf_status>";
int pos = valueXmlString.indexOf("<Detail1>");
int pos = valueXmlString.indexOf("<header>");
if (pos != -1) {
pos += "<Detail1>".length(); // move after </header>
pos += "<header>".length(); // move after </header>
valueXmlString.insert(pos, detail1Xml);
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -1508,11 +1508,21 @@ public class SalesQuotationIC extends ValidatorEJB implements ValidatorLocal,Val
{
String custCodeStk = "";
String custCodeDist = "";
String stockistName = "";
String distributorName = "";
String custName = "";
custCodeStk = checkNull(genericUtility.getColumnValue("cust_code__stk", dom));
custCode = checkNull(genericUtility.getColumnValue("cust_code", dom1));
custName = checkNull(genericUtility.getColumnValue("cust_name", dom1));
valueXmlString.append("<cust_code>")
.append("<![CDATA["+custCode+"]]>")
.append("</cust_code>");
valueXmlString.append("<cust_code_desc>")
.append("<![CDATA["+custName+"]]>")
.append("</cust_code_desc>");
BaseLogger.log("3", getUserInfo(), null, "cust_code from Detail1 [" + custCode + "]");
BaseLogger.log("3", getUserInfo(), null, "custCodeStk [" + custCodeStk + "]");
BaseLogger.log("3", getUserInfo(), null, "custCode [" + custCode + "]");
......@@ -1546,6 +1556,64 @@ public class SalesQuotationIC extends ValidatorEJB implements ValidatorLocal,Val
valueXmlString.append("<cust_code__dist>")
.append("<![CDATA["+custCodeDist+"]]>")
.append("</cust_code__dist>");
/* -------- NAME LOGIC -------- */
if(custCodeStk.trim().length() > 0)
{
sql = "select cust_name from customer where cust_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCodeStk);
rs = pstmt.executeQuery();
if(rs.next())
{
stockistName = rs.getString("cust_name");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
valueXmlString.append("<stockist_name>")
.append("<![CDATA["+stockistName+"]]>")
.append("</stockist_name>");
if(custCodeDist.trim().length() > 0)
{
sql = "select cust_name from customer where cust_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCodeDist);
rs = pstmt.executeQuery();
if(rs.next())
{
distributorName = rs.getString("cust_name");
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
valueXmlString.append("<distributor_name>")
.append("<![CDATA["+distributorName+"]]>")
.append("</distributor_name>");
}
valueXmlString.append("</Detail3>");
......
This diff is collapsed.
......@@ -127,13 +127,13 @@
<TextObject>
<band>Header</band>
<alignment>2</alignment>
<text>Quot No</text>
<text>Quote No</text>
<border>2</border>
<color>0</color>
<x>2</x>
<y>2</y>
<height>16</height>
<width>66</width>
<width>72</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -158,7 +158,7 @@
<text>Line No</text>
<border>2</border>
<color>0</color>
<x>70</x>
<x>76</x>
<y>2</y>
<height>16</height>
<width>72</width>
......@@ -183,13 +183,13 @@
<TextObject>
<band>Header</band>
<alignment>2</alignment>
<text>Cust Code</text>
<text>Customer</text>
<border>2</border>
<color>0</color>
<x>144</x>
<x>150</x>
<y>2</y>
<height>16</height>
<width>66</width>
<width>63</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -211,13 +211,13 @@
<TextObject>
<band>Header</band>
<alignment>2</alignment>
<text>Cust Code Stk</text>
<text>Stockist</text>
<border>2</border>
<color>0</color>
<x>212</x>
<x>215</x>
<y>2</y>
<height>16</height>
<width>89</width>
<width>77</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -239,13 +239,13 @@
<TextObject>
<band>Header</band>
<alignment>2</alignment>
<text>Cust Code Dist</text>
<text>Distributor</text>
<border>2</border>
<color>0</color>
<x>303</x>
<x>294</x>
<y>2</y>
<height>16</height>
<width>92</width>
<width>80</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -270,10 +270,10 @@
<text>Distributor Name</text>
<border>0</border>
<color>33554432</color>
<x>397</x>
<x>376</x>
<y>1</y>
<height>19</height>
<width>298</width>
<width>211</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -298,10 +298,10 @@
<text>Stockist Name</text>
<border>0</border>
<color>33554432</color>
<x>697</x>
<x>589</x>
<y>1</y>
<height>19</height>
<width>298</width>
<width>195</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -323,13 +323,13 @@
<TextObject>
<band>Header</band>
<alignment>0</alignment>
<text>Site Code</text>
<text>Site</text>
<border>0</border>
<color>33554432</color>
<x>997</x>
<x>786</x>
<y>1</y>
<height>19</height>
<width>28</width>
<width>75</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -354,10 +354,10 @@
<text>Hospital Name</text>
<border>0</border>
<color>33554432</color>
<x>1027</x>
<x>863</x>
<y>1</y>
<height>19</height>
<width>298</width>
<width>169</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -382,10 +382,10 @@
<text>City Name</text>
<border>0</border>
<color>33554432</color>
<x>1327</x>
<x>1034</x>
<y>1</y>
<height>19</height>
<width>118</width>
<width>130</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -414,7 +414,7 @@
<x>2</x>
<y>2</y>
<height>19</height>
<width>66</width>
<width>72</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
......@@ -449,7 +449,7 @@
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>70</x>
<x>76</x>
<y>2</y>
<height>19</height>
<width>72</width>
......@@ -487,10 +487,10 @@
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>144</x>
<x>150</x>
<y>2</y>
<height>19</height>
<width>66</width>
<width>63</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
......@@ -525,10 +525,10 @@
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>212</x>
<x>215</x>
<y>2</y>
<height>19</height>
<width>89</width>
<width>77</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
......@@ -563,10 +563,10 @@
<tabsequence>32766</tabsequence>
<border>2</border>
<color>33554432</color>
<x>303</x>
<x>294</x>
<y>2</y>
<height>19</height>
<width>92</width>
<width>80</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
......@@ -601,10 +601,10 @@
<tabsequence>32766</tabsequence>
<border>0</border>
<color>33554432</color>
<x>397</x>
<x>376</x>
<y>1</y>
<height>16</height>
<width>298</width>
<width>211</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
......@@ -637,10 +637,10 @@
<tabsequence>32766</tabsequence>
<border>0</border>
<color>33554432</color>
<x>697</x>
<x>589</x>
<y>1</y>
<height>16</height>
<width>298</width>
<width>195</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
......@@ -673,10 +673,10 @@
<tabsequence>32766</tabsequence>
<border>0</border>
<color>33554432</color>
<x>997</x>
<x>786</x>
<y>1</y>
<height>16</height>
<width>28</width>
<width>75</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
......@@ -709,10 +709,10 @@
<tabsequence>32766</tabsequence>
<border>0</border>
<color>33554432</color>
<x>1027</x>
<x>863</x>
<y>1</y>
<height>16</height>
<width>298</width>
<width>169</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
......@@ -745,10 +745,10 @@
<tabsequence>32766</tabsequence>
<border>0</border>
<color>33554432</color>
<x>1327</x>
<x>1034</x>
<y>1</y>
<height>16</height>
<width>118</width>
<width>130</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment