Examples of LookupValidationParams


Examples of org.openswing.swing.message.send.java.LookupValidationParams

      }
    });


    // load warehouse info...
    LookupValidationParams pars = new LookupValidationParams(warehouseCode,new HashMap());
    pars.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,companyCodeSys01);
    Response res = ClientUtils.getData("validateWarehouseCode",pars);
    if (!res.isError()) {
      java.util.List vos = ((VOListResponse)res).getRows();
      if (vos.size()==1)
        warehouseVO = (WarehouseVO)vos.get(0);

      else
        warehouseVO = null;
    }
    else
      warehouseVO = null;


    // load customer info...
    pars = new LookupValidationParams(customerCode,new HashMap());
    pars.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,companyCodeSys01);
    res = ClientUtils.getData("validateCustomerCode",pars);
    GridCustomerVO gridCustomerVO = null;
    if (!res.isError()) {
      java.util.List vos = ((VOListResponse)res).getRows();
      if (vos.size()==1)
        gridCustomerVO = (GridCustomerVO)vos.get(0);
      else
        gridCustomerVO = null;
    }
    else
      gridCustomerVO = null;


    // load customer detail vo...
    res = ClientUtils.getData("loadCustomer",new CustomerPK(
        gridCustomerVO.getCompanyCodeSys01REG04(),
        gridCustomerVO.getProgressiveREG04(),
        ApplicationConsts.SUBJECT_PEOPLE_CUSTOMER
    ));
    if (!res.isError()) {
      customerVO = (PeopleCustomerVO)((VOResponse)res).getVo();
      if (customerVO.getCurrencyCodeReg03SAL01()==null ||
          customerVO.getPricelistCodeSal01SAL07()==null) {
        OptionPane.showMessageDialog(MDIFrame.getInstance(),"you need to specify a pricelist for the default customer","Attention",JOptionPane.OK_OPTION);
        return false;
      }
    }
    else {
      customerVO = null;
      OptionPane.showMessageDialog(MDIFrame.getInstance(),"you need to specifify the default customer for retail sale","Attention",JOptionPane.OK_OPTION);
      return false;
    }

    // load currency info...
    pars = new LookupValidationParams(customerVO.getCurrencyCodeReg03SAL01(),new HashMap());
    res = ClientUtils.getData("validateCurrencyCode",pars);
    if (!res.isError())
      currVO = (CurrencyVO)((VOListResponse)res).getRows().get(0);
    else
      currVO = null;
View Full Code Here

Examples of org.openswing.swing.message.send.java.LookupValidationParams

      return;
    }
    try {
      // validate variants barcode...
      VariantBarcodeVO barcodeVO = null;
      LookupValidationParams pars = new LookupValidationParams((String)controlBarcode.getValue(),new HashMap());
      pars.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,customerVO.getCompanyCodeSys01REG04());
      Response res = ClientUtils.getData("validateVariantBarcode",pars);
      if (!res.isError()) {
        java.util.List rows = ( (VOListResponse) res).getRows();
        if (rows.size() == 1) {
          // found variants barcode: pre-fill code and qty in variants matrix...
          barcodeVO = (VariantBarcodeVO)rows.get(0);
        }
      }

      if (barcodeVO!=null) {
        pars = new LookupValidationParams(barcodeVO.getItemCodeItm01ITM22(),new HashMap());
        pars.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,customerVO.getCompanyCodeSys01REG04());
        pars.getLookupValidationParameters().put(ApplicationConsts.PRICELIST,customerVO.getPricelistCodeSal01SAL07());
      }
      else {
        pars = new LookupValidationParams((String)controlBarcode.getValue(),new HashMap());
        pars.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,customerVO.getCompanyCodeSys01REG04());
        pars.getLookupValidationParameters().put(ApplicationConsts.PRICELIST,customerVO.getPricelistCodeSal01SAL07());
        pars.getLookupValidationParameters().put(ApplicationConsts.VALIDATE_BARCODE,Boolean.TRUE);
      }

      res = ClientUtils.getData("validatePriceItemCode",pars);
      PriceItemVO priceItemVO = null;
      if (!res.isError()) {
View Full Code Here

Examples of org.openswing.swing.message.send.java.LookupValidationParams

    controlTotal.setValue(null);
    controlSubtotal.setValue(null);
    controlChange.setValue(null);
    labelSuggstmt.setText("\n \n");

    LookupValidationParams pars = new LookupValidationParams(defaultCustomerCode,new HashMap());
    pars.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,defaultCompanyCodeSys01);
    res = ClientUtils.getData("validateCustomerCode",pars);
    GridCustomerVO gridCustomerVO = null;
    if (!res.isError()) {
      java.util.List vos = ((VOListResponse)res).getRows();
      if (vos.size()==1)
View Full Code Here

Examples of org.openswing.swing.message.send.java.LookupValidationParams

          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() );

      }
