Examples of DiscountSchema


Examples of org.blueoxygen.postila.materialmanagement.materialmanagementrules.entity.DiscountSchema

    }
    if(hasErrors()){
      return INPUT;
    }
   
    DiscountSchema discountSchema;
    if(getDiscountSchema().getId() == null || "".equalsIgnoreCase(getDiscountSchema().getId())){
      discountSchema = new DiscountSchema();
      logInfo = new LogInformation();
      logInfo.setCreateBy(sessionCredentials.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
      msg = "Successfully Add "+getDiscountSchema().getName();
    } else {
      discountSchema = (DiscountSchema) manager.getById(DiscountSchema.class, getDiscountSchema().getId());
      logInfo = discountSchema.getLogInformation();
      msg = "Successfully Edit "+getDiscountSchema().getName();
    }
   
    logInfo.setActiveFlag(getActive());
    logInfo.setLastUpdateBy(sessionCredentials.getCurrentUser().getId());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
   
    discountSchema.setLogInformation(logInfo);
    discountSchema.setName(getDiscountSchema().getName());
    discountSchema.setDescription(getDiscountSchema().getDescription());
    discountSchema.setDiscountType(getDiscountSchema().getDiscountType());
    discountSchema.setQuantityBased(getDiscountSchema().getQuantityBased());
    discountSchema.setAccumulationLevel(getDiscountSchema().getAccumulationLevel());
   
    manager.save(discountSchema);
    setDiscountSchema(getDiscountSchema());
   
    return SUCCESS;
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.