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
020295ed
Commit
020295ed
authored
Apr 03, 2026
by
Mohammed Dohadwala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added item code logic. auto populates unit and pack code.
parent
d40c7c2a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
17 deletions
+43
-17
Mohammed/RFQ & RFQ Wiz/ReqForQuotationIC.java
Mohammed/RFQ & RFQ Wiz/ReqForQuotationIC.java
+43
-17
No files found.
Mohammed/RFQ & RFQ Wiz/ReqForQuotationIC.java
View file @
020295ed
...
...
@@ -1088,17 +1088,23 @@ public class ReqForQuotationIC extends ValidatorEJB {
}
if
(
"item_code"
.
equalsIgnoreCase
(
currentColumn
.
trim
()))
{
String
itemDescr
=
""
;
String
unit
=
""
;
String
packCode
=
""
;
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationIC in item_code "
);
String
itemCode
=
checkNull
(
genericUtility
.
getColumnValue
(
"item_code"
,
dom
));
String
itemDescrSql
=
"select descr
from item where item_code = ?"
;
String
itemDescrSql
=
"select descr,unit,pack_code
from item where item_code = ?"
;
PreparedStatement
itemDescrPs
=
con
.
prepareStatement
(
itemDescrSql
);
itemDescrPs
.
setString
(
1
,
itemCode
);
ResultSet
itemDescrRs
=
itemDescrPs
.
executeQuery
();
while
(
itemDescrRs
.
next
())
{
itemDescr
=
itemDescrRs
.
getString
(
"descr"
);
itemDescr
=
checkNull
(
itemDescrRs
.
getString
(
"descr"
));
unit
=
checkNull
(
itemDescrRs
.
getString
(
"unit"
));
packCode
=
checkNull
(
itemDescrRs
.
getString
(
"pack_code"
));
}
valueXmlString
.
append
(
"<descr>"
).
append
(
"<![CDATA["
+
itemDescr
+
"]]>"
).
append
(
"</descr>\r\n"
);
valueXmlString
.
append
(
"<descr>"
).
append
(
"<![CDATA["
+
itemDescr
+
"]]>"
).
append
(
"</descr>\r\n"
);
valueXmlString
.
append
(
"<unit protect='1'>"
).
append
(
"<![CDATA["
+
unit
+
"]]>"
).
append
(
"</unit>\r\n"
);
valueXmlString
.
append
(
"<pack_code protect='1'>"
).
append
(
"<![CDATA["
+
packCode
+
"]]>"
).
append
(
"</pack_code>\r\n"
);
}
if
(
"ptr_flag"
.
equalsIgnoreCase
(
currentColumn
.
trim
()))
{
...
...
@@ -1127,6 +1133,27 @@ public class ReqForQuotationIC extends ValidatorEJB {
String
itemCode
=
checkNull
(
genericUtility
.
getColumnValue
(
"item_code"
,
dom
));
String
rateApprv
=
checkNull
(
genericUtility
.
getColumnValue
(
"rate_apprv"
,
dom
));
String
ratePtr
=
checkNull
(
genericUtility
.
getColumnValue
(
"ptr"
,
dom
));
String
qtyStr
=
checkNull
(
genericUtility
.
getColumnValue
(
"qty_quot"
,
dom
));
String
rateQuotStr
=
checkNull
(
genericUtility
.
getColumnValue
(
"rate_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
,
"ReqForQuotationIC in rate_quot:: "
+
rateQuot
+
" rateApprv::"
+
rateApprv
+
" ratePtr::"
+
ratePtr
+
" itemCode::"
+
itemCode
);
...
...
@@ -1136,8 +1163,6 @@ public class ReqForQuotationIC extends ValidatorEJB {
BigDecimal
rateQuotVal
=
new
BigDecimal
(
rateQuot
);
BigDecimal
ratePtrVal
=
new
BigDecimal
(
ratePtr
);
BaseLogger
.
log
(
"3"
,
null
,
null
,
"ReqForQuotationIC after conversion rateQuotVal:: "
+
rateQuotVal
+
" rateApprvVal::"
+
rateApprvVal
+
" ratePtrVal::"
+
ratePtrVal
);
// added condition when ptr and rate_quot is same direct approval without management
if
(
ratePtrVal
.
compareTo
(
rateQuotVal
)
==
0
)
{
...
...
@@ -1244,6 +1269,7 @@ public class ReqForQuotationIC extends ValidatorEJB {
valueXmlString
.
append
(
"<revised_ptr>"
).
append
(
"<![CDATA["
+
revisedPtr
+
"]]>"
).
append
(
"</revised_ptr>\r\n"
);
valueXmlString
.
append
(
"<revised_pts>"
).
append
(
"<![CDATA["
+
revisedPts
+
"]]>"
).
append
(
"</revised_pts>\r\n"
);
valueXmlString
.
append
(
"<revised_ptd>"
).
append
(
"<![CDATA["
+
revisedPtd
+
"]]>"
).
append
(
"</revised_ptd>\r\n"
);
valueXmlString
.
append
(
"<value>"
).
append
(
"<![CDATA["
+
value
+
"]]>"
).
append
(
"</value>\r\n"
);
}
...
...
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