View Full Code Here

Examples of org.openswing.swing.message.send.java.LookupValidationParams

    return "validateStoredSerialNumber";
  }


  public final Response executeCommand(Object inputPar,UserSessionParameters userSessionPars,HttpServletRequest request, HttpServletResponse response,HttpSession userSession,ServletContext context) {
    LookupValidationParams pars = (LookupValidationParams)inputPar;
    try {

      Warehouses bean = (Warehouses)JAIOBeanFactory.getInstance().getBean(Warehouses.class);
      Response answer = bean.validateStoredSerialNumber(pars,((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername());
View Full Code Here

Examples of org.openswing.swing.message.send.java.LookupValidationParams

    return "validateWarehouseCode";
  }


  public final Response executeCommand(Object inputPar,UserSessionParameters userSessionPars,HttpServletRequest request, HttpServletResponse response,HttpSession userSession,ServletContext context) {
    LookupValidationParams pars = (LookupValidationParams)inputPar;
    try {
      ArrayList companiesList = ((JAIOUserSessionParameters)userSessionPars).getCompanyBa().getCompaniesList("WAR01");
      Warehouses bean = (Warehouses)JAIOBeanFactory.getInstance().getBean(Warehouses.class);
      Response answer = bean.validateWarehouseCode(pars,((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername(),companiesList);
View Full Code Here

Examples of org.openswing.swing.message.send.java.LookupValidationParams

    return "validateManufactureCode";
  }


  public final Response executeCommand(Object inputPar,UserSessionParameters userSessionPars,HttpServletRequest request, HttpServletResponse response,HttpSession userSession,ServletContext context) {
    LookupValidationParams validationPars = (LookupValidationParams)inputPar;
    try {
      CustomizedWindows cust = ((JAIOUserSessionParameters)userSessionPars).getCustomizedWindows();
      ArrayList customizedFields = cust.getCustomizedFields(ApplicationConsts.ID_MANUFACTURE);
     
      Manufactures bean = (Manufactures)JAIOBeanFactory.getInstance().getBean(Manufactures.class);
View Full Code Here

Examples of org.openswing.swing.message.send.java.LookupValidationParams

    return "validateVatCode";
  }


  public final Response executeCommand(Object inputPar,UserSessionParameters userSessionPars,HttpServletRequest request, HttpServletResponse response,HttpSession userSession,ServletContext context) {
    LookupValidationParams validationPars = (LookupValidationParams)inputPar;
    try {
      CustomizedWindows cust = ((JAIOUserSessionParameters)userSessionPars).getCustomizedWindows();
      ArrayList customizedFields = cust.getCustomizedFields(new BigDecimal(162));

      Vats bean = (Vats)JAIOBeanFactory.getInstance().getBean(Vats.class);
View Full Code Here

Examples of org.openswing.swing.message.send.java.LookupValidationParams

        if (getInvoices()!=null)
          getInvoices().reloadCurrentBlockOfData();

          // check if there is only one instalment and this instalment has 0 instalment days
          DetailPurchaseDocVO vo = (DetailPurchaseDocVO)headerFormPanel.getVOModel().getValueObject();
          res = ClientUtils.getData("validatePaymentCode",new LookupValidationParams(vo.getPaymentCodeReg10DOC06(),new HashMap()));
          if (res.isError()) {
            OptionPane.showMessageDialog(
                  ClientUtils.getParentFrame(this),
                  res.getErrorMessage(),
                  ClientSettings.getInstance().getResources().getResource("invoice closing"),
View Full Code Here

Examples of org.openswing.swing.message.send.java.LookupValidationParams

        if (getInvoices()!=null)
          getInvoices().reloadCurrentBlockOfData();

          // check if there is only one instalment and this instalment has 0 instalment days
          DetailPurchaseDocVO vo = (DetailPurchaseDocVO)headerFormPanel.getVOModel().getValueObject();
          res = ClientUtils.getData("validatePaymentCode",new LookupValidationParams(vo.getPaymentCodeReg10DOC06(),new HashMap()));
          if (res.isError()) {
            OptionPane.showMessageDialog(
                  ClientUtils.getParentFrame(this),
                  res.getErrorMessage(),
                  ClientSettings.getInstance().getResources().getResource("invoice closing"),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.