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
bb79655f
Commit
bb79655f
authored
Apr 03, 2026
by
Mohammed Dohadwala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Validation for customer group.
parent
979d6d42
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
118 additions
and
4 deletions
+118
-4
Mohammed/RFQ & RFQ Wiz/ReqForQuotationWiz.java
Mohammed/RFQ & RFQ Wiz/ReqForQuotationWiz.java
+118
-4
No files found.
Mohammed/RFQ & RFQ Wiz/ReqForQuotationWiz.java
View file @
bb79655f
...
@@ -207,6 +207,44 @@ public class ReqForQuotationWiz extends ValidatorEJB{
...
@@ -207,6 +207,44 @@ public class ReqForQuotationWiz extends ValidatorEJB{
}
}
}
}
if
(
childNodeName
.
equalsIgnoreCase
(
"quot_type"
)
)
{
String
customerCode
=
checkNull
(
genericUtility
.
getColumnValue
(
"cust_code"
,
dom
));
String
quotationtype
=
checkNull
(
genericUtility
.
getColumnValue
(
"quot_type"
,
dom
));
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationIC quotationtype wfValData case 1 ["
+
quotationtype
+
"]"
);
if
(
quotationtype
.
equalsIgnoreCase
(
"G"
))
{
String
quotationtypeSql
=
"select count(group_code) as customergroupcount from customer where group_code= ?"
;
PreparedStatement
quotationtypePs
=
connectionObject
.
prepareStatement
(
quotationtypeSql
);
quotationtypePs
.
setString
(
1
,
customerCode
);
ResultSet
quotationtypeRs
=
quotationtypePs
.
executeQuery
();
while
(
quotationtypeRs
.
next
())
{
int
customergroupcount
=
quotationtypeRs
.
getInt
(
"customergroupcount"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationIC group_count wfValData case 1 quotationtypeRs::["
+
customergroupcount
+
"]"
);
if
(
customergroupcount
<=
1
)
{
errCode
=
"INVCG"
;
errList
.
add
(
errCode
);
errFields
.
add
(
childNodeName
.
toLowerCase
());
}
}
if
(
quotationtypeRs
!=
null
)
{
quotationtypeRs
.
close
();
quotationtypeRs
=
null
;
}
if
(
quotationtypePs
!=
null
)
{
quotationtypePs
.
close
();
quotationtypePs
=
null
;
}
}
}
if
(
childNodeName
.
equalsIgnoreCase
(
"site_code"
)
)
if
(
childNodeName
.
equalsIgnoreCase
(
"site_code"
)
)
{
{
String
siteCode
=
checkNull
(
genericUtility
.
getColumnValue
(
"site_code"
,
dom
));
String
siteCode
=
checkNull
(
genericUtility
.
getColumnValue
(
"site_code"
,
dom
));
...
@@ -492,6 +530,37 @@ public class ReqForQuotationWiz extends ValidatorEJB{
...
@@ -492,6 +530,37 @@ public class ReqForQuotationWiz extends ValidatorEJB{
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationWiz in competitor details null errString:: ["
+
errString
+
"]"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationWiz in competitor details null errString:: ["
+
errString
+
"]"
);
}
}
}
String
itemCode
=
checkNull
(
genericUtility
.
getColumnValue
(
"item_code"
,
dom
));
String
phyAttrVal
=
""
;
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationIC in condition itemCode wfValData itemCode::: ["
+
itemCode
+
"]"
);
String
phyAttrValSql
=
"select PHY_ATTRIB_19 from item where item_code = ?"
;
PreparedStatement
phyAttrValPs
=
connectionObject
.
prepareStatement
(
phyAttrValSql
);
phyAttrValPs
.
setString
(
1
,
itemCode
);
ResultSet
phyAttrValRs
=
phyAttrValPs
.
executeQuery
();
while
(
phyAttrValRs
.
next
())
{
phyAttrVal
=
checkNull
(
phyAttrValRs
.
getString
(
"PHY_ATTRIB_19"
));
}
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationIC in condition itemCode wfValData phyAttrVal::: ["
+
phyAttrVal
+
"]"
);
if
(
phyAttrVal
.
equalsIgnoreCase
(
"SRNA"
))
{
errString
=
getErrorString
(
"rate_quot"
,
"INVQR"
,
userId
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationIC in PHY_ATTRIB_19 details null errString:: ["
+
errString
+
"]"
);
break
;
}
if
(
phyAttrValPs
!=
null
)
{
phyAttrValPs
.
close
();
phyAttrValPs
=
null
;
}
if
(
phyAttrValRs
!=
null
)
{
phyAttrValRs
.
close
();
phyAttrValRs
=
null
;
}
}
}
}
//Added changes on 25-March-26 by Ajit [Start]
//Added changes on 25-March-26 by Ajit [Start]
...
@@ -1031,6 +1100,9 @@ public class ReqForQuotationWiz extends ValidatorEJB{
...
@@ -1031,6 +1100,9 @@ public class ReqForQuotationWiz extends ValidatorEJB{
if
(
"itm_default"
.
equalsIgnoreCase
(
currentColumn
.
trim
()))
{
if
(
"itm_default"
.
equalsIgnoreCase
(
currentColumn
.
trim
()))
{
int
domId
=
0
;
int
domId
=
0
;
int
lineNo
=
0
;
int
lineNo
=
0
;
String
setSrPtrAll
=
checkNull
(
genericUtility
.
getColumnValue
(
"set_sr_ptr_all"
,
dom1
,
"1"
));
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationWiz in itm default setSrPtrAll:: "
+
setSrPtrAll
);
String
custCode
=
checkNull
(
genericUtility
.
getColumnValue
(
"cust_code"
,
dom1
));
String
custCode
=
checkNull
(
genericUtility
.
getColumnValue
(
"cust_code"
,
dom1
));
String
itemSer
=
checkNull
(
genericUtility
.
getColumnValue
(
"item_ser"
,
dom1
,
"1"
));
String
itemSer
=
checkNull
(
genericUtility
.
getColumnValue
(
"item_ser"
,
dom1
,
"1"
));
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationWiz in itm default "
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationWiz in itm default "
);
...
@@ -1254,7 +1326,16 @@ public class ReqForQuotationWiz extends ValidatorEJB{
...
@@ -1254,7 +1326,16 @@ public class ReqForQuotationWiz extends ValidatorEJB{
valueXmlString
.
append
(
"<ptd>"
).
append
(
"<![CDATA["
+
ptd
+
"]]>"
).
append
(
"</ptd>\r\n"
);
valueXmlString
.
append
(
"<ptd>"
).
append
(
"<![CDATA["
+
ptd
+
"]]>"
).
append
(
"</ptd>\r\n"
);
valueXmlString
.
append
(
"<pts>"
).
append
(
"<![CDATA["
+
pts
+
"]]>"
).
append
(
"</pts>\r\n"
);
valueXmlString
.
append
(
"<pts>"
).
append
(
"<![CDATA["
+
pts
+
"]]>"
).
append
(
"</pts>\r\n"
);
valueXmlString
.
append
(
"<ptr>"
).
append
(
"<![CDATA["
+
rate
+
"]]>"
).
append
(
"</ptr>\r\n"
);
valueXmlString
.
append
(
"<ptr>"
).
append
(
"<![CDATA["
+
rate
+
"]]>"
).
append
(
"</ptr>\r\n"
);
if
(
setSrPtrAll
.
trim
().
equalsIgnoreCase
(
"Y"
))
{
valueXmlString
.
append
(
"<rate_quot>"
).
append
(
"<![CDATA["
+
rate
+
"]]>"
).
append
(
"</rate_quot>"
);
}
else
{
valueXmlString
.
append
(
"<rate_quot>"
).
append
(
"<![CDATA[]]>"
).
append
(
"</rate_quot>"
);
valueXmlString
.
append
(
"<rate_quot>"
).
append
(
"<![CDATA[]]>"
).
append
(
"</rate_quot>"
);
}
valueXmlString
.
append
(
"<qty_quot>"
).
append
(
"<![CDATA[0]]>"
).
append
(
"</qty_quot>"
);
valueXmlString
.
append
(
"<qty_quot>"
).
append
(
"<![CDATA[0]]>"
).
append
(
"</qty_quot>"
);
valueXmlString
.
append
(
"<competitor_rate>"
).
append
(
"<![CDATA[]]>"
).
append
(
"</competitor_rate>"
);
valueXmlString
.
append
(
"<competitor_rate>"
).
append
(
"<![CDATA[]]>"
).
append
(
"</competitor_rate>"
);
valueXmlString
.
append
(
"<competitor_name>"
).
append
(
"<![CDATA[]]>"
).
append
(
"</competitor_name>"
);
valueXmlString
.
append
(
"<competitor_name>"
).
append
(
"<![CDATA[]]>"
).
append
(
"</competitor_name>"
);
...
@@ -1313,6 +1394,28 @@ public class ReqForQuotationWiz extends ValidatorEJB{
...
@@ -1313,6 +1394,28 @@ public class ReqForQuotationWiz extends ValidatorEJB{
String
itemCode
=
checkNull
(
genericUtility
.
getColumnValue
(
"item_code"
,
dom
));
String
itemCode
=
checkNull
(
genericUtility
.
getColumnValue
(
"item_code"
,
dom
));
String
rateApprv
=
checkNull
(
genericUtility
.
getColumnValue
(
"rate_apprv"
,
dom
));
String
rateApprv
=
checkNull
(
genericUtility
.
getColumnValue
(
"rate_apprv"
,
dom
));
String
ratePtr
=
checkNull
(
genericUtility
.
getColumnValue
(
"ptr"
,
dom
));
String
ratePtr
=
checkNull
(
genericUtility
.
getColumnValue
(
"ptr"
,
dom
));
String
rateQuotStr
=
checkNull
(
genericUtility
.
getColumnValue
(
"rate_quot"
,
dom
));
String
qtyStr
=
checkNull
(
genericUtility
.
getColumnValue
(
"qty_quot"
,
dom
));
int
qty
=
0
;
int
rateQuotInt
=
0
;
int
value
=
0
;
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationWiz in qty_quot condition qtyStr:: "
+
qtyStr
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationWiz in qty_quot condition rateQuotStr:: "
+
rateQuotStr
);
try
{
qty
=
(
qtyStr
!=
null
&&
qtyStr
.
trim
().
length
()
>
0
)
?
Integer
.
parseInt
(
qtyStr
.
trim
())
:
0
;
rateQuotInt
=
(
rateQuotStr
!=
null
&&
rateQuotStr
.
trim
().
length
()
>
0
)
?
Integer
.
parseInt
(
rateQuotStr
.
trim
())
:
0
;
value
=
qty
*
rateQuotInt
;
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationWiz in qty:: "
+
qty
+
" rateQuotInt::"
+
rateQuotInt
+
" value::"
+
value
);
}
catch
(
Exception
e
)
{
BaseLogger
.
log
(
"3"
,
null
,
null
,
"Error parsing margin values"
);
}
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationIC in rate_quot:: "
+
rateQuot
+
" rateApprv::"
+
rateApprv
+
" ratePtr::"
+
ratePtr
+
" itemCode::"
+
itemCode
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationWiz in rate_quot:: "
+
rateQuot
+
" rateApprv::"
+
rateApprv
+
" ratePtr::"
+
ratePtr
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationWiz in rate_quot:: "
+
rateQuot
+
" rateApprv::"
+
rateApprv
+
" ratePtr::"
+
ratePtr
);
...
@@ -1403,9 +1506,20 @@ public class ReqForQuotationWiz extends ValidatorEJB{
...
@@ -1403,9 +1506,20 @@ public class ReqForQuotationWiz extends ValidatorEJB{
BaseLogger
.
log
(
"3"
,
null
,
null
,
"revisedPtr::"
+
revisedPtr
+
" revisedPts::"
+
revisedPts
+
" revisedPtd::"
+
revisedPtd
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"revisedPtr::"
+
revisedPtr
+
" revisedPts::"
+
revisedPts
+
" revisedPtd::"
+
revisedPtd
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"revisedPtr::"
+
revisedPtr
+
" revisedPts::"
+
revisedPts
+
" revisedPtd:: "
+
revisedPtd
+
"]"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"revisedPtr::"
+
revisedPtr
+
" revisedPts::"
+
revisedPts
+
" revisedPtd:: "
+
revisedPtd
+
"]"
);
valueXmlString
.
append
(
"<revised_ptr>"
).
append
(
"<![CDATA["
+
revisedPtr
+
"]]>"
).
append
(
"</revised_ptr>\r\n"
);
String
domId
=
checkNull
(
genericUtility
.
getColumnValue
(
"domid"
,
dom
));
valueXmlString
.
append
(
"<revised_pts>"
).
append
(
"<![CDATA["
+
revisedPts
+
"]]>"
).
append
(
"</revised_pts>\r\n"
);
valueXmlString
.
append
(
"<revised_ptd>"
).
append
(
"<![CDATA["
+
revisedPtd
+
"]]>"
).
append
(
"</revised_ptd>\r\n"
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"domId::>>"
+
domId
);
valueXmlString
.
append
(
"<Detail"
+
objContext
+
" domID='"
+
domId
+
"' objContext='"
+
currentFormNo
+
"' objName=\"rfq_wiz\" selected=\"N\">\r\n"
);
valueXmlString
.
append
(
"<attribute selected=\"N\" updateFlag=\"A\" status=\"N\" pkNames=\"tran_id:line_no\"/>\r\n"
);
valueXmlString
.
append
(
"<revised_ptr><![CDATA["
+
revisedPtr
+
"]]></revised_ptr>\r\n"
);
valueXmlString
.
append
(
"<revised_pts><![CDATA["
+
revisedPts
+
"]]></revised_pts>\r\n"
);
valueXmlString
.
append
(
"<revised_ptd><![CDATA["
+
revisedPtd
+
"]]></revised_ptd>\r\n"
);
valueXmlString
.
append
(
"<value><![CDATA["
+
value
+
"]]></value>\r\n"
);
valueXmlString
.
append
(
"</Detail"
+
objContext
+
">"
);
}
}
...
...
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