subjectTypeREG04 = ApplicationConsts.SUBJECT_PEOPLE_CUSTOMER;
CustomerPK pk = new CustomerPK(vo.getCompanyCodeSys01SCH03(),vo.getProgressiveReg04SCH03(),subjectTypeREG04);
Response res = ClientUtils.getData("loadCustomer",pk);
if (!res.isError()) {
if (subjectTypeREG04.equals(ApplicationConsts.SUBJECT_ORGANIZATION_CUSTOMER)) {
OrganizationCustomerVO custVO = (OrganizationCustomerVO)((VOResponse)res).getVo();
controlCustCode.setValue(custVO.getCustomerCodeSAL07());
controlCustCode.setEnabled(false);
if (custVO.getPricelistCodeSal01SAL07()!=null) {
controlPricelistCode.setValue(custVO.getPricelistCodeSal01SAL07());
controlPricelistDescr.setValue(custVO.getPricelistDescriptionSYS10());
controlPricelistCode.setEnabled(false);
}
controlCurrencyCode.setValue(custVO.getCurrencyCodeReg03SAL01());
controlPayCode.setValue(custVO.getPaymentCodeReg10SAL07());
controlPayCode.setEnabled(false);
controlPayDescr.setValue(custVO.getPaymentDescriptionSYS10());
controlCreditsCode.setValue(custVO.getCreditAccountCodeAcc02SAL07());
controlItemsCode.setValue(custVO.getItemsAccountCodeAcc02SAL07());
controlActCode.setValue(custVO.getActivitiesAccountCodeAcc02SAL07());
controlChargesCode.setValue(custVO.getChargesAccountCodeAcc02SAL07());
controlCreditsCode.setEnabled(false);
controlItemsCode.setEnabled(false);
controlActCode.setEnabled(false);
controlChargesCode.setEnabled(false);
}
else {
PeopleCustomerVO custVO = (PeopleCustomerVO)((VOResponse)res).getVo();
controlCustCode.setValue(custVO.getCustomerCodeSAL07());
controlCustCode.setEnabled(false);
if (custVO.getPricelistCodeSal01SAL07()!=null) {
controlPricelistCode.setValue(custVO.getPricelistCodeSal01SAL07());
controlPricelistDescr.setValue(custVO.getPricelistDescriptionSYS10());
controlPricelistCode.setEnabled(false);
controlCurrencyCode.setValue(custVO.getCurrencyCodeReg03SAL01());
controlPayCode.setValue(custVO.getPaymentCodeReg10SAL07());
controlPayCode.setEnabled(false);
controlPayDescr.setValue(custVO.getPaymentDescriptionSYS10());
controlCreditsCode.setValue(custVO.getCreditAccountCodeAcc02SAL07());
controlItemsCode.setValue(custVO.getItemsAccountCodeAcc02SAL07());
controlActCode.setValue(custVO.getActivitiesAccountCodeAcc02SAL07());
controlChargesCode.setValue(custVO.getChargesAccountCodeAcc02SAL07());
controlCreditsCode.setEnabled(false);
controlItemsCode.setEnabled(false);
controlActCode.setEnabled(false);
controlChargesCode.setEnabled(false);
}