Examples of PricelistVO


Examples of org.jallinone.sales.pricelist.java.PricelistVO

      pricelistController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          PricelistVO vo = (PricelistVO)pricelistController.getLookupVO();
          controlPricelistCode.setValue(vo.getPricelistCodeSAL01());
          controlPricelistDescr.setValue(vo.getDescriptionSYS10());
          controlCurrencyCode.setValue(vo.getCurrencyCodeReg03SAL01());
        }

        public void beforeLookupAction(ValueObject parentVO) {
        }

        public void forceValidate() {}

      });


      // initialize pricelist lookup parameters...
      DetailCallOutRequestVO vo = (DetailCallOutRequestVO)frame.getCalloutPanel().getVOModel().getValueObject();
      pricelistDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH03());
      pricelistDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH03());
      wareDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH03());
      wareDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH03());


      // credit account code lookup...
      creditDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH03());
      creditDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH03());
      controlCreditsCode.setLookupController(creditController);
      controlCreditsCode.setControllerMethodName("getAccounts");
      creditController.setLookupDataLocator(creditDataLocator);
      creditDataLocator.setGridMethodName("loadAccounts");
      creditDataLocator.setValidationMethodName("validateAccountCode");
      creditController.setFrameTitle("accounts");
      creditController.setLookupValueObjectClassName("org.jallinone.accounting.accounts.java.AccountVO");
//      creditController.addLookup2ParentLink("accountCodeACC02", "creditAccountCodeAcc02SAL07");
//      creditController.addLookup2ParentLink("descriptionSYS10","creditAccountDescrSAL07");
      creditController.setFramePreferedSize(new Dimension(400,400));
      creditController.setAllColumnVisible(false);
      creditController.setVisibleColumn("accountCodeACC02", true);
      creditController.setVisibleColumn("descriptionSYS10", true);
      creditController.setPreferredWidthColumn("accountCodeACC02", 100);
      creditController.setPreferredWidthColumn("descriptionSYS10", 290);
      creditController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          AccountVO vo = (AccountVO)creditController.getLookupVO();
          controlCreditsCode.setValue(vo.getAccountCodeACC02());
          controlCreditsDescr.setValue(vo.getDescriptionSYS10());
        }

        public void beforeLookupAction(ValueObject parentVO) {
        }

        public void forceValidate() {}

      });


      // items account code lookup...
      itemsDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH03());
      itemsDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH03());
      controlItemsCode.setLookupController(itemsController);
      controlItemsCode.setControllerMethodName("getAccounts");
      itemsController.setLookupDataLocator(itemsDataLocator);
      itemsDataLocator.setGridMethodName("loadAccounts");
      itemsDataLocator.setValidationMethodName("validateAccountCode");
      itemsController.setFrameTitle("accounts");
      itemsController.setLookupValueObjectClassName("org.jallinone.accounting.accounts.java.AccountVO");
//      itemsController.addLookup2ParentLink("accountCodeACC02", "itemsAccountCodeAcc02SAL07");
//      itemsController.addLookup2ParentLink("descriptionSYS10","itemsAccountDescrSAL07");
      itemsController.setFramePreferedSize(new Dimension(400,400));
      itemsController.setAllColumnVisible(false);
      itemsController.setVisibleColumn("accountCodeACC02", true);
      itemsController.setVisibleColumn("descriptionSYS10", true);
      itemsController.setPreferredWidthColumn("accountCodeACC02", 100);
      itemsController.setPreferredWidthColumn("descriptionSYS10", 290);
      itemsController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          AccountVO vo = (AccountVO)itemsController.getLookupVO();
          controlItemsCode.setValue(vo.getAccountCodeACC02());
          controlItemsDescr.setValue(vo.getDescriptionSYS10());
        }

        public void beforeLookupAction(ValueObject parentVO) { }

        public void forceValidate() {}

      });


      // activities account code lookup...
      actDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH03());
      actDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH03());
      controlActCode.setLookupController(actController);
      controlActCode.setControllerMethodName("getAccounts");
      actController.setLookupDataLocator(actDataLocator);
      actDataLocator.setGridMethodName("loadAccounts");
      actDataLocator.setValidationMethodName("validateAccountCode");
      actController.setFrameTitle("accounts");
      actController.setLookupValueObjectClassName("org.jallinone.accounting.accounts.java.AccountVO");
