rset.close();
}
HashMap map = new HashMap();
map.put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01REG04());
LookupValidationParams pars = new LookupValidationParams(vo.getCreditAccountCodeAcc02SAL07(),map);
Response aRes = accountAction.validateAccountCode(pars,serverLanguageId,username,companiesList,new ArrayList());
if (!aRes.isError())
vo.setCreditAccountDescrSAL07( ((AccountVO)((VOListResponse)aRes).getRows().get(0)).getDescriptionSYS10() );
pars = new LookupValidationParams(vo.getItemsAccountCodeAcc02SAL07(),map);
aRes = accountAction.validateAccountCode(pars,serverLanguageId,username,companiesList,new ArrayList());
if (!aRes.isError())
vo.setItemsAccountDescrSAL07( ((AccountVO)((VOListResponse)aRes).getRows().get(0)).getDescriptionSYS10() );
pars = new LookupValidationParams(vo.getActivitiesAccountCodeAcc02SAL07(),map);
aRes = accountAction.validateAccountCode(pars,serverLanguageId,username,companiesList,new ArrayList());
if (!aRes.isError())
vo.setActivitiesAccountDescrSAL07( ((AccountVO)((VOListResponse)aRes).getRows().get(0)).getDescriptionSYS10() );
pars = new LookupValidationParams(vo.getChargesAccountCodeAcc02SAL07(),map);
aRes = accountAction.validateAccountCode(pars,serverLanguageId,username,companiesList,new ArrayList());
if (!aRes.isError())
vo.setChargesAccountDescrSAL07( ((AccountVO)((VOListResponse)aRes).getRows().get(0)).getDescriptionSYS10() );
}
else if (!res.isError() && pk.getSubjectTypeREG04().equals(ApplicationConsts.SUBJECT_PEOPLE_CUSTOMER)) {
PeopleCustomerVO vo = (PeopleCustomerVO)((VOResponse)res).getVo();
stmt = conn.createStatement();
if (vo.getPricelistCodeSal01SAL07()!=null) {
ResultSet rset = stmt.executeQuery(
"select DESCRIPTION,CURRENCY_CODE_REG03 from SYS10_COMPANY_TRANSLATIONS,SAL01_PRICELISTS where "+
"SYS10_COMPANY_TRANSLATIONS.COMPANY_CODE_SYS01=SAL01_PRICELISTS.COMPANY_CODE_SYS01 and "+
"SYS10_COMPANY_TRANSLATIONS.PROGRESSIVE=SAL01_PRICELISTS.PROGRESSIVE_SYS10 and "+
"SYS10_COMPANY_TRANSLATIONS.LANGUAGE_CODE='"+serverLanguageId+"' and SAL01_PRICELISTS.COMPANY_CODE_SYS01='"+vo.getCompanyCodeSys01REG04()+"' and "+
"SAL01_PRICELISTS.PRICELIST_CODE='"+vo.getPricelistCodeSal01SAL07()+"'"
);
if (rset.next()) {
vo.setPricelistDescriptionSYS10(rset.getString(1));
vo.setCurrencyCodeReg03SAL01(rset.getString(2));
}
rset.close();
}
if (vo.getBankCodeReg12SAL07()!=null) {
ResultSet rset = stmt.executeQuery(
"select DESCRIPTION from REG12_BANKS where "+
"REG12_BANKS.COMPANY_CODE_SYS01='"+vo.getCompanyCodeSys01REG04()+"' and "+
"REG12_BANKS.BANK_CODE='"+vo.getBankCodeReg12SAL07()+"'"
);
if (rset.next())
vo.setDescriptionREG12(rset.getString(1));
rset.close();
}
if (vo.getAgentProgressiveReg04SAL07()!=null) {
ResultSet rset = stmt.executeQuery(
"select REG04_SUBJECTS.NAME_1,REG04_SUBJECTS.NAME_2,SAL10_AGENTS.AGENT_CODE from SAL10_AGENTS,REG04_SUBJECTS where "+
"SAL10_AGENTS.COMPANY_CODE_SYS01=REG04_SUBJECTS.COMPANY_CODE_SYS01 and "+
"SAL10_AGENTS.PROGRESSIVE_REG04=REG04_SUBJECTS.PROGRESSIVE and "+
"SAL10_AGENTS.PROGRESSIVE_REG04="+vo.getAgentProgressiveReg04SAL07()
);
if (rset.next()) {
vo.setAgentName_1REG04(rset.getString(1));
vo.setAgentName_2REG04(rset.getString(2));
vo.setAgentCodeSAL10(rset.getString(3));
}
rset.close();
}
if (vo.getVatCodeReg01SAL07()!=null) {
ResultSet rset = stmt.executeQuery(
"select REG01_VATS.VALUE,REG01_VATS.DEDUCTIBLE,SYS10_TRANSLATIONS.DESCRIPTION from REG01_VATS,SYS10_TRANSLATIONS where "+
"REG01_VATS.VAT_CODE='"+vo.getVatCodeReg01SAL07()+"' and REG01_VATS.PROGRESSIVE_SYS10=SYS10_TRANSLATIONS.PROGRESSIVE and SYS10_TRANSLATIONS.LANGUAGE_CODE='"+serverLanguageId+"'"
);
if (rset.next()) {
vo.setVatValueREG01(rset.getBigDecimal(1));
vo.setVatDeductibleREG01(rset.getBigDecimal(2));
vo.setVatDescriptionSYS10(rset.getString(3));
}
rset.close();
}
HashMap map = new HashMap();
map.put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01REG04());
LookupValidationParams pars = new LookupValidationParams(vo.getCreditAccountCodeAcc02SAL07(),map);
Response aRes = accountAction.validateAccountCode(pars,serverLanguageId,username,companiesList,new ArrayList());
if (!aRes.isError())
vo.setCreditAccountDescrSAL07( ((AccountVO)((VOListResponse)aRes).getRows().get(0)).getDescriptionSYS10() );
pars = new LookupValidationParams(vo.getItemsAccountCodeAcc02SAL07(),map);
aRes = accountAction.validateAccountCode(pars,serverLanguageId,username,companiesList,new ArrayList());
if (!aRes.isError())
vo.setItemsAccountDescrSAL07( ((AccountVO)((VOListResponse)aRes).getRows().get(0)).getDescriptionSYS10() );
pars = new LookupValidationParams(vo.getActivitiesAccountCodeAcc02SAL07(),map);
aRes = accountAction.validateAccountCode(pars,serverLanguageId,username,companiesList,new ArrayList());
if (!aRes.isError())
vo.setActivitiesAccountDescrSAL07( ((AccountVO)((VOListResponse)aRes).getRows().get(0)).getDescriptionSYS10() );
pars = new LookupValidationParams(vo.getChargesAccountCodeAcc02SAL07(),map);
aRes = accountAction.validateAccountCode(pars,serverLanguageId,username,companiesList,new ArrayList());
if (!aRes.isError())
vo.setChargesAccountDescrSAL07( ((AccountVO)((VOListResponse)aRes).getRows().get(0)).getDescriptionSYS10() );
}