Package com.swinarta.sunflower.core.model

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


    Integer id = RequestUtil.getInteger(getRequestAttributes().get("id"));
   
    if(request.getOperationType() == OPERATION_TYPE.UPDATE){
      Float qty = RequestUtil.getFloat(request.getData().get("qty"));
     
      ReceivingOrderDetail rod = coreManager.get(ReceivingOrderDetail.class, id);
      rod.setQty(qty);
     
      try {
        ReceivingOrderDetail rodResp = coreManager.save(ReceivingOrderDetail.class, rod);
        rodResp = coreManager.getReceivingOrderDetail(rodResp.getId());
        DisplayReceivingOrderDetail det =  mapper.map(rodResp, DisplayReceivingOrderDetail.class);
        det.setCostPrice(rodResp.getPoDetail().getProduct().getBuying().getCostPrice());

        ProductMeasurement productMeasurement = null;     
        if(rodResp.getPoDetail().getProduct().getProductMeasurement() != null && !rodResp.getPoDetail().getProduct().getProductMeasurement().isEmpty()){
          productMeasurement = rodResp.getPoDetail().getProduct().getProductMeasurement().iterator().next();
        }
       
        if(productMeasurement != null){
          det.getPoDetail().getProduct().setProductMeasurement(mapper.map(productMeasurement, DisplayProductMeasurement.class));
        }     
View Full Code Here

TOP

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

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.