Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
Component Sharing
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gagandeep Singh Bhatia
Component Sharing
Commits
486b5795
Commit
486b5795
authored
Apr 20, 2026
by
SABURI PATEKAR
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In case of Quotation Team, not updating revised ptr, pts, ptd and margin.
parent
768aecd4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
170 additions
and
106 deletions
+170
-106
Saburi/20-03-16#RFQ AND RFQ WIZ/java/ReqForQuotationAprv.java
...ri/20-03-16#RFQ AND RFQ WIZ/java/ReqForQuotationAprv.java
+170
-106
No files found.
Saburi/20-03-16#RFQ AND RFQ WIZ/java/ReqForQuotationAprv.java
View file @
486b5795
...
@@ -25,14 +25,12 @@ import org.xml.sax.InputSource;
...
@@ -25,14 +25,12 @@ import org.xml.sax.InputSource;
import
ibase.ejb.CommonDBAccessEJB
;
import
ibase.ejb.CommonDBAccessEJB
;
import
ibase.system.config.AppConnectParm
;
import
ibase.system.config.AppConnectParm
;
import
ibase.system.config.ConnDriver
;
import
ibase.utility.BaseLogger
;
import
ibase.utility.BaseLogger
;
import
ibase.utility.E12GenericUtility
;
import
ibase.utility.E12GenericUtility
;
import
ibase.utility.UserInfoBean
;
import
ibase.utility.UserInfoBean
;
import
ibase.webitm.ejb.MasterStatefulLocal
;
import
ibase.webitm.ejb.MasterStatefulLocal
;
import
ibase.webitm.ejb.ValidatorEJB
;
import
ibase.webitm.ejb.ValidatorEJB
;
import
ibase.webitm.ejb.XML2DBEJB
;
import
ibase.webitm.ejb.XML2DBEJB
;
import
ibase.webitm.utility.GenericWorkflowClass
;
import
ibase.webitm.utility.ITMException
;
import
ibase.webitm.utility.ITMException
;
public
class
ReqForQuotationAprv
extends
ValidatorEJB
{
public
class
ReqForQuotationAprv
extends
ValidatorEJB
{
...
@@ -112,7 +110,8 @@ public class ReqForQuotationAprv extends ValidatorEJB {
...
@@ -112,7 +110,8 @@ public class ReqForQuotationAprv extends ValidatorEJB {
XML2DBEJB
xml2dbObj
=
new
XML2DBEJB
();
XML2DBEJB
xml2dbObj
=
new
XML2DBEJB
();
Boolean
tranFlag
=
false
;
Boolean
tranFlag
=
false
;
String
processRequestResult
=
""
;
String
processRequestResult
=
""
;
String
updatedDistMargin
=
""
,
updatedStkMargin
=
""
,
updatedRetMargin
=
""
;
double
updatedDistMargin
=
0
,
updatedRetMargin
=
0
;
double
updatedStkMargin
=
0
;
String
revisedPTR
=
""
,
revisedPTD
=
""
,
revisedPTS
=
""
;
String
revisedPTR
=
""
,
revisedPTD
=
""
,
revisedPTS
=
""
;
try
{
try
{
...
@@ -142,13 +141,23 @@ public class ReqForQuotationAprv extends ValidatorEJB {
...
@@ -142,13 +141,23 @@ public class ReqForQuotationAprv extends ValidatorEJB {
BaseLogger
.
log
(
"3"
,
null
,
null
,
"objName["
+
objName
+
"]"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"objName["
+
objName
+
"]"
);
//Added by Saburi - 11/04/2026
//Added by Saburi - 11/04/2026
if
(
roleCodeSign
.
equalsIgnoreCase
(
"VHB_QUOT"
))
BaseLogger
.
log
(
"3"
,
null
,
null
,
"FINAL VHB_MNGMNT signStatus ["
+
signStatus
+
"]"
);
if
(
"R"
.
equalsIgnoreCase
(
signStatus
))
{
{
String
updateWfStatusSql
=
"update SALES_QUOT_REQ set WF_STATUS = 'A' where tran_id = ?"
;
BaseLogger
.
log
(
"3"
,
null
,
null
,
"Reject Case → forcing margins to 0"
);
updateWfStatusPstmt
=
conn
.
prepareStatement
(
updateWfStatusSql
);
updateWfStatusPstmt
.
setString
(
1
,
tranID
);
updatedDistMargin
=
0.0
;
int
updateWfStatusCount
=
updateWfStatusPstmt
.
executeUpdate
();
updatedStkMargin
=
0.0
;
System
.
out
.
println
(
"updateWfStatusCount::::::0 =["
+
updateWfStatusCount
+
"]"
);
updatedRetMargin
=
0.0
;
}
if
(
roleCodeSign
.
equalsIgnoreCase
(
"VHB_QUOT"
)
&&
signStatus
.
equalsIgnoreCase
(
"S"
))
{
//Commented by Ajit: Fixed the issue where my special rate was lower than the management rate during quotation approval by the team.
// String updateWfStatusSql = "update SALES_QUOT_REQ set WF_STATUS = 'A' where tran_id = ?";
// updateWfStatusPstmt = conn.prepareStatement(updateWfStatusSql);
// updateWfStatusPstmt.setString(1, tranID);
// int updateWfStatusCount = updateWfStatusPstmt.executeUpdate();
// System.out.println("updateWfStatusCount::::::0 =[" + updateWfStatusCount + "]");
// Added by Gagan B. on 31-MAR-26: for fetching updated Special Rate from OST -- START
// Added by Gagan B. on 31-MAR-26: for fetching updated Special Rate from OST -- START
Document
detailDom
=
null
;
Document
detailDom
=
null
;
...
@@ -170,21 +179,27 @@ public class ReqForQuotationAprv extends ValidatorEJB {
...
@@ -170,21 +179,27 @@ public class ReqForQuotationAprv extends ValidatorEJB {
detailDom
=
genericUtility
.
parseString
(
transInfoXML
);
detailDom
=
genericUtility
.
parseString
(
transInfoXML
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"detailDom 165["
+
detailDom
+
"]"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"detailDom 165["
+
detailDom
+
"]"
);
}
}
itemCode
=
genericUtility
.
getColumnValue
(
"item_code"
,
detailDom
);
updatedDistMargin
=
genericUtility
.
getColumnValue
(
"phy_attrib_13"
,
detailDom
);
updatedStkMargin
=
genericUtility
.
getColumnValue
(
"phy_attrib_14"
,
detailDom
);
updatedRetMargin
=
genericUtility
.
getColumnValue
(
"phy_attrib_15"
,
detailDom
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"updatedDistMargin ["
+
updatedDistMargin
+
"]"
);
itemCode
=
genericUtility
.
getColumnValue
(
"item_code"
,
detailDom
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"updatedStkMargin ["
+
updatedStkMargin
+
"]"
);
updatedDistMargin
=
parseDoubleSafe
(
genericUtility
.
getColumnValue
(
"phy_attrib_13"
,
detailDom
));
BaseLogger
.
log
(
"3"
,
null
,
null
,
"updatedRetMargin ["
+
updatedRetMargin
+
"]"
);
updatedStkMargin
=
parseDoubleSafe
(
genericUtility
.
getColumnValue
(
"phy_attrib_14"
,
detailDom
));
updatedRetMargin
=
parseDoubleSafe
(
genericUtility
.
getColumnValue
(
"phy_attrib_15"
,
detailDom
));
String
specialRateStr
=
genericUtility
.
getColumnValue
(
"rate_quot"
,
detailDom
);
String
specialRateStr
=
genericUtility
.
getColumnValue
(
"rate_quot"
,
detailDom
);
if
(
specialRateStr
==
null
||
specialRateStr
.
trim
().
isEmpty
())
{
throw
new
Exception
(
"Special Rate values are not defined for item: "
+
itemCode
);
}
double
specialRate
=
Double
.
parseDouble
(
specialRateStr
);
double
specialRate
=
Double
.
parseDouble
(
specialRateStr
);
double
revisedDist
=
Double
.
parseDouble
(
updatedDistMargin
);
if
(
updatedDistMargin
==
0
||
updatedStkMargin
==
0
||
updatedRetMargin
==
0
)
double
revisedStock
=
Double
.
parseDouble
(
updatedStkMargin
);
{
double
revisedRet
=
Double
.
parseDouble
(
updatedRetMargin
);
throw
new
Exception
(
"Margin values are not defined for item: "
+
itemCode
);
}
double
revisedDist
=
updatedDistMargin
;
double
revisedStock
=
updatedStkMargin
;
double
revisedRet
=
updatedRetMargin
;
double
calcPTS
=
(
specialRate
/
100
)
*
(
100
-
revisedStock
);
double
calcPTS
=
(
specialRate
/
100
)
*
(
100
-
revisedStock
);
double
calcPTD
=
(
specialRate
/
100
)
*
(
100
-
revisedDist
);
double
calcPTD
=
(
specialRate
/
100
)
*
(
100
-
revisedDist
);
...
@@ -194,30 +209,30 @@ public class ReqForQuotationAprv extends ValidatorEJB {
...
@@ -194,30 +209,30 @@ public class ReqForQuotationAprv extends ValidatorEJB {
revisedPTD
=
String
.
format
(
"%.2f"
,
calcPTD
);
revisedPTD
=
String
.
format
(
"%.2f"
,
calcPTD
);
revisedPTR
=
String
.
format
(
"%.2f"
,
calcPTR
);
revisedPTR
=
String
.
format
(
"%.2f"
,
calcPTR
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"
FINAL revisedPTR ["
+
revisedPTR
+
"]"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationApr
FINAL revisedPTR ["
+
revisedPTR
+
"]"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"
FINAL revisedPTS ["
+
revisedPTS
+
"]"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationApr
FINAL revisedPTS ["
+
revisedPTS
+
"]"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"
FINAL revisedPTD ["
+
revisedPTD
+
"]"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationApr
FINAL revisedPTD ["
+
revisedPTD
+
"]"
);
String
updateRevisedValue
=
"UPDATE SALES_QUOT_REQ_DET SET REVISED_PTS=?, REVISED_PTR=?, REVISED_PTD=? WHERE ITEM_CODE
=?"
;
// String updateRevisedValue = "UPDATE SALES_QUOT_REQ_DET SET REVISED_PTS=?, REVISED_PTR=?, REVISED_PTD=? WHERE ITEM_CODE=? AND TRAN_ID
=?";
PreparedStatement
updatePstmt
=
conn
.
prepareStatement
(
updateRevisedValue
);
//
PreparedStatement updatePstmt = conn.prepareStatement(updateRevisedValue);
updatePstmt
.
setString
(
1
,
checkNull
(
revisedPTS
));
// updatePstmt.setString(1, checkNull(revisedPTS));
updatePstmt
.
setString
(
2
,
checkNull
(
revisedPTR
));
// updatePstmt.setString(2, checkNull(revisedPTR));
updatePstmt
.
setString
(
3
,
checkNull
(
revisedPTD
));
// updatePstmt.setString(3, checkNull(revisedPTD));
updatePstmt
.
setString
(
4
,
itemCode
);
// updatePstmt.setString(4, itemCode);
// updatePstmt.setString(5, tranID);
int
updateCnt
=
updatePstmt
.
executeUpdate
();
//
int updateCnt = updatePstmt.executeUpdate();
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ITEM updated for updateRevisedValue 211["
+
itemCode
+
"] Count: "
+
updateCnt
);
//
BaseLogger.log("3", null, null, "ITEM updated for updateRevisedValue 211[" + itemCode + "] Count: " + updateCnt);
if
(
updatePstmt
!=
null
)
// if (updatePstmt != null)
{
// {
updatePstmt
.
close
();
// updatePstmt.close();
updatePstmt
=
null
;
// updatePstmt = null;
// }
}
}
}
}
}
if
(
roleCodeSign
.
equalsIgnoreCase
(
"VHB_MNGMNT"
)
&&
signStatus
.
equalsIgnoreCase
(
"S"
))
if
(
roleCodeSign
.
equalsIgnoreCase
(
"VHB_MNGMNT"
)
&&
signStatus
.
equalsIgnoreCase
(
"S"
))
{
{
String
updateWfStatusSql
=
"update SALES_QUOT_REQ set WF_STATUS = 'A' where tran_id = ?"
;
String
updateWfStatusSql
=
"update SALES_QUOT_REQ set WF_STATUS = 'A' where tran_id = ?"
;
...
@@ -230,6 +245,7 @@ public class ReqForQuotationAprv extends ValidatorEJB {
...
@@ -230,6 +245,7 @@ public class ReqForQuotationAprv extends ValidatorEJB {
Document
detailDom
=
null
;
Document
detailDom
=
null
;
PreparedStatement
updatedRateFetchPSTMT
=
null
;
PreparedStatement
updatedRateFetchPSTMT
=
null
;
ResultSet
updatedRateFetchRS
=
null
;
ResultSet
updatedRateFetchRS
=
null
;
String
updatedRateFetchSQL
=
"SELECT OST.TRANS_INFO_XML.getClobval() FROM OBJ_SIGN_TRANS OST where REF_ID = ? AND REF_SER = ? AND LINE_NO = '2'"
;
String
updatedRateFetchSQL
=
"SELECT OST.TRANS_INFO_XML.getClobval() FROM OBJ_SIGN_TRANS OST where REF_ID = ? AND REF_SER = ? AND LINE_NO = '2'"
;
updatedRateFetchPSTMT
=
conn
.
prepareStatement
(
updatedRateFetchSQL
);
updatedRateFetchPSTMT
=
conn
.
prepareStatement
(
updatedRateFetchSQL
);
updatedRateFetchPSTMT
.
setString
(
1
,
tranID
);
updatedRateFetchPSTMT
.
setString
(
1
,
tranID
);
...
@@ -238,7 +254,7 @@ public class ReqForQuotationAprv extends ValidatorEJB {
...
@@ -238,7 +254,7 @@ public class ReqForQuotationAprv extends ValidatorEJB {
if
(
updatedRateFetchRS
.
next
())
if
(
updatedRateFetchRS
.
next
())
{
{
String
transInfoXML
=
updatedRateFetchRS
.
getString
(
1
)==
null
?
""
:
updatedRateFetchRS
.
getString
(
1
);
String
transInfoXML
=
updatedRateFetchRS
.
getString
(
1
)
==
null
?
""
:
updatedRateFetchRS
.
getString
(
1
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"transInfoXML["
+
transInfoXML
+
"]"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"transInfoXML["
+
transInfoXML
+
"]"
);
if
(
transInfoXML
!=
null
&&
transInfoXML
.
trim
().
length
()
>
0
)
if
(
transInfoXML
!=
null
&&
transInfoXML
.
trim
().
length
()
>
0
)
...
@@ -251,20 +267,29 @@ public class ReqForQuotationAprv extends ValidatorEJB {
...
@@ -251,20 +267,29 @@ public class ReqForQuotationAprv extends ValidatorEJB {
BaseLogger
.
log
(
"3"
,
null
,
null
,
"uppdatedRate VHB_MNGMNT["
+
updatedRate
+
"]"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"uppdatedRate VHB_MNGMNT["
+
updatedRate
+
"]"
);
//Added by Saburi-11/04/2026
//Added by Saburi-11/04/2026
itemCode
=
genericUtility
.
getColumnValue
(
"item_code"
,
detailDom
);
itemCode
=
genericUtility
.
getColumnValue
(
"item_code"
,
detailDom
);
updatedDistMargin
=
genericUtility
.
getColumnValue
(
"phy_attrib_13"
,
detailDom
);
updatedDistMargin
=
parseDoubleSafe
(
genericUtility
.
getColumnValue
(
"phy_attrib_13"
,
detailDom
)
);
updatedStkMargin
=
genericUtility
.
getColumnValue
(
"phy_attrib_14"
,
detailDom
);
updatedStkMargin
=
parseDoubleSafe
(
genericUtility
.
getColumnValue
(
"phy_attrib_14"
,
detailDom
)
);
updatedRetMargin
=
genericUtility
.
getColumnValue
(
"phy_attrib_15"
,
detailDom
);
updatedRetMargin
=
parseDoubleSafe
(
genericUtility
.
getColumnValue
(
"phy_attrib_15"
,
detailDom
)
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"VHB_MNGMNT updatedDistMargin ["
+
updatedDistMargin
+
"]"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"VHB_MNGMNT updatedDistMargin ["
+
updatedDistMargin
+
"]"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"VHB_MNGMNT updatedStkMargin ["
+
updatedStkMargin
+
"]"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"VHB_MNGMNT updatedStkMargin ["
+
updatedStkMargin
+
"]"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"VHB_MNGMNT updatedRetMargin ["
+
updatedRetMargin
+
"]"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"VHB_MNGMNT updatedRetMargin ["
+
updatedRetMargin
+
"]"
);
String
specialRateStr
=
genericUtility
.
getColumnValue
(
"rate_quot"
,
detailDom
);
String
specialRateStr
=
genericUtility
.
getColumnValue
(
"rate_quot"
,
detailDom
);
if
(
specialRateStr
==
null
||
specialRateStr
.
trim
().
isEmpty
())
{
throw
new
Exception
(
"Special Rate values are not defined for item: "
+
itemCode
);
}
double
specialRate
=
Double
.
parseDouble
(
specialRateStr
);
double
specialRate
=
Double
.
parseDouble
(
specialRateStr
);
double
revisedDist
=
Double
.
parseDouble
(
updatedDistMargin
);
if
(
updatedDistMargin
==
0
||
updatedStkMargin
==
0
||
updatedRetMargin
==
0
)
double
revisedStock
=
Double
.
parseDouble
(
updatedStkMargin
);
{
double
revisedRet
=
Double
.
parseDouble
(
updatedRetMargin
);
throw
new
Exception
(
"Margin values are not defined for item: "
+
itemCode
);
}
double
revisedDist
=
updatedDistMargin
;
double
revisedStock
=
updatedStkMargin
;
double
revisedRet
=
updatedRetMargin
;
double
calcPTS
=
(
specialRate
/
100
)
*
(
100
-
revisedStock
);
double
calcPTS
=
(
specialRate
/
100
)
*
(
100
-
revisedStock
);
double
calcPTD
=
(
specialRate
/
100
)
*
(
100
-
revisedDist
);
double
calcPTD
=
(
specialRate
/
100
)
*
(
100
-
revisedDist
);
...
@@ -278,16 +303,16 @@ public class ReqForQuotationAprv extends ValidatorEJB {
...
@@ -278,16 +303,16 @@ public class ReqForQuotationAprv extends ValidatorEJB {
BaseLogger
.
log
(
"3"
,
null
,
null
,
"FINAL VHB_MNGMNT revisedPTS ["
+
revisedPTS
+
"]"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"FINAL VHB_MNGMNT revisedPTS ["
+
revisedPTS
+
"]"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"FINAL VHB_MNGMNT revisedPTD ["
+
revisedPTD
+
"]"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"FINAL VHB_MNGMNT revisedPTD ["
+
revisedPTD
+
"]"
);
String
updateRevisedValue
=
"UPDATE SALES_QUOT_REQ_DET SET REVISED_PTS=?, REVISED_PTR=?, REVISED_PTD=? WHERE ITEM_CODE
=?"
;
String
updateRevisedValue
=
"UPDATE SALES_QUOT_REQ_DET SET REVISED_PTS=?, REVISED_PTR=?, REVISED_PTD=? WHERE ITEM_CODE=? AND TRAN_ID
=?"
;
PreparedStatement
updatePstmt
=
conn
.
prepareStatement
(
updateRevisedValue
);
PreparedStatement
updatePstmt
=
conn
.
prepareStatement
(
updateRevisedValue
);
updatePstmt
.
setString
(
1
,
checkNull
(
revisedPTS
));
updatePstmt
.
setString
(
1
,
checkNull
(
revisedPTS
));
updatePstmt
.
setString
(
2
,
checkNull
(
revisedPTR
));
updatePstmt
.
setString
(
2
,
checkNull
(
revisedPTR
));
updatePstmt
.
setString
(
3
,
checkNull
(
revisedPTD
));
updatePstmt
.
setString
(
3
,
checkNull
(
revisedPTD
));
updatePstmt
.
setString
(
4
,
itemCode
);
updatePstmt
.
setString
(
4
,
itemCode
);
updatePstmt
.
setString
(
5
,
tranID
);
int
updateCnt
=
updatePstmt
.
executeUpdate
();
int
updateCnt
=
updatePstmt
.
executeUpdate
();
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ITEM updated for VHB_MNGMNT updateRevisedValue ["
+
itemCode
+
"] Count: "
+
updateCnt
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ITEM updated for VHB_MNGMNT updateRevisedValue ["
+
itemCode
+
"] Count: "
+
updateCnt
);
if
(
updatePstmt
!=
null
)
if
(
updatePstmt
!=
null
)
...
@@ -299,13 +324,12 @@ public class ReqForQuotationAprv extends ValidatorEJB {
...
@@ -299,13 +324,12 @@ public class ReqForQuotationAprv extends ValidatorEJB {
String
updateItemSql
=
"UPDATE ITEM SET PHY_ATTRIB_13 = ?, PHY_ATTRIB_14 = ?, PHY_ATTRIB_15 = ? WHERE ITEM_CODE = ?"
;
String
updateItemSql
=
"UPDATE ITEM SET PHY_ATTRIB_13 = ?, PHY_ATTRIB_14 = ?, PHY_ATTRIB_15 = ? WHERE ITEM_CODE = ?"
;
PreparedStatement
updateItemPstmt
=
conn
.
prepareStatement
(
updateItemSql
);
PreparedStatement
updateItemPstmt
=
conn
.
prepareStatement
(
updateItemSql
);
updateItemPstmt
.
setString
(
1
,
checkNull
(
updatedDistMargin
));
// PHY_ATTRIB_13
updateItemPstmt
.
setString
(
1
,
String
.
valueOf
(
updatedDistMargin
));
updateItemPstmt
.
setString
(
2
,
checkNull
(
updatedStkMargin
));
// PHY_ATTRIB_14
updateItemPstmt
.
setString
(
2
,
String
.
valueOf
(
updatedStkMargin
));
updateItemPstmt
.
setString
(
3
,
checkNull
(
updatedRetMargin
));
// PHY_ATTRIB_15
updateItemPstmt
.
setString
(
3
,
String
.
valueOf
(
updatedRetMargin
));
updateItemPstmt
.
setString
(
4
,
itemCode
);
updateItemPstmt
.
setString
(
4
,
itemCode
);
int
updateCount
=
updateItemPstmt
.
executeUpdate
();
int
updateCount
=
updateItemPstmt
.
executeUpdate
();
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ITEM updated for itemCode VHB_MNGMNT["
+
itemCode
+
"] Count: "
+
updateCount
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ITEM updated for itemCode VHB_MNGMNT["
+
itemCode
+
"] Count: "
+
updateCount
);
if
(
updateItemPstmt
!=
null
)
if
(
updateItemPstmt
!=
null
)
...
@@ -315,7 +339,6 @@ public class ReqForQuotationAprv extends ValidatorEJB {
...
@@ -315,7 +339,6 @@ public class ReqForQuotationAprv extends ValidatorEJB {
}
}
}
}
}
}
System
.
out
.
println
(
"enterprises::::: =["
+
enterprises1
+
"]"
+
" tran_id::"
+
tranID
);
System
.
out
.
println
(
"enterprises::::: =["
+
enterprises1
+
"]"
+
" tran_id::"
+
tranID
);
userInfo
=
commonDBAccessEJB
.
createUserInfo
(
empCode
);
userInfo
=
commonDBAccessEJB
.
createUserInfo
(
empCode
);
System
.
out
.
println
(
"signStatus::"
+
signStatus
+
" enterprises::::: =["
+
enterprises1
+
"]"
System
.
out
.
println
(
"signStatus::"
+
signStatus
+
" enterprises::::: =["
+
enterprises1
+
"]"
...
@@ -487,10 +510,16 @@ public class ReqForQuotationAprv extends ValidatorEJB {
...
@@ -487,10 +510,16 @@ public class ReqForQuotationAprv extends ValidatorEJB {
}
}
if
(
roleCodeSign
.
equalsIgnoreCase
(
"VHB_MNGMNT"
))
{
if
(
roleCodeSign
.
equalsIgnoreCase
(
"VHB_MNGMNT"
)
||
roleCodeSign
.
equalsIgnoreCase
(
"VHB_QUOT"
))
{
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ITEM updated for updatedRate VHB_MNGMNT["
+
updatedRate
+
"]"
);
if
(
updatedRate
.
trim
().
length
()
>
0
)
{
BaseLogger
.
log
(
"3"
,
null
,
null
,
"Inside the updatedRate VHB_MNGMNT["
+
updatedRate
+
"]"
);
double
rateDouble
=
Double
.
parseDouble
(
updatedRate
);
double
rateDouble
=
Double
.
parseDouble
(
updatedRate
);
rate
=
(
int
)
rateDouble
;
rate
=
(
int
)
rateDouble
;
}
}
}
BigDecimal
rateBD
=
new
BigDecimal
(
rate
);
BigDecimal
rateBD
=
new
BigDecimal
(
rate
);
...
@@ -706,9 +735,9 @@ public class ReqForQuotationAprv extends ValidatorEJB {
...
@@ -706,9 +735,9 @@ public class ReqForQuotationAprv extends ValidatorEJB {
String
updateItemSql
=
"UPDATE ITEM SET PHY_ATTRIB_13 = ?, PHY_ATTRIB_14 = ?, PHY_ATTRIB_15 = ? WHERE ITEM_CODE = ?"
;
String
updateItemSql
=
"UPDATE ITEM SET PHY_ATTRIB_13 = ?, PHY_ATTRIB_14 = ?, PHY_ATTRIB_15 = ? WHERE ITEM_CODE = ?"
;
PreparedStatement
updateItemPstmt
=
conn
.
prepareStatement
(
updateItemSql
);
PreparedStatement
updateItemPstmt
=
conn
.
prepareStatement
(
updateItemSql
);
updateItemPstmt
.
setString
(
1
,
checkNull
(
updatedDistMargin
));
// PHY_ATTRIB_13
updateItemPstmt
.
setString
(
1
,
String
.
valueOf
(
updatedDistMargin
));
updateItemPstmt
.
setString
(
2
,
checkNull
(
updatedStkMargin
));
// PHY_ATTRIB_14
updateItemPstmt
.
setString
(
2
,
String
.
valueOf
(
updatedStkMargin
));
updateItemPstmt
.
setString
(
3
,
checkNull
(
updatedRetMargin
));
// PHY_ATTRIB_15
updateItemPstmt
.
setString
(
3
,
String
.
valueOf
(
updatedRetMargin
));
updateItemPstmt
.
setString
(
4
,
itemCode
);
updateItemPstmt
.
setString
(
4
,
itemCode
);
int
updateCount
=
updateItemPstmt
.
executeUpdate
();
int
updateCount
=
updateItemPstmt
.
executeUpdate
();
...
@@ -720,6 +749,25 @@ public class ReqForQuotationAprv extends ValidatorEJB {
...
@@ -720,6 +749,25 @@ public class ReqForQuotationAprv extends ValidatorEJB {
updateItemPstmt
.
close
();
updateItemPstmt
.
close
();
updateItemPstmt
=
null
;
updateItemPstmt
=
null
;
}
}
// Added by Saburi - 20Apr2026
String
updateRevisedValue
=
"UPDATE SALES_QUOT_REQ_DET SET REVISED_PTS=?, REVISED_PTR=?, REVISED_PTD=? WHERE ITEM_CODE=? AND TRAN_ID=?"
;
PreparedStatement
updatePstmt
=
conn
.
prepareStatement
(
updateRevisedValue
);
updatePstmt
.
setString
(
1
,
checkNull
(
revisedPTS
));
updatePstmt
.
setString
(
2
,
checkNull
(
revisedPTR
));
updatePstmt
.
setString
(
3
,
checkNull
(
revisedPTD
));
updatePstmt
.
setString
(
4
,
itemCode
);
updatePstmt
.
setString
(
5
,
tranID
);
int
updateCnt
=
updatePstmt
.
executeUpdate
();
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ITEM updated for updateRevisedValue 765>>>>>["
+
itemCode
+
"] Count: "
+
updateCnt
);
if
(
updatePstmt
!=
null
)
{
updatePstmt
.
close
();
updatePstmt
=
null
;
}
}
}
}
else
{
}
else
{
BaseLogger
.
log
(
"3"
,
null
,
null
,
"Sales Quotation Generation Failed: "
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"Sales Quotation Generation Failed: "
);
...
@@ -757,6 +805,22 @@ public class ReqForQuotationAprv extends ValidatorEJB {
...
@@ -757,6 +805,22 @@ public class ReqForQuotationAprv extends ValidatorEJB {
}
}
private
double
parseDoubleSafe
(
String
value
)
{
try
{
if
(
value
!=
null
&&
value
.
trim
().
length
()
>
0
)
{
return
Double
.
parseDouble
(
value
.
trim
());
}
}
catch
(
Exception
e
)
{
BaseLogger
.
log
(
"3"
,
null
,
null
,
"Invalid number: "
+
value
);
}
return
0.0
;
}
public
static
String
formatDateTime
(
LocalDate
tranDate
,
LocalTime
tranTime
)
{
public
static
String
formatDateTime
(
LocalDate
tranDate
,
LocalTime
tranTime
)
{
LocalDateTime
tranDateTime
=
LocalDateTime
.
of
(
tranDate
,
tranTime
);
LocalDateTime
tranDateTime
=
LocalDateTime
.
of
(
tranDate
,
tranTime
);
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment