Package org.blueoxygen.postila.performanceanalysis.accountingrules.entity

Examples of org.blueoxygen.postila.performanceanalysis.accountingrules.entity.Currency


    }
    if(hasErrors()){
      return INPUT;
    }
   
    Currency currency;
    if(getCurrency().getId() == null || "".equalsIgnoreCase(getCurrency().getId())) {
      currency = new Currency();
      logInfo = new LogInformation();
      logInfo.setCreateBy(sessionCredentials.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
      msg = "Successfully Add "+getCurrency().getISOCurrencyCode();
    } else {
      currency = (Currency) manager.getById(Currency.class, getCurrency().getId());
      logInfo = currency.getLogInformation();
      msg = "Successfully Edit "+getCurrency().getISOCurrencyCode();
    }
   
    logInfo.setActiveFlag(getActive());
    logInfo.setLastUpdateBy(getCurrentUser().getId());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
   
    currency.setLogInformation(logInfo);
    currency.setISOCurrencyCode(getCurrency().getISOCurrencyCode());
    currency.setSymbol(getCurrency().getSymbol());
    currency.setDescription(getCurrency().getDescription());
    currency.setStandardPrecision(getCurrency().getStandardPrecision());
    currency.setCostingPrecision(getCurrency().getCostingPrecision());
   
    manager.save(currency);
    setCurrency(currency);
    return SUCCESS;
  }
View Full Code Here

TOP

Related Classes of org.blueoxygen.postila.performanceanalysis.accountingrules.entity.Currency

Copyright © 2018 www.massapicom. 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.