//      actController.addLookup2ParentLink("accountCodeACC02", "activitiesAccountCodeAcc02SAL07");
//      actController.addLookup2ParentLink("descriptionSYS10","activitiesAccountDescrSAL07");
      actController.setFramePreferedSize(new Dimension(400,400));
      actController.setAllColumnVisible(false);
      actController.setVisibleColumn("accountCodeACC02", true);
      actController.setVisibleColumn("descriptionSYS10", true);
      actController.setPreferredWidthColumn("accountCodeACC02", 100);
      actController.setPreferredWidthColumn("descriptionSYS10", 290);
      actController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          AccountVO vo = (AccountVO)actController.getLookupVO();
          controlActCode.setValue(vo.getAccountCodeACC02());
          controlActDescr.setValue(vo.getDescriptionSYS10());
        }

        public void beforeLookupAction(ValueObject parentVO) { }

        public void forceValidate() {}

      });


      // charges account code lookup...
      chargesDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH03());
      chargesDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH03());
      controlChargesCode.setLookupController(chargesController);
      controlChargesCode.setControllerMethodName("getAccounts");
      chargesController.setLookupDataLocator(chargesDataLocator);
      chargesDataLocator.setGridMethodName("loadAccounts");
      chargesDataLocator.setValidationMethodName("validateAccountCode");
      chargesController.setFrameTitle("accounts");
      chargesController.setLookupValueObjectClassName("org.jallinone.accounting.accounts.java.AccountVO");
//      chargesController.addLookup2ParentLink("accountCodeACC02", "chargesAccountCodeAcc02SAL07");
//      chargesController.addLookup2ParentLink("descriptionSYS10","chargesAccountDescrSAL07");
      chargesController.setFramePreferedSize(new Dimension(400,400));
      chargesController.setAllColumnVisible(false);
      chargesController.setVisibleColumn("accountCodeACC02", true);
      chargesController.setVisibleColumn("descriptionSYS10", true);
      chargesController.setPreferredWidthColumn("accountCodeACC02", 100);
      chargesController.setPreferredWidthColumn("descriptionSYS10", 290);
      chargesController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          AccountVO vo = (AccountVO)chargesController.getLookupVO();
          controlChargesCode.setValue(vo.getAccountCodeACC02());
          controlChargesDescr.setValue(vo.getDescriptionSYS10());
        }

        public void beforeLookupAction(ValueObject parentVO) { }

        public void forceValidate() {}

      });


      // set default values...
      HashMap map = new HashMap();
      map.put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH03());
      map.put(ApplicationConsts.PARAM_CODE,ApplicationConsts.CREDITS_ACCOUNT);
      Response response = ClientUtils.getData("loadUserParam",map);
      if (!response.isError()) {
        String code = (String)((VOResponse)response).getVo();
        controlCreditsCode.setValue(code);
        controlCreditsCode.getLookupController().forceValidate();
      }

      map.clear();
      map.put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH03());
      map.put(ApplicationConsts.PARAM_CODE,ApplicationConsts.ITEMS_ACCOUNT);
      response = ClientUtils.getData("loadUserParam",map);
      if (!response.isError()) {
        String code = (String)((VOResponse)response).getVo();
        controlItemsCode.setValue(code);
        controlItemsCode.getLookupController().forceValidate();
      }

      map.clear();
      map.put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH03());
      map.put(ApplicationConsts.PARAM_CODE,ApplicationConsts.ACTIVITIES_ACCOUNT);
      response = ClientUtils.getData("loadUserParam",map);
      if (!response.isError()) {
        String code = (String)((VOResponse)response).getVo();
        controlActCode.setValue(code);
        controlActCode.getLookupController().forceValidate();
      }

      map.clear();
      map.put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01SCH03());
      map.put(ApplicationConsts.PARAM_CODE,ApplicationConsts.CHARGES_ACCOUNT);
      response = ClientUtils.getData("loadUserParam",map);
      if (!response.isError()) {
        String code = (String)((VOResponse)response).getVo();
        controlChargesCode.setValue(code);
        controlChargesCode.getLookupController().forceValidate();
      }


      // check if there exist a customer with the specified progressive in REG04...
      String subjectTypeREG04 = null;
      if (vo.getSubjectTypeReg04SCH03().equals(ApplicationConsts.SUBJECT_ORGANIZATION))
        subjectTypeREG04 = ApplicationConsts.SUBJECT_ORGANIZATION_CUSTOMER;
      else
        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());
View Full Code Here

Examples of org.jallinone.sales.pricelist.java.PricelistVO

    // add to the domain about data import type:
    // - sale pricelists
    res = ClientUtils.getData("loadPricelists",new GridParams());
    if (!res.isError()) {
      PricelistVO vo = null;
      java.util.List list = ((VOListResponse)res).getRows();
      for(int i=0;i<list.size();i++) {
        vo = (PricelistVO)list.get(i);
        ditVO = new DataImportType();
        ditVO.comboItemIndex = pos++;
        ditVO.subTypeCode = vo.getPricelistCodeSAL01();
        ditVO.className = ImportSalePricesDescriptorVO.class.getName();
        ditVO.companyCodeSys01 = vo.getCompanyCodeSys01SAL01();

        dit.addDomainPair(
          ditVO,
          ClientSettings.getInstance().getResources().getResource("import sale prices")+" "+
          ClientSettings.getInstance().getResources().getResource("for pricelist")+" "+vo.getDescriptionSYS10()
        );
      }
    }

    // add to the domain about data import type:
    // - supplier items
    res = ClientUtils.getData("loadSuppliers",new GridParams());
    if (!res.isError()) {
      GridSupplierVO vo = null;
      ItemTypeVO itemTypeVO = null;
      java.util.List list = ((VOListResponse)res).getRows();
      for(int i=0;i<list.size();i++) {
        vo = (GridSupplierVO)list.get(i);
        for(int j=0;j<itemTypesList.size();j++) {
          itemTypeVO = (ItemTypeVO)itemTypesList.get(j);
          ditVO = new DataImportType();
          ditVO.comboItemIndex = pos++;
          ditVO.subTypeCode = vo.getProgressiveREG04();
          ditVO.subTypeCode2 = itemTypeVO.getProgressiveHie02ITM02();
          ditVO.progressiveHIE02 = itemTypeVO.getProgressiveHie02ITM02();
          ditVO.className = ImportSupplierItemsDescriptorVO.class.getName();
          ditVO.companyCodeSys01 = vo.getCompanyCodeSys01REG04();

          dit.addDomainPair(
            ditVO,
            ClientSettings.getInstance().getResources().getResource("import")+" "+
            itemTypeVO.getDescriptionSYS10()+" "+
            ClientSettings.getInstance().getResources().getResource("for supplier")+" "+
            vo.getName_1REG04()
          );
        }
      }
    }

    // add to the domain about data import type:
    // - supplier prices
    res = ClientUtils.getData("loadSupplierPricelists",new GridParams());
    if (!res.isError()) {
      SupplierPricelistVO vo = null;
      java.util.List list = ((VOListResponse)res).getRows();
      for(int i=0;i<list.size();i++) {
        vo = (SupplierPricelistVO)list.get(i);
        ditVO = new DataImportType();
        ditVO.comboItemIndex = pos++;
        ditVO.subTypeCode = vo.getPricelistCodePUR03();
        ditVO.subTypeCode2 = vo.getProgressiveReg04PUR03();
        ditVO.className = ImportSupplierPricesDescriptorVO.class.getName();
        ditVO.companyCodeSys01 = vo.getCompanyCodeSys01PUR03();

        dit.addDomainPair(
          ditVO,
          ClientSettings.getInstance().getResources().getResource("import prices")+" "+
          ClientSettings.getInstance().getResources().getResource("for supplier")+" "+
          vo.getName_1REG04()+" "+
          ClientSettings.getInstance().getResources().getResource("in pricelist")+" "+vo.getDescriptionSYS10()
        );
      }
    }

    controlImportType.setDomain(dit);
    controlImportType.addItemListener(new ItemListener() {

      public void itemStateChanged(ItemEvent e) {
        if (e.getStateChange()==e.SELECTED) {
          DataImportType vo = (DataImportType)controlImportType.getValue();
          ETLProcessVO processVO = (ETLProcessVO)mainPanel.getVOModel().getValueObject();
          processVO.setCompanyCodeSys01SYS23(vo.companyCodeSys01);
          processVO.setClassNameSYS23(vo.className);
          processVO.setProgressiveHIE02(vo.progressiveHIE02);
          processVO.setSubTypeValueSYS23(vo.subTypeCode);
          processVO.setSubTypeValue2SYS23(vo.subTypeCode2);
          grid.clearData();
          grid.getOtherGridParams().put(ApplicationConsts.FILTER_VO,processVO);
          grid.reloadData();
          grid.setMode(Consts.EDIT);
          controlDescr.setValue(controlImportType.getComboBox().getSelectedItem());
        }
      }

    });


    Domain d = new Domain("FILE_TYPES");
    d.addDomainPair(XLS,"Excel");
    d.addDomainPair(CSV1,"CSV(;)");
    d.addDomainPair(CSV2,"CSV(,)");
    d.addDomainPair(TXT,"Txt file");
    controlFormat.setDomain(d);
    controlFormat.addItemListener(new ItemListener() {

      public void itemStateChanged(ItemEvent e) {
        if (e.getStateChange()==e.SELECTED) {
          ETLProcessVO vo = (ETLProcessVO)getMainPanel().getVOModel().getValueObject();
          vo.setLocalFile(null);
          controlLocalFile.setText("");
          controlRemoteFile.setText("");
        }
      }
View Full Code Here

Examples of org.jallinone.sales.pricelist.java.PricelistVO

    colItemType.setDomain(d);
    colItemType.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent e) {
        if (e.getStateChange()==e.SELECTED) {
          PriceVO vo = (PriceVO)pricesGrid.getVOListTableModel().getObjectForRow(pricesGrid.getSelectedRow());
          PricelistVO pricelistVO = (PricelistVO)getPricesGrid().getOtherGridParams().get(ApplicationConsts.PRICELIST);
          vo.setItemCodeItm01SAL02(null);
          int selIndex = ((JComboBox)e.getSource()).getSelectedIndex();
          Object selValue = d.getDomainPairList()[selIndex].getCode();
          treeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.PROGRESSIVE_HIE02,selValue);
          treeLevelDataLocator.getTreeNodeParams().put(ApplicationConsts.COMPANY_CODE_SYS01,pricelistVO.getCompanyCodeSys01SAL01());
          itemDataLocator.getLookupFrameParams().put(ApplicationConsts.PROGRESSIVE_HIE02,selValue);
          itemDataLocator.getLookupValidationParameters().put(ApplicationConsts.PROGRESSIVE_HIE02,selValue);
          itemDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,pricelistVO.getCompanyCodeSys01SAL01());
          itemDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,pricelistVO.getCompanyCodeSys01SAL01());
          vo.setCompanyCodeSys01SAL02(pricelistVO.getCompanyCodeSys01SAL01());
          vo.setPricelistCodeSal01SAL02(pricelistVO.getPricelistCodeSAL01());
        }
      }
    });
  }
View Full Code Here

Examples of org.jallinone.sales.pricelist.java.PricelistVO

  /**
   * Method invoked when pressing advanced button: it will show a dialog window to apply changes on the whole items of the current pricelist.
   */
  void advancedButton_actionPerformed(ActionEvent e) {
    if (grid.getSelectedRow()!=-1) {
      PricelistVO vo = (PricelistVO) grid.getVOListTableModel().getObjectForRow(grid.getSelectedRow());
      new AdvancedOptionsDialog(this,new PricelistChanges(
          vo.getCompanyCodeSys01SAL01(),
          vo.getPricelistCodeSAL01()
      ));
    }
  }
View Full Code Here

Examples of org.jallinone.sales.pricelist.java.PricelistVO

  /**
   * Method invoked when pressing import all items button: it will show a dialog window to apply specified settings on the whole imported items, inside the current pricelist.
   */
  void impAllButton_actionPerformed(ActionEvent e) {
    if (grid.getSelectedRow()!=-1) {
      final PricelistVO vo = (PricelistVO) grid.getVOListTableModel().getObjectForRow(grid.getSelectedRow());
      ArrayList list = new ArrayList();
      new ImportItemsDialog(list,new ImportItems() {
        public void saveItems(ArrayList items,Date startDate,Date endDate,BigDecimal price) {
          PricelistChanges itemsVO = new PricelistChanges(
            vo.getCompanyCodeSys01SAL01(),
            vo.getPricelistCodeSAL01()
          );
          itemsVO.setStartDate(new java.sql.Date(startDate.getTime()));
          itemsVO.setEndDate(new java.sql.Date(endDate.getTime()));
          itemsVO.setDeltaValue(price);
          Response res = ClientUtils.getData("importAllItems",itemsVO);
View Full Code Here

Examples of org.jallinone.sales.pricelist.java.PricelistVO

        return true;
      }


      public int getDecimals(int row) {
        PricelistVO vo = (PricelistVO)grid.getVOListTableModel().getObjectForRow(grid.getSelectedRow());
        if (vo!=null && vo.getDecimalsREG03()!=null)
          return vo.getDecimalsREG03().intValue();
        else
          return 0;
      }
View Full Code Here

Examples of org.jallinone.sales.pricelist.java.PricelistVO

          return 0;
      }


      public String getCurrencySymbol(int row) {
        PricelistVO vo = (PricelistVO)grid.getVOListTableModel().getObjectForRow(grid.getSelectedRow());
        if (vo!=null && vo.getCurrencySymbolREG03()!=null)
          return vo.getCurrencySymbolREG03();
        else
        return "E";
      }
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.