Examples of CurrencyVO


Examples of org.jallinone.registers.currency.java.CurrencyVO

      pars = new LookupValidationParams(newVO.getCurrencyCodeReg03DOC01(),new HashMap());
      Response currResponse = currBean.validateCurrencyCode(pars,serverLanguageId,username,new ArrayList());
      if (currResponse.isError())
        throw new Exception(currResponse.getErrorMessage());

      CurrencyVO currVO = (CurrencyVO)((VOListResponse)currResponse).getRows().get(0);
      newVO.setCurrencySymbolREG03(currVO.getCurrencySymbolREG03());
      newVO.setDecimalSymbolREG03(currVO.getDecimalSymbolREG03());
      newVO.setThousandSymbolREG03(currVO.getThousandSymbolREG03());
      newVO.setDecimalsREG03(currVO.getDecimalsREG03());

      Map attribute2dbField = new HashMap();
      attribute2dbField.put("companyCodeSys01DOC01","COMPANY_CODE_SYS01");
      attribute2dbField.put("docTypeDOC01","DOC_TYPE");
      attribute2dbField.put("docStateDOC01","DOC_STATE");
View Full Code Here

Examples of org.jallinone.registers.currency.java.CurrencyVO

      // retrieve currency info...
      pars = new LookupValidationParams(vo.getCurrencyCodeReg03DOC01(),new HashMap());
      Response currResponse = currBean.validateCurrencyCode(pars,serverLanguageId,username,new ArrayList());
      if (currResponse.isError())
        throw new Exception(currResponse.getErrorMessage());
      CurrencyVO currVO = (CurrencyVO)((VOListResponse)currResponse).getRows().get(0);
      vo.setCurrencySymbolREG03(currVO.getCurrencySymbolREG03());
      vo.setDecimalSymbolREG03(currVO.getDecimalSymbolREG03());
      vo.setThousandSymbolREG03(currVO.getThousandSymbolREG03());
      vo.setDecimalsREG03(currVO.getDecimalsREG03());

      // generate internal progressive for doc. number...
      vo.setDocNumberDOC01(CompanyProgressiveUtils.getInternalProgressive(vo.getCompanyCodeSys01DOC01(),"DOC01_SELLING","DOC_NUMBER",conn));

      // if doc type is estimate, then generate progressive for doc sequence, too...
View Full Code Here

