Package com.swinarta.sunflower.core.model

Examples of com.swinarta.sunflower.core.model.ReceivingOrder


  @Get("json")
  public SgwtRestFetchResponseBase getRepresent(){
    Serializable resp = null;
   
    Integer poId = RequestUtil.getInteger(getRequestAttributes().get("po"));
    ReceivingOrder ro = coreManager.getReceivingOrderByPO(poId);
   
    if(ro != null){
      DisplayReceivingOrder disp = mapper.map(ro, DisplayReceivingOrder.class);
      resp = disp;
    }
View Full Code Here


  @Get("json")
  public SgwtRestFetchResponseBase getRepresent(){
    Serializable resp = null;
   
    String code = RequestUtil.getString(getRequestAttributes().get("code"));
    ReceivingOrder ro = coreManager.getReceivingOrderByCode(code);
   
    if(ro != null){
      DisplayReceivingOrder disp = mapper.map(ro, DisplayReceivingOrder.class);
      resp = disp;
    }
View Full Code Here

   
    Date today = new Date();

    try {
      PurchasingOrder po = coreManager.get(PurchasingOrder.class, poId);   
      ReceivingOrder ro = coreManager.createReceivingOrder(poId, today);
     
      String roId = RoUtil.constructRoId(today, po.getSupplier().getId(), ro.getId());
      ro.setRoId(roId);
      ro = coreManager.save(ReceivingOrder.class, ro);

      DisplayReceivingOrder disp = mapper.map(ro, DisplayReceivingOrder.class);
      resp = disp;
    } catch (Exception e) {
View Full Code Here

    Date roDate = RequestUtil.getDate(req.getData().get("roDate"));
    String remarks = RequestUtil.getString(req.getData().get("remarks"));
    String status = RequestUtil.getString(req.getData().get("status"));
    Boolean isCompleted = false;
   
    ReceivingOrder ro = coreManager.get(ReceivingOrder.class, id);   
       
    if(status != null){
      Status oldStatus = ro.getStatus();
      Status newStatus = Status.fromString(status);
      isCompleted = (!oldStatus.equals(newStatus) && newStatus == Status.COMPLETED);
    }
   
    try {
      ReceivingOrder roResp;
      if(isCompleted){
        roResp = coreManager.updateCompleteReceivingOrder(ro.getId());
      }else{
        ro.setRoDate(roDate);
        ro.setRemarks(remarks);       
View Full Code Here

TOP

Related Classes of com.swinarta.sunflower.core.model.ReceivingOrder

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.