Commit fb555795 authored by cpatil's avatar cpatil

modify code for item code


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93596 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 426342d1
......@@ -255,15 +255,15 @@ POrderAmdConfLocal, POrderAmdConfRemote
lineNoOrd = rs.getString("line_no__ord");
amdDetTot = rs.getDouble("tot_amt");
if (lineNoOrd != null && lineNoOrd.trim().length() > 0
&& purcOrder != null
&& purcOrder.trim().length() > 0) {
if (lineNoOrd != null && lineNoOrd.trim().length() > 0 && purcOrder != null && purcOrder.trim().length() > 0)
{
sql1 = " select tot_amt from porddet where purc_order = ? and line_no = ? ";
pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1, purcOrder);
pstmt1.setString(2, lineNoOrd);
rs1 = pstmt1.executeQuery();
if (rs1.next()) {
if (rs1.next())
{
poDetTot = rs1.getDouble("tot_amt");
}
rs1.close();
......@@ -336,8 +336,7 @@ POrderAmdConfLocal, POrderAmdConfRemote
Document ediDataDom = genericUtility.parseString(dataStr);
E12CreateBatchLoadEjb e12CreateBatchLoad = new E12CreateBatchLoadEjb();
retString = e12CreateBatchLoad.createBatchLoad(ediDataDom,
"w_porderamd", ediOption, xtraParams, conn);
retString = e12CreateBatchLoad.createBatchLoad(ediDataDom,"w_porderamd", ediOption, xtraParams, conn);
createRCPXML = null;
e12CreateBatchLoad = null;
......@@ -392,11 +391,11 @@ POrderAmdConfLocal, POrderAmdConfRemote
throws RemoteException, ITMException
{
PreparedStatement pstmt = null, pstmt1 = null, pstmtSql = null;
ResultSet rs = null, rs1 = null;
PreparedStatement pstmt = null, pstmt1 = null, pstmt3 = null,pstmtSql = null;
ResultSet rs = null, rs1 = null,rs3 = null;
int cnt = 0;
// Document dom = null;
String retString = "", sql = "", sql1 = "", purcOrder = "", lineNoOrd = "", errCode = "";
String retString = "", sql = "", sql1 = "", sql3 = "",purcOrder = "", lineNoOrd = "", errCode = "";
//String loginEmpCode = "", ediOption = "", dataStr = "";
//double pohdrTot = 0, vouchAdv = 0, amdDetTot = 0, poDetTot = 0, poHdrTot = 0;
Timestamp sysDate = null, taxDate = null, refDate = null, amdDate = null;
......@@ -428,9 +427,9 @@ POrderAmdConfLocal, POrderAmdConfRemote
double frtRate = 0, frtAmtQty = 0, frtAmtFixed = 0;
GenericUtility genericUtility = GenericUtility.getInstance();
ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB();
try {
System.out
.println("@@@@@@@@@@@@@@@ gbf_confirm_pordamd method called next..............");
try
{
System.out.println("@@@@@@@@@@@@@@@ gbf_confirm_pordamd method called next..............");
Calendar currentDate = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
String sysDateStr = sdf.format(currentDate.getTime());
......@@ -655,182 +654,15 @@ POrderAmdConfLocal, POrderAmdConfRemote
System.out.println("@@@@@@ inside indNo [" + indNo
+ "]:::lineNoOrd[" + lineNoOrd + "]");
sql = " select item_code from porddet where purc_order = ? and line_no = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, purcOrder);
pstmt.setString(2, lineNoOrd);
rs = pstmt.executeQuery();
if (rs.next())
{
oldItem = rs.getString("item_code");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if (oldItem == null || oldItem.trim().length() == 0)
{
if (cctrCodeDr == null)
{
cctrCodeDr = "";
}
if (cctrCodeCr == null)
{
cctrCodeCr = "";
}
sql = " insert into porddet ( purc_order,line_no,site_code,ind_no,item_code,quantity,unit,rate,"
+ " discount,tax_amt,tot_amt,loc_code,req_date,dlv_date,dlv_qty,status,status_date,"
+ " tax_class,tax_chap,tax_env,remarks,work_order,unit__rate,conv__qty_stduom,conv__rtuom_stduom,"
+ " unit__std,quantity__stduom,rate__stduom,pack_code,no_art,pack_instr,acct_code__dr,"
+ " cctr_code__dr,acct_code__cr,cctr_code__cr,discount_type,supp_code__mnfr,order_opt,bom_code,"
+ " specific_instr,rate__clg,special_instr,benefit_type,licence_no,duty_paid,form_no ) "
+ " values ( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ) ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, purcOrder);
pstmt.setString(2, lineNo);
pstmt.setString(3, siteCode);
pstmt.setString(4, indNo);
pstmt.setString(5, itemCode);
pstmt.setDouble(6, quantity);
pstmt.setString(7, unit);
pstmt.setDouble(8, rate);
pstmt.setDouble(9, discount);
pstmt.setDouble(10, taxAmt);
pstmt.setDouble(11, totAmt);
pstmt.setString(12, locCode);
pstmt.setTimestamp(13, reqDate);
pstmt.setTimestamp(14, dlvDate);
pstmt.setDouble(15, dlvQuantity);
pstmt.setString(16, status);
pstmt.setTimestamp(17, sysDate);
pstmt.setString(18, taxClass);
pstmt.setString(19, taxChap);
pstmt.setString(20, taxEnv);
pstmt.setString(21, remarks);
pstmt.setString(22, workOrder);
pstmt.setString(23, unitRate);
pstmt.setDouble(24, convQtyStduom);
pstmt.setDouble(25, convRtuomStduom);
pstmt.setString(26, UnitStd);
pstmt.setDouble(27, quantityStduom);
pstmt.setString(28, packCode);
pstmt.setDouble(29, noArt);
pstmt.setString(30, packInstr);
pstmt.setString(31, acctCodeDr);
pstmt.setString(32, acctCodeCr);
pstmt.setString(33, discountType);
pstmt.setString(34, suppCodeMnfr);
pstmt.setString(35, orderOpt);
pstmt.setString(36, bom);
pstmt.setString(37, specificInstr);
pstmt.setDouble(38, clgRate);
pstmt.setString(39, specialInstr);
pstmt.setString(40, benefitType);
pstmt.setString(41, licenceNo);
pstmt.setString(42, dutyPaid);
pstmt.setString(43, formNo);
cnt = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
{
sql = " select line_no__tax,tax_code,"
+ " tax_class,tax_chap,tax_base,tax_env,taxable_amt,tax_perc,tax_amt,chg_stat,tax_set,effect,"
+ " acct_code__reco,cctr_code__reco,reco_perc,reco_amount,acct_code,cctr_code,rate_type,round,round_to,"
+ " tax_form,chg_date,chg_user,chg_term,posted,tax_form_date,pay_tax "
+ " from taxtran where tran_code = 'P-AMD' and tran_id = ? and line_no = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, amdNo);
pstmt.setString(2, lineNo);
rs = pstmt.executeQuery();
if (rs.next()) {
lineNoTax = rs.getString("line_no__tax");
taxCode = rs.getString("tax_code");
taxClass = rs.getString("tax_class");
taxChap = rs.getString("tax_chap");
taxBase = rs.getString("tax_base");
taxEnv = rs.getString("tax_env");
taxableAmt = rs.getDouble("taxable_amt");
taxPerc = rs.getString("tax_perc");
taxAmt = rs.getDouble("tax_amt");
chgStat = rs.getString("chg_stat");
taxSet = rs.getString("tax_set");
effect = rs.getString("effect");
acctCodeReco = rs.getString("acct_code__reco");
cctrCodeReco = rs.getString("cctr_code__reco");
recoPerc = rs.getString("reco_perc");
recoAmont = rs.getDouble("reco_amount");
acctCode = rs.getString("acct_code");
cctrCode = rs.getString("cctr_code");
rateType = rs.getString("rate_type");
round = rs.getString("round");
round = rs.getString("round_to");
taxForm = rs.getString("tax_form");
chgDate = rs.getTimestamp("chg_date");
chgUser = rs.getString("chg_user");
chgTerm = rs.getString("chg_term");
posted = rs.getString("posted");
taxFormDate = rs.getTimestamp("tax_form_date");
payTax = rs.getString("pay_tax");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
sql = " insert into taxtran (tran_code,tran_id,line_no,line_no__tax,tax_code,tax_class,"
+ " tax_chap,tax_base,tax_env,taxable_amt,tax_perc,tax_amt,chg_stat,tax_set , "
+ " effect,acct_code__reco, cctr_code__reco,reco_perc,reco_amount,acct_code,"
+ " cctr_code,rate_type,round,round_to,tax_form,chg_date,chg_user,chg_term,"
+ " posted,tax_form_date,pay_tax) "
+ " values ( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ) ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, "P-ORD");
pstmt.setString(2, purcOrder);
pstmt.setString(3, lineNo);
pstmt.setString(4, lineNoTax);
pstmt.setString(5, taxCode);
pstmt.setString(6, taxClass);
pstmt.setString(7, taxChap);
pstmt.setString(8, taxBase);
pstmt.setString(9, taxEnv);
pstmt.setDouble(10, taxableAmt);
pstmt.setString(11, taxPerc);
pstmt.setDouble(12, taxAmt);
pstmt.setString(13, chgStat);
pstmt.setString(14, taxSet);
pstmt.setString(15, effect);
pstmt.setString(16, acctCodeReco);
pstmt.setString(17, cctrCodeReco);
pstmt.setString(18, recoPerc);
pstmt.setDouble(19, recoAmont);
pstmt.setString(20, acctCode);
pstmt.setString(21, cctrCode);
pstmt.setString(22, rateType);
pstmt.setString(23, round);
pstmt.setString(24, roundTo);
pstmt.setString(25, taxForm);
pstmt.setTimestamp(26, chgDate);
pstmt.setString(27, chgUser);
pstmt.setString(28, chgTerm);
pstmt.setString(29, posted);
pstmt.setTimestamp(30, taxFormDate);
pstmt.setString(31, payTax);
cnt = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
} // end if
}
else // for test by cpatil
sql3 = " select item_code from porddet where purc_order = ? and line_no = ? ";
pstmt3 = conn.prepareStatement(sql3);
pstmt3.setString(1, purcOrder);
pstmt3.setString(2, lineNoOrd);
rs3 = pstmt3.executeQuery();
if (rs3.next())
{
oldItem = rs3.getString("item_code");
{
System.out.println("@@@@@@@@@@oldItem["+oldItem+"]::::itemCode["+itemCode+"]");
if (!( itemCode.equalsIgnoreCase(oldItem) ))
......@@ -915,6 +747,26 @@ POrderAmdConfLocal, POrderAmdConfRemote
if (cnt > 0)
{
/*
sql = " insert into taxtran ( tran_code,tran_id,line_no,line_no__tax,tax_code,tax_class,tax_chap,tax_base,tax_env," +
" taxable_amt,tax_perc,tax_amt,chg_stat,tax_set,effect,acct_code__reco,cctr_code__reco,reco_perc,reco_amount," +
" acct_code,cctr_code,rate_type,round,round_to,tax_form,chg_date,chg_user,chg_term,posted,tax_form_date,pay_tax ) " +
" select 'P-ORD',tran_id,line_no,line_no__tax,tax_code,tax_class,tax_chap,tax_base,tax_env,taxable_amt," +
" tax_perc,tax_amt,chg_stat,tax_set,effect,acct_code__reco,cctr_code__reco,reco_perc,reco_amount,acct_code,cctr_code," +
" rate_type,round,round_to,tax_form,chg_date,chg_user,chg_term,posted ,tax_form_date, pay_tax " +
" from taxtran where tran_code = ? and tran_id = ? and line_no = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, "P-AMD");
pstmt.setString(2, amdNo);
pstmt.setString(3, lineNo);
int cnt2 = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
System.out.println("@@@@1 cnt2["+cnt2+"]");
*/ /**/
sql = " select line_no__tax,tax_code,"
+ " tax_class,tax_chap,tax_base,tax_env,taxable_amt,tax_perc,tax_amt,chg_stat,tax_set,effect,"
+ " acct_code__reco,cctr_code__reco,reco_perc,reco_amount,acct_code,cctr_code,rate_type,round,round_to,"
......@@ -1004,11 +856,196 @@ POrderAmdConfLocal, POrderAmdConfRemote
cnt = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
/**/ System.out.println("@@@@1 cnt["+cnt+"]");
}
// end if
}
}
else
// if (oldItem == null || oldItem.trim().length() == 0)
{
if (cctrCodeDr == null)
{
cctrCodeDr = "";
}
if (cctrCodeCr == null)
{
cctrCodeCr = "";
}
sql = " insert into porddet ( purc_order,line_no,site_code,ind_no,item_code,quantity,unit,rate,"
+ " discount,tax_amt,tot_amt,loc_code,req_date,dlv_date,dlv_qty,status,status_date,"
+ " tax_class,tax_chap,tax_env,remarks,work_order,unit__rate,conv__qty_stduom,conv__rtuom_stduom,"
+ " unit__std,quantity__stduom,rate__stduom,pack_code,no_art,pack_instr,acct_code__dr,"
+ " cctr_code__dr,acct_code__cr,cctr_code__cr,discount_type,supp_code__mnfr,order_opt,bom_code,"
+ " specific_instr,rate__clg,special_instr,benefit_type,licence_no,duty_paid,form_no ) "
+ " values ( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ) ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, purcOrder);
pstmt.setString(2, lineNo);
pstmt.setString(3, siteCode);
pstmt.setString(4, indNo);
pstmt.setString(5, itemCode);
pstmt.setDouble(6, quantity);
pstmt.setString(7, unit);
pstmt.setDouble(8, rate);
pstmt.setDouble(9, discount);
pstmt.setDouble(10, taxAmt);
pstmt.setDouble(11, totAmt);
pstmt.setString(12, locCode);
pstmt.setTimestamp(13, reqDate);
pstmt.setTimestamp(14, dlvDate);
pstmt.setDouble(15, dlvQuantity);
pstmt.setString(16, status);
pstmt.setTimestamp(17, sysDate);
pstmt.setString(18, taxClass);
pstmt.setString(19, taxChap);
pstmt.setString(20, taxEnv);
pstmt.setString(21, remarks);
pstmt.setString(22, workOrder);
pstmt.setString(23, unitRate);
pstmt.setDouble(24, convQtyStduom);
pstmt.setDouble(25, convRtuomStduom);
pstmt.setString(26, UnitStd);
pstmt.setDouble(27, quantityStduom);
pstmt.setString(28, packCode);
pstmt.setDouble(29, noArt);
pstmt.setString(30, packInstr);
pstmt.setString(31, acctCodeDr);
pstmt.setString(32, acctCodeCr);
pstmt.setString(33, discountType);
pstmt.setString(34, suppCodeMnfr);
pstmt.setString(35, orderOpt);
pstmt.setString(36, bom);
pstmt.setString(37, specificInstr);
pstmt.setDouble(38, clgRate);
pstmt.setString(39, specialInstr);
pstmt.setString(40, benefitType);
pstmt.setString(41, licenceNo);
pstmt.setString(42, dutyPaid);
pstmt.setString(43, formNo);
cnt = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
/*
sql = " insert into taxtran ( tran_code,tran_id,line_no,line_no__tax,tax_code,tax_class,tax_chap,tax_base,tax_env," +
" taxable_amt,tax_perc,tax_amt,chg_stat,tax_set,effect,acct_code__reco,cctr_code__reco,reco_perc,reco_amount," +
" acct_code,cctr_code,rate_type,round,round_to,tax_form,chg_date,chg_user,chg_term,posted,tax_form_date,pay_tax ) " +
" select 'P-ORD',tran_id,line_no,line_no__tax,tax_code,tax_class,tax_chap,tax_base,tax_env,taxable_amt," +
" tax_perc,tax_amt,chg_stat,tax_set,effect,acct_code__reco,cctr_code__reco,reco_perc,reco_amount,acct_code,cctr_code," +
" rate_type,round,round_to,tax_form,chg_date,chg_user,chg_term,posted ,tax_form_date, pay_tax " +
" from taxtran where tran_code = ? and tran_id = ? and line_no = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, "P-AMD");
pstmt.setString(2, amdNo);
pstmt.setString(3, lineNo);
cnt = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
System.out.println("@@@@2 cnt["+cnt+"]");
*/
/**/ {
sql = " select line_no__tax,tax_code,"
+ " tax_class,tax_chap,tax_base,tax_env,taxable_amt,tax_perc,tax_amt,chg_stat,tax_set,effect,"
+ " acct_code__reco,cctr_code__reco,reco_perc,reco_amount,acct_code,cctr_code,rate_type,round,round_to,"
+ " tax_form,chg_date,chg_user,chg_term,posted,tax_form_date,pay_tax "
+ " from taxtran where tran_code = 'P-AMD' and tran_id = ? and line_no = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, amdNo);
pstmt.setString(2, lineNo);
rs = pstmt.executeQuery();
if (rs.next()) {
lineNoTax = rs.getString("line_no__tax");
taxCode = rs.getString("tax_code");
taxClass = rs.getString("tax_class");
taxChap = rs.getString("tax_chap");
taxBase = rs.getString("tax_base");
taxEnv = rs.getString("tax_env");
taxableAmt = rs.getDouble("taxable_amt");
taxPerc = rs.getString("tax_perc");
taxAmt = rs.getDouble("tax_amt");
chgStat = rs.getString("chg_stat");
taxSet = rs.getString("tax_set");
effect = rs.getString("effect");
acctCodeReco = rs.getString("acct_code__reco");
cctrCodeReco = rs.getString("cctr_code__reco");
recoPerc = rs.getString("reco_perc");
recoAmont = rs.getDouble("reco_amount");
acctCode = rs.getString("acct_code");
cctrCode = rs.getString("cctr_code");
rateType = rs.getString("rate_type");
round = rs.getString("round");
round = rs.getString("round_to");
taxForm = rs.getString("tax_form");
chgDate = rs.getTimestamp("chg_date");
chgUser = rs.getString("chg_user");
chgTerm = rs.getString("chg_term");
posted = rs.getString("posted");
taxFormDate = rs.getTimestamp("tax_form_date");
payTax = rs.getString("pay_tax");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
sql = " insert into taxtran (tran_code,tran_id,line_no,line_no__tax,tax_code,tax_class,"
+ " tax_chap,tax_base,tax_env,taxable_amt,tax_perc,tax_amt,chg_stat,tax_set , "
+ " effect,acct_code__reco, cctr_code__reco,reco_perc,reco_amount,acct_code,"
+ " cctr_code,rate_type,round,round_to,tax_form,chg_date,chg_user,chg_term,"
+ " posted,tax_form_date,pay_tax) "
+ " values ( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ) ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, "P-ORD");
pstmt.setString(2, purcOrder);
pstmt.setString(3, lineNo);
pstmt.setString(4, lineNoTax);
pstmt.setString(5, taxCode);
pstmt.setString(6, taxClass);
pstmt.setString(7, taxChap);
pstmt.setString(8, taxBase);
pstmt.setString(9, taxEnv);
pstmt.setDouble(10, taxableAmt);
pstmt.setString(11, taxPerc);
pstmt.setDouble(12, taxAmt);
pstmt.setString(13, chgStat);
pstmt.setString(14, taxSet);
pstmt.setString(15, effect);
pstmt.setString(16, acctCodeReco);
pstmt.setString(17, cctrCodeReco);
pstmt.setString(18, recoPerc);
pstmt.setDouble(19, recoAmont);
pstmt.setString(20, acctCode);
pstmt.setString(21, cctrCode);
pstmt.setString(22, rateType);
pstmt.setString(23, round);
pstmt.setString(24, roundTo);
pstmt.setString(25, taxForm);
pstmt.setTimestamp(26, chgDate);
pstmt.setString(27, chgUser);
pstmt.setString(28, chgTerm);
pstmt.setString(29, posted);
pstmt.setTimestamp(30, taxFormDate);
pstmt.setString(31, payTax);
cnt = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
System.out.println("@@@@2 cnt["+cnt+"]");
} // end if
/**/ }
rs3.close();
rs3 = null;
pstmt3.close();
pstmt3 = null;
}
else
{
......@@ -1111,7 +1148,23 @@ POrderAmdConfLocal, POrderAmdConfRemote
if (cnt == 0)
{
/*
sql = " insert into taxtran ( tran_code,tran_id,line_no,line_no__tax,tax_code,tax_class,tax_chap,tax_base,tax_env," +
" taxable_amt,tax_perc,tax_amt,chg_stat,tax_set,effect,acct_code__reco,cctr_code__reco,reco_perc,reco_amount," +
" acct_code,cctr_code,rate_type,round,round_to,tax_form,chg_date,chg_user,chg_term,posted,tax_form_date,pay_tax ) " +
" select 'P-ORD' ,tran_id,line_no,line_no__tax,tax_code,tax_class,tax_chap,tax_base,tax_env,taxable_amt," +
" tax_perc,tax_amt,chg_stat,tax_set,effect,acct_code__reco,cctr_code__reco,reco_perc,reco_amount,acct_code,cctr_code," +
" rate_type,round,round_to,tax_form,chg_date,chg_user,chg_term,posted ,tax_form_date, pay_tax " +
" from taxtran where tran_code = ? and tran_id = ? and line_no = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, "P-AMD");
pstmt.setString(2, amdNo);
pstmt.setString(3, lineNo);
cnt = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
System.out.println("@@@@3 cnt["+cnt+"]");
*/ /**/
sql = " select line_no__tax,tax_code,"
+ " tax_class,tax_chap,tax_base,tax_env,taxable_amt,tax_perc,tax_amt,chg_stat,tax_set,effect,"
+ " acct_code__reco,cctr_code__reco,reco_perc,reco_amount,acct_code,cctr_code,rate_type,round,round_to,"
......@@ -1205,7 +1258,8 @@ POrderAmdConfLocal, POrderAmdConfRemote
cnt = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
System.out.println("@@@@3 cnt["+cnt+"]");
/* */
sql = " update poamd_det set line_no__ord = ? where amd_no = ? and line_no = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lineNoPO);
......@@ -1215,7 +1269,8 @@ POrderAmdConfLocal, POrderAmdConfRemote
pstmt.close();
pstmt = null;
if (!(updCnt == 1)) {
if (!(updCnt == 1))
{
errCode = "VTAMDDT";
errCode = itmDBAccessLocal.getErrorString("",errCode,"");
return errCode;
......
......@@ -152,7 +152,7 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
purcOrder = checkNull(genericUtility.getColumnValue("purc_order", dom));
siteCodeOrd = checkNull(genericUtility.getColumnValue("site_code__ord", dom));
System.out.println("@@@@ purc_order["+purcOrder+"]");
if( purcOrder == null || purcOrder.trim().length() == 0 )
if( purcOrder != null && purcOrder.trim().length() > 0 )
{
sql = " select status, confirmed from porder where purc_order = ? ";
pstmt = conn.prepareStatement(sql);
......@@ -181,7 +181,7 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
else if ("Y".equalsIgnoreCase(confirmed))
else if (!("Y".equalsIgnoreCase(confirmed)))
{
errCode = "VTNOTCONF";
errList.add(errCode);
......@@ -604,7 +604,7 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
}
}
if( errCode== null || errCode.trim().length()==0 )
if( errCode == null || errCode.trim().length()==0 )
{
purcOrder = checkNull(genericUtility.getColumnValue("purc_order", dom));
amdNo = checkNull(genericUtility.getColumnValue("amd_no", dom));
......@@ -2779,9 +2779,11 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
else if ( currentColumn.trim().equalsIgnoreCase("line_no__ord") )
{
lineNoOrd = checkNull(genericUtility.getColumnValue("line_no__ord", dom));
if( lineNoOrd != null && lineNoOrd.trim().length() > 0 )
purcOrder = checkNull(genericUtility.getColumnValue("purc_order", dom));
if( lineNoOrd != null && lineNoOrd.trim().length() > 0 && purcOrder != null && purcOrder.trim().length() > 0 )
{
purcOrder = checkNull(genericUtility.getColumnValue("purc_order", dom));
lineNoOrd = " "+lineNoOrd;
lineNoOrd = lineNoOrd.substring(lineNoOrd.length()-3, lineNoOrd.length());
valueXmlString.append("<line_no__ord >").append("<![CDATA["+lineNoOrd+"]]>").append("</line_no__ord>");
......@@ -3101,7 +3103,7 @@ public class POrderAmdIC extends ValidatorEJB implements POrderAmdICLocal, POrde
itemSer = genericUtility.getColumnValue("item_ser", dom1);
itemCode = genericUtility.getColumnValue("item_code", dom);
if ( acct_dr!= null || "0".equalsIgnoreCase(acct_dr))
if ( acct_dr == null || acct_dr.trim().length() == 0 )
{
cctr_dr = fincommon.getFromAcctDetr(itemCode, itemSer, "IN", conn);
......
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