Package org.blueoxygen.postila.requisitiontoinvoice.entity

Examples of org.blueoxygen.postila.requisitiontoinvoice.entity.PurchaseOrder


    }
    if(hasErrors()){
      return INPUT;
    }
   
    PurchaseOrder purchaseOrder;
    if(getPurchaseOrder().getId() == null || "".equalsIgnoreCase(getPurchaseOrder().getId())){
      purchaseOrder = new PurchaseOrder();
      logInfo = new LogInformation();
      logInfo.setCreateBy(sessionCredentials.getCurrentUser().getId());
      logInfo.setCreateDate(new Timestamp(System.currentTimeMillis()));
    } else {
      purchaseOrder = (PurchaseOrder) manager.getById(PurchaseOrder.class, getPurchaseOrder().getId());
      logInfo = purchaseOrder.getLogInformation();
    }
   
    logInfo.setActiveFlag(getActive());
    logInfo.setLastUpdateBy(sessionCredentials.getCurrentUser().getId());
    logInfo.setLastUpdateDate(new Timestamp(System.currentTimeMillis()));
   
    purchaseOrder.setLogInformation(logInfo);
    purchaseOrder.setDocumentNo(getPurchaseOrder().getDocumentNo());
    purchaseOrder.setDescription(getPurchaseOrder().getDescription());
    purchaseOrder.setDateOrdered(getPurchaseOrder().getDateOrdered());
    purchaseOrder.setDatePromised(getPurchaseOrder().getDatePromised());
    purchaseOrder.setBusinessPartner(getBusinessPartner());
    purchaseOrder.setInvoiceLocation(getInvoiceLocation());
    purchaseOrder.setPartnerLocation(getPartnerLocation());
    purchaseOrder.setInvoicePartner(getInvoicePartner());
    purchaseOrder.setContact(getContact());
    purchaseOrder.setInvoiceContact(getInvoiceContact());
    purchaseOrder.setWarehouse(getWarehouse());
    purchaseOrder.setPriority(getPurchaseOrder().getPriority());
    purchaseOrder.setPriceList(getPriceList());
    purchaseOrder.setCompanyAgent(getCompanyAgent());
    purchaseOrder.setCurrency(getCurrency());
    purchaseOrder.setDiscountPrinted(getPurchaseOrder().getDiscountPrinted());
    purchaseOrder.setPaymentTerm(getPaymentTerm());
   
    manager.save(purchaseOrder);
    setPurchaseOrder(purchaseOrder);
    return SUCCESS;
  }
View Full Code Here

TOP

Related Classes of org.blueoxygen.postila.requisitiontoinvoice.entity.PurchaseOrder

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.