Examples of org.jallinone.registers.currency.java.CurrencyVO

            clearGrid();

            // retrieve currency code related to the current company...
            Response res = ClientUtils.getData("loadCompanyCurrency",controlCompaniesCombo.getValue());
            if (!res.isError()) {
              final CurrencyVO vo = (CurrencyVO)((VOResponse)res).getVo();
              currencyDecimals = vo.getDecimalsREG03().intValue();
              JournalHeaderWithVatVO jhVO = (JournalHeaderWithVatVO)headerPanel.getVOModel().getValueObject();
              jhVO.setCurrencyCodeREG01(vo.getCurrencyCodeREG03());

              // set currency settings on currency controls...
              controlTaxableIncome.setCurrencySymbol(vo.getCurrencySymbolREG03());
              controlTaxableIncome.setDecimals(vo.getDecimalsREG03().intValue());
              controlTaxableIncome.setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
              controlTaxableIncome.setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

              colTaxableIncome.setDynamicSettings(new CurrencyColumnSettings() {

                public String getCurrencySymbol(int row) {
                  return vo.getCurrencySymbolREG03();
                }
                public int getDecimals(int row) {
                  return vo.getDecimalsREG03().intValue();
                }
                public double getMaxValue(int row) {
                  return Double.MAX_VALUE;
                }
                public double getMinValue(int row) {
                  return Double.MIN_VALUE;
                }
                public boolean isGrouping(int row) {
                  return true;
                }

              });

            }
          }
        }
      });



      // set controller on the header form...
      headerPanel.setFormController(controller);


      // motive code lookup...
      controlMotive.setLookupController(motiveController);
      controlMotive.setControllerMethodName("getAccountMotives");
      motiveController.setForm(headerPanel);
      motiveController.setLookupDataLocator(motiveDataLocator);
      motiveDataLocator.setGridMethodName("loadAccountingMotives");
      motiveDataLocator.setValidationMethodName("validateAccountingMotiveCode");
      motiveController.setFrameTitle("accountingMotives");
      motiveController.setLookupValueObjectClassName("org.jallinone.accounting.accountingmotives.java.AccountingMotiveVO");
      motiveController.addLookup2ParentLink("accountingMotiveCodeACC03", "accountingMotiveCodeAcc03ACC05");
      motiveController.addLookup2ParentLink("descriptionSYS10","motiveDescrACC05");
      motiveController.setFramePreferedSize(new Dimension(400,400));
      motiveController.setAllColumnVisible(false);
      motiveController.setVisibleColumn("accountingMotiveCodeACC03",true);
      motiveController.setVisibleColumn("descriptionSYS10",true);
      motiveController.setPreferredWidthColumn("descriptionSYS10",290);
      motiveController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
        }

        public void beforeLookupAction(ValueObject parentVO) {
          motiveDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
          motiveDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
        }

        public void forceValidate() {}

      });


      // register code lookup...
      controlRegCode.setLookupController(regController);
      controlRegCode.setControllerMethodName("getVatRegisters");
      regController.setForm(headerPanel);
      regController.setLookupDataLocator(regDataLocator);
      regDataLocator.setGridMethodName("loadVatRegisters");
      regDataLocator.setValidationMethodName("validateVatRegisterCode");
      regController.setFrameTitle("vat registers");
      regController.setLookupValueObjectClassName("org.jallinone.accounting.vatregisters.java.VatRegisterVO");
      regController.addLookup2ParentLink("registerCodeACC04", "registerCodeACC04");
      regController.addLookup2ParentLink("descriptionSYS10","registerDescriptionACC04");
      regController.addLookup2ParentLink("accountCodeAcc02ACC04","accountCodeAcc02ACC04");
      regController.addLookup2ParentLink("accountDescriptionACC04","accountDescriptionACC04");
      regController.setFramePreferedSize(new Dimension(400,400));
      regController.setAllColumnVisible(false);
      regController.setVisibleColumn("registerCodeACC04",true);
      regController.setVisibleColumn("descriptionSYS10",true);
      regController.setPreferredWidthColumn("descriptionSYS10",290);
      regController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
        }

        public void beforeLookupAction(ValueObject parentVO) {
          regDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
          regDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
        }

        public void forceValidate() {}

      });


      // vat code lookup...
      controlVatCode.setLookupController(vatController);
      controlVatCode.setControllerMethodName("getVatsList");
      vatController.setForm(detailPanel);
      vatController.setLookupDataLocator(vatDataLocator);
      vatDataLocator.setGridMethodName("loadVats");
      vatDataLocator.setValidationMethodName("validateVatCode");
      vatController.setFrameTitle("vats");
      vatController.setLookupValueObjectClassName("org.jallinone.registers.vat.java.VatVO");
      vatController.addLookup2ParentLink("vatCodeREG01", "vatCodeREG01");
      vatController.addLookup2ParentLink("descriptionSYS10","vatDescriptionREG01");
      vatController.addLookup2ParentLink("valueREG01","valueREG01");
      vatController.addLookup2ParentLink("deductibleREG01","deductibleREG01");
      vatController.setFramePreferedSize(new Dimension(400,400));
      vatController.setAllColumnVisible(false);
      vatController.setVisibleColumn("vatCodeREG01",true);
      vatController.setVisibleColumn("descriptionSYS10",true);
      vatController.setPreferredWidthColumn("descriptionSYS10",290);
      vatController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {}

        public void beforeLookupAction(ValueObject parentVO) {}

        public void forceValidate() {}

      });


      // payment code lookup...
      controlPayCode.setLookupController(paymentController);
      controlPayCode.setControllerMethodName("getPaymentsList");
      paymentController.setForm(headerPanel);
      paymentController.setLookupDataLocator(paymentDataLocator);
      paymentDataLocator.setGridMethodName("loadPayments");
      paymentDataLocator.setValidationMethodName("validatePaymentCode");
      paymentController.setFrameTitle("payments");
      paymentController.setLookupValueObjectClassName("org.jallinone.registers.payments.java.PaymentVO");
      paymentController.addLookup2ParentLink("paymentCodeREG10", "paymentCodeREG10");
      paymentController.addLookup2ParentLink("descriptionSYS10","paymentDescriptionREG10");
      paymentController.setFramePreferedSize(new Dimension(400,400));
      paymentController.setAllColumnVisible(false);
      paymentController.setVisibleColumn("paymentCodeREG10",true);
      paymentController.setVisibleColumn("descriptionSYS10",true);
      paymentController.setPreferredWidthColumn("descriptionSYS10",290);
      paymentController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {}

        public void beforeLookupAction(ValueObject parentVO) {
          paymentDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
          paymentDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
        }

        public void forceValidate() {}

      });


      // account code lookup...
      controlAcode.setLookupController(accountController);
      controlAcode.setControllerMethodName("getAccounts");
      accountController.setForm(detailPanel);
      accountController.setLookupDataLocator(accountDataLocator);
      accountDataLocator.setGridMethodName("loadAccounts");
      accountDataLocator.setValidationMethodName("validateAccountCode");
      accountController.setFrameTitle("accounts");
      accountController.setLookupValueObjectClassName("org.jallinone.accounting.accounts.java.AccountVO");
      accountController.addLookup2ParentLink("accountCodeACC02", "accountCodeACC06");
      accountController.addLookup2ParentLink("descriptionSYS10","accountDescriptionACC06");
      accountController.setFramePreferedSize(new Dimension(400,400));
      accountController.setAllColumnVisible(false);
      accountController.setVisibleColumn("accountCodeACC02",true);
      accountController.setVisibleColumn("descriptionSYS10",true);
      accountController.setPreferredWidthColumn("descriptionSYS10",290);
      accountController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          AccountVO accountVO = (AccountVO)accountController.getLookupVO();
          JournalRowVO vo = (JournalRowVO)detailPanel.getVOModel().getValueObject();
          vo.setAccountCodeAcc02ACC06(accountVO.getAccountCodeACC02());
          vo.setAccountCodeACC06(accountVO.getAccountCodeACC02());
//          controlAcode.setValue(accountVO.getAccountCodeACC02());
        }

        public void beforeLookupAction(ValueObject parentVO) {
          accountDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
          accountDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
        }

        public void forceValidate() {}

      });


      // customer lookup...
      customerDataLocator.setGridMethodName("loadCustomers");
      customerDataLocator.setValidationMethodName("validateCustomerCode");
      controlCcode.setLookupController(customerController);
      controlCcode.setControllerMethodName("getCustomersList");
      customerController.setForm(headerPanel);
      customerController.setLookupDataLocator(customerDataLocator);
      customerController.setFrameTitle("customers");
      customerController.setLookupValueObjectClassName("org.jallinone.sales.customers.java.GridCustomerVO");
      customerController.addLookup2ParentLink("customerCodeSAL07","customerCodeSAL07");
      customerController.addLookup2ParentLink("name_1REG04", "name_1REG04");
      customerController.addLookup2ParentLink("progressiveREG04", "progressiveREG04");
      customerController.setAllColumnVisible(false);
      customerController.setVisibleColumn("companyCodeSys01REG04", true);
      customerController.setVisibleColumn("customerCodeSAL07", true);
      customerController.setVisibleColumn("name_1REG04", true);
      customerController.setVisibleColumn("name_2REG04", true);
      customerController.setVisibleColumn("cityREG04", true);
      customerController.setVisibleColumn("provinceREG04", true);
      customerController.setVisibleColumn("countryREG04", true);
      customerController.setVisibleColumn("taxCodeREG04", true);
      customerController.setHeaderColumnName("cityREG04", "city");
      customerController.setHeaderColumnName("provinceREG04", "prov");
      customerController.setHeaderColumnName("countryREG04", "country");
      customerController.setHeaderColumnName("taxCodeREG04", "taxCode");
      customerController.setPreferredWidthColumn("name_1REG04", 200);
      customerController.setPreferredWidthColumn("name_2REG04", 150);
      customerController.setFramePreferedSize(new Dimension(750,500));
      customerDataLocator.getLookupFrameParams().put(ApplicationConsts.FILTER_COMPANY_FOR_INSERT,"ACC05_NEW_ITEM_VAT");
      customerDataLocator.getLookupValidationParameters().put(ApplicationConsts.FILTER_COMPANY_FOR_INSERT,"ACC05_NEW_ITEM_VAT");
      customerController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          GridCustomerVO custVO = (GridCustomerVO)customerController.getLookupVO();
          JournalHeaderWithVatVO vo = (JournalHeaderWithVatVO)headerPanel.getVOModel().getValueObject();
          vo.setCreditAccountCodeAcc02SAL07(custVO.getCreditAccountCodeAcc02SAL07());
        }

        public void beforeLookupAction(ValueObject parentVO) {
          customerDataLocator.getLookupFrameParams().put(ApplicationConsts.SUBJECT_TYPE,ApplicationConsts.SUBJECT_ORGANIZATION_CUSTOMER);
          customerDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
          customerDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
          customerController.setHeaderColumnName("name_1REG04", "corporateName1");
          customerController.setHeaderColumnName("name_2REG04", "corporateName2");
        }

        public void forceValidate() {}

      });



      // supplier lookup...
      supplierDataLocator.setGridMethodName("loadSuppliers");
      supplierDataLocator.setValidationMethodName("validateSupplierCode");
      controlScode.setLookupController(supplierController);
      controlScode.setControllerMethodName("getSuppliersList");
      supplierController.setForm(headerPanel);
      supplierController.setLookupDataLocator(supplierDataLocator);
      supplierController.setFrameTitle("suppliers");
      supplierController.setLookupValueObjectClassName("org.jallinone.purchases.suppliers.java.GridSupplierVO");
      supplierController.addLookup2ParentLink("supplierCodePUR01","supplierCodePUR01");
      supplierController.addLookup2ParentLink("name_1REG04", "name_1REG04");
      supplierController.addLookup2ParentLink("progressiveREG04", "progressiveREG04");
      supplierController.setAllColumnVisible(false);
      supplierController.setVisibleColumn("companyCodeSys01REG04", true);
      supplierController.setVisibleColumn("supplierCodePUR01", true);
      supplierController.setVisibleColumn("name_1REG04", true);
      supplierController.setVisibleColumn("name_2REG04", true);
      supplierController.setVisibleColumn("cityREG04", true);
      supplierController.setVisibleColumn("provinceREG04", true);
      supplierController.setVisibleColumn("countryREG04", true);
      supplierController.setVisibleColumn("taxCodeREG04", true);
      supplierController.setHeaderColumnName("name_1REG04", "corporateName1");
      supplierController.setHeaderColumnName("cityREG04", "city");
      supplierController.setHeaderColumnName("provinceREG04", "prov");
      supplierController.setHeaderColumnName("countryREG04", "country");
      supplierController.setHeaderColumnName("taxCodeREG04", "taxCode");
      supplierController.setPreferredWidthColumn("name_1REG04", 200);
      supplierController.setPreferredWidthColumn("name_2REG04", 150);
      supplierController.setFramePreferedSize(new Dimension(750,500));
      supplierDataLocator.getLookupFrameParams().put(ApplicationConsts.FILTER_COMPANY_FOR_INSERT,"ACC05_NEW_ITEM_VAT");
      supplierDataLocator.getLookupValidationParameters().put(ApplicationConsts.FILTER_COMPANY_FOR_INSERT,"ACC05_NEW_ITEM_VAT");
      supplierController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          GridSupplierVO supplierVO = (GridSupplierVO)supplierController.getLookupVO();
          JournalHeaderWithVatVO vo = (JournalHeaderWithVatVO)headerPanel.getVOModel().getValueObject();
          vo.setDebitAccountCodeAcc02PUR01(supplierVO.getDebitAccountCodeAcc02PUR01());
        }

        public void beforeLookupAction(ValueObject parentVO) {
          supplierDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
          supplierDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
View Full Code Here

Examples of org.jallinone.registers.currency.java.CurrencyVO

    }


    Response res = ClientUtils.getData("loadCompanyCurrency",vo.getCompanyCodeSys01ITM01());
    if (!res.isError()) {
      CurrencyVO currVO = (CurrencyVO)((VOResponse)res).getVo();
      String pattern = currVO.getCurrencySymbolREG03()+" #,##0.";
      for(int i=0;i<currVO.getDecimalsREG03().intValue();i++)
        pattern += "0";
      if (currVO.getDecimalsREG03().intValue()==0)
        pattern = "#";

      DecimalFormat currFormatter = new DecimalFormat(pattern);
      explosionPanel.setColumnFormatter("valuePUR04",currFormatter);
      explosionPanel.setColumnFormatter("totalPrices",currFormatter);
View Full Code Here

Examples of org.jallinone.registers.currency.java.CurrencyVO

      compCurr.setConn(conn); // use same transaction...

      Response res = compCurr.loadCompanyCurrency(pk.getCompanyCodeSys01ITM01(),serverLanguageId,username,customizedFields);
      if (res.isError())
        throw new Exception(res.getErrorMessage());
      CurrencyVO currVO = (CurrencyVO)((VOResponse)res).getVo();
      String pattern = currVO.getCurrencySymbolREG03()+" #"+currVO.getThousandSymbolREG03()+"##0"+currVO.getDecimalSymbolREG03();
      if (currVO.getDecimalsREG03().intValue()>0)
        for(int i=0;i<currVO.getDecimalsREG03().intValue();i++)
          pattern += "0";
      else
        pattern = "#";
      DecimalFormat format = new DecimalFormat(pattern);
      DecimalFormat qtyFormat = new DecimalFormat("###,##");
View Full Code Here

Examples of org.jallinone.registers.currency.java.CurrencyVO

            clearGrid();

            // retrieve currency code related to the current company...
            Response res = ClientUtils.getData("loadCompanyCurrency",controlCompaniesCombo.getValue());
            if (!res.isError()) {
              final CurrencyVO vo = (CurrencyVO)((VOResponse)res).getVo();

              // set currency settings on currency controls...
              controlDebit.setCurrencySymbol(vo.getCurrencySymbolREG03());
              controlDebit.setDecimals(vo.getDecimalsREG03().intValue());
              controlDebit.setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
              controlDebit.setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

              controlCredit.setCurrencySymbol(vo.getCurrencySymbolREG03());
              controlCredit.setDecimals(vo.getDecimalsREG03().intValue());
              controlCredit.setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
              controlCredit.setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

              controlTotDebit.setCurrencySymbol(vo.getCurrencySymbolREG03());
              controlTotDebit.setDecimals(vo.getDecimalsREG03().intValue());
              controlTotDebit.setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
              controlTotDebit.setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

              controlTotCredit.setCurrencySymbol(vo.getCurrencySymbolREG03());
              controlTotCredit.setDecimals(vo.getDecimalsREG03().intValue());
              controlTotCredit.setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
              controlTotCredit.setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

              controlSbil.setCurrencySymbol(vo.getCurrencySymbolREG03());
              controlSbil.setDecimals(vo.getDecimalsREG03().intValue());
              controlSbil.setDecimalSymbol(vo.getDecimalSymbolREG03().charAt(0));
              controlSbil.setGroupingSymbol(vo.getThousandSymbolREG03().charAt(0));

              colCredit.setDynamicSettings(new CurrencyColumnSettings() {

                public String getCurrencySymbol(int row) {
                  return vo.getCurrencySymbolREG03();
                }
                public int getDecimals(int row) {
                  return vo.getDecimalsREG03().intValue();
                }
                public double getMaxValue(int row) {
                  return Double.MAX_VALUE;
                }
                public double getMinValue(int row) {
                  return Double.MIN_VALUE;
                }
                public boolean isGrouping(int row) {
                  return true;
                }

              });

              colDebit.setDynamicSettings(new CurrencyColumnSettings() {

                public String getCurrencySymbol(int row) {
                  return vo.getCurrencySymbolREG03();
                }
                public int getDecimals(int row) {
                  return vo.getDecimalsREG03().intValue();
                }
                public double getMaxValue(int row) {
                  return Double.MAX_VALUE;
                }
                public double getMinValue(int row) {
                  return Double.MIN_VALUE;
                }
                public boolean isGrouping(int row) {
                  return true;
                }

              });

            }
          }
        }
      });


      // set controller on the header form...
      headerPanel.setFormController(controller);


      // start motive code lookup...
      controlMotive.setLookupController(motiveController);
      controlMotive.setControllerMethodName("getAccountMotives");
      motiveController.setForm(headerPanel);
      motiveController.setLookupDataLocator(motiveDataLocator);
      motiveDataLocator.setGridMethodName("loadAccountingMotives");
      motiveDataLocator.setValidationMethodName("validateAccountingMotiveCode");
      motiveController.setFrameTitle("accountingMotives");
      motiveController.setLookupValueObjectClassName("org.jallinone.accounting.accountingmotives.java.AccountingMotiveVO");
      motiveController.addLookup2ParentLink("accountingMotiveCodeACC03", "accountingMotiveCodeAcc03ACC05");
      motiveController.addLookup2ParentLink("descriptionSYS10","motiveDescrACC05");
      motiveController.setFramePreferedSize(new Dimension(400,400));
      motiveController.setAllColumnVisible(false);
      motiveController.setVisibleColumn("accountingMotiveCodeACC03",true);
      motiveController.setVisibleColumn("descriptionSYS10",true);
      motiveController.setPreferredWidthColumn("descriptionSYS10",290);
      motiveController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
        }

        public void beforeLookupAction(ValueObject parentVO) {
          motiveDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
          motiveDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
        }

        public void forceValidate() {}

      });


      // account code lookup...
      controlAcode.setLookupController(accountController);
      controlAcode.setControllerMethodName("getAccounts");
      accountController.setForm(detailPanel);
      accountController.setLookupDataLocator(accountDataLocator);
      accountDataLocator.setGridMethodName("loadAccounts");
      accountDataLocator.setValidationMethodName("validateAccountCode");
      accountController.setFrameTitle("accounts");
      accountController.setLookupValueObjectClassName("org.jallinone.accounting.accounts.java.AccountVO");
      accountController.addLookup2ParentLink("accountCodeACC02", "accountCodeACC06");
      accountController.addLookup2ParentLink("descriptionSYS10","accountDescriptionACC06");
      accountController.setFramePreferedSize(new Dimension(400,400));
      accountController.setAllColumnVisible(false);
      accountController.setVisibleColumn("accountCodeACC02",true);
      accountController.setVisibleColumn("descriptionSYS10",true);
      accountController.setPreferredWidthColumn("descriptionSYS10",290);
      accountController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          AccountVO accountVO = (AccountVO)accountController.getLookupVO();
          JournalRowVO vo = (JournalRowVO)detailPanel.getVOModel().getValueObject();
          vo.setAccountCodeAcc02ACC06(accountVO.getAccountCodeACC02());
          vo.setAccountCodeACC06(accountVO.getAccountCodeACC02());
          controlAcode.setValue(accountVO.getAccountCodeACC02());
          if (accountVO.getAccountTypeACC02()!=null) {
            if (accountVO.getAccountTypeACC02().equals(ApplicationConsts.DEBIT_ACCOUNT))
              controlDebit.requestFocus();
            else
              controlCredit.requestFocus();
          }
        }

        public void beforeLookupAction(ValueObject parentVO) {
          accountDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
          accountDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
        }

        public void forceValidate() {}

      });


      // customer lookup...
      customerDataLocator.setGridMethodName("loadCustomers");
      customerDataLocator.setValidationMethodName("validateCustomerCode");
      controlCcode.setLookupController(customerController);
      controlCcode.setControllerMethodName("getCustomersList");
      customerController.setForm(detailPanel);
      customerController.setLookupDataLocator(customerDataLocator);
      customerController.setFrameTitle("customers");
      customerController.setLookupValueObjectClassName("org.jallinone.sales.customers.java.GridCustomerVO");
      customerController.addLookup2ParentLink("customerCodeSAL07","accountCodeACC06");
      customerController.addLookup2ParentLink("name_1REG04", "accountDescriptionACC06");
      customerController.setAllColumnVisible(false);
      customerController.setVisibleColumn("companyCodeSys01REG04", true);
      customerController.setVisibleColumn("customerCodeSAL07", true);
      customerController.setVisibleColumn("name_1REG04", true);
      customerController.setVisibleColumn("name_2REG04", true);
      customerController.setVisibleColumn("cityREG04", true);
      customerController.setVisibleColumn("provinceREG04", true);
      customerController.setVisibleColumn("countryREG04", true);
      customerController.setVisibleColumn("taxCodeREG04", true);
      customerController.setHeaderColumnName("cityREG04", "city");
      customerController.setHeaderColumnName("provinceREG04", "prov");
      customerController.setHeaderColumnName("countryREG04", "country");
      customerController.setHeaderColumnName("taxCodeREG04", "taxCode");
      customerController.setPreferredWidthColumn("name_1REG04", 200);
      customerController.setPreferredWidthColumn("name_2REG04", 150);
      customerController.setFramePreferedSize(new Dimension(750,500));
      customerDataLocator.getLookupFrameParams().put(ApplicationConsts.FILTER_COMPANY_FOR_INSERT,"ACC05_NEW_ITEM_NOVAT");
      customerDataLocator.getLookupValidationParameters().put(ApplicationConsts.FILTER_COMPANY_FOR_INSERT,"ACC05_NEW_ITEM_NOVAT");
      customerController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          GridCustomerVO custVO = (GridCustomerVO)customerController.getLookupVO();
          JournalRowVO vo = (JournalRowVO)detailPanel.getVOModel().getValueObject();
          vo.setAccountCodeAcc02ACC06(custVO.getCreditAccountCodeAcc02SAL07());
          vo.setAccountCodeACC06(custVO.getCustomerCodeSAL07());
          controlCcode.setValue(custVO.getCustomerCodeSAL07());
          controlDebit.requestFocus();
        }

        public void beforeLookupAction(ValueObject parentVO) {
          customerDataLocator.getLookupFrameParams().put(ApplicationConsts.SUBJECT_TYPE,ApplicationConsts.SUBJECT_ORGANIZATION_CUSTOMER);
          customerDataLocator.getLookupFrameParams().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
          customerDataLocator.getLookupValidationParameters().put(ApplicationConsts.COMPANY_CODE_SYS01,controlCompaniesCombo.getValue());
          customerController.setHeaderColumnName("name_1REG04", "corporateName1");
          customerController.setHeaderColumnName("name_2REG04", "corporateName2");
        }

        public void forceValidate() {}

      });


      // supplier lookup...
      supplierDataLocator.setGridMethodName("loadSuppliers");
      supplierDataLocator.setValidationMethodName("validateSupplierCode");
      controlScode.setLookupController(supplierController);
      controlScode.setControllerMethodName("getSuppliersList");
      supplierController.setForm(detailPanel);
      supplierController.setLookupDataLocator(supplierDataLocator);
      supplierController.setFrameTitle("suppliers");
      supplierController.setLookupValueObjectClassName("org.jallinone.purchases.suppliers.java.GridSupplierVO");
      supplierController.addLookup2ParentLink("supplierCodePUR01","accountCodeACC06");
      supplierController.addLookup2ParentLink("name_1REG04", "accountDescriptionACC06");
      supplierController.setAllColumnVisible(false);
      supplierController.setVisibleColumn("companyCodeSys01REG04", true);
      supplierController.setVisibleColumn("supplierCodePUR01", true);
      supplierController.setVisibleColumn("name_1REG04", true);
      supplierController.setVisibleColumn("name_2REG04", true);
      supplierController.setVisibleColumn("cityREG04", true);
      supplierController.setVisibleColumn("provinceREG04", true);
      supplierController.setVisibleColumn("countryREG04", true);
      supplierController.setVisibleColumn("taxCodeREG04", true);
      supplierController.setHeaderColumnName("name_1REG04", "corporateName1");
      supplierController.setHeaderColumnName("cityREG04", "city");
      supplierController.setHeaderColumnName("provinceREG04", "prov");
      supplierController.setHeaderColumnName("countryREG04", "country");
      supplierController.setHeaderColumnName("taxCodeREG04", "taxCode");
      supplierController.setPreferredWidthColumn("name_1REG04", 200);
      supplierController.setPreferredWidthColumn("name_2REG04", 150);
      supplierController.setFramePreferedSize(new Dimension(750,500));
      supplierDataLocator.getLookupFrameParams().put(ApplicationConsts.FILTER_COMPANY_FOR_INSERT,"ACC05_NEW_ITEM_NOVAT");
      supplierDataLocator.getLookupValidationParameters().put(ApplicationConsts.FILTER_COMPANY_FOR_INSERT,"ACC05_NEW_ITEM_NOVAT");
      supplierController.addLookupListener(new LookupListener() {

        public void codeValidated(boolean validated) {}

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          GridSupplierVO supplierVO = (GridSupplierVO)supplierController.getLookupVO();
          JournalRowVO vo = (JournalRowVO)detailPanel.getVOModel().getValueObject();
          vo.setAccountCodeAcc02ACC06(supplierVO.getDebitAccountCodeAcc02PUR01());
          vo.setAccountCodeACC06(supplierVO.getSupplierCodePUR01());
          controlScode.setValue(supplierVO.getSupplierCodePUR01());
          controlCredit.requestFocus();
        }

        public void beforeLookupAction(ValueObject parentVO) {
View Full Code Here

Examples of org.jallinone.registers.currency.java.CurrencyVO

        public void beforeLookupAction(ValueObject parentVO) {
        }

        public void codeChanged(ValueObject parentVO,Collection parentChangedAttributes) {
          currConvs.clear();
          CurrencyVO cVO = (CurrencyVO)currController.getLookupVO();
          if (cVO!=null && cVO.getCurrencyCodeREG03()!=null) {
            controlValue.setCurrencySymbol(cVO.getCurrencySymbolREG03());
            controlValue.setDecimals(cVO.getDecimalsREG03().intValue());
            controlValue.setDecimalSymbol(cVO.getDecimalSymbolREG03().charAt(0));

            maybeAllowInsertInGrid();

          }
          else {
View Full Code Here

Examples of org.jallinone.registers.currency.java.CurrencyVO

        throw new Exception(res.getErrorMessage());

      res = compCurr.loadCompanyCurrency(pk.getCompanyCodeSys01ITM01(),langId,username,customizedFields);
      if (res.isError())
        throw new Exception(res.getErrorMessage());
      CurrencyVO currVO = (CurrencyVO)((VOResponse)res).getVo();

      // navigate through the tree and fetch item prices...
      pstmt = conn.prepareStatement(
          "select sum(PUR04_SUPPLIER_ITEM_PRICES.VALUE),count(PUR04_SUPPLIER_ITEM_PRICES.VALUE),PUR03_SUPPLIER_PRICELISTS.CURRENCY_CODE_REG03 "+
          "from PUR04_SUPPLIER_ITEM_PRICES,PUR03_SUPPLIER_PRICELISTS "+
View Full Code Here

Examples of org.jallinone.registers.currency.java.CurrencyVO

  void printButton_actionPerformed(ActionEvent e) {
    DetailProdOrderVO vo = (DetailProdOrderVO)headerFormPanel.getVOModel().getValueObject();

    Response res = ClientUtils.getData("loadCompanyCurrency",vo.getCompanyCodeSys01DOC22());
    if (!res.isError()) {
      CurrencyVO currVO = (CurrencyVO)((VOResponse)res).getVo();

      HashMap params = new HashMap();
      params.put("COMPANY_CODE",vo.getCompanyCodeSys01DOC22());
      params.put("DOC_YEAR",vo.getDocYearDOC22());
      params.put("DOC_NUMBER",vo.getDocNumberDOC22());
      params.put("DECIMALS",currVO.getDecimalsREG03());

      HashMap map = new HashMap();
      map.put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01DOC22());
      map.put(ApplicationConsts.FUNCTION_CODE_SYS06,headerFormPanel.getFunctionId());
      map.put(ApplicationConsts.EXPORT_PARAMS,params);
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.