Class ProposedOrder


  • public class ProposedOrder
    extends Object
    Proposed Order Object generated by the MRP process or other re-Order process
    • Method Detail

      • getQuantity

        public BigDecimal getQuantity()
        get the quantity property.
        Returns:
        the quantity property
      • getRequirementStartDate

        public Timestamp getRequirementStartDate()
        get the requirementStartDate property.
        Returns:
        the quantity property
      • calculateStartDate

        public Map<String,​Object> calculateStartDate​(int daysToShip,
                                                           GenericValue routing,
                                                           Delegator delegator,
                                                           LocalDispatcher dispatcher,
                                                           GenericValue userLogin)
        calculate the ProposedOrder requirementStartDate and update the requirementStartDate property.
        • For the build product,
          • read the routing associated to the product,
          • read the routingTask associated to the routing
          • step by step calculate from the endDate the startDate
        • For the bought product, the first ProductFacility.daysToShip is used to calculated the startDate
        Returns:
        • if ProposedOrder.isBuild a Map with all the routingTaskId as keys and estimatedStartDate as value.
        • else null.
      • calculateQuantityToSupply

        public void calculateQuantityToSupply​(BigDecimal reorderQuantity,
                                              BigDecimal minimumStock,
                                              ListIterator<GenericValue> listIterIEP)
        calculate the ProposedOrder quantity and update the quantity property. Read the first ProductFacility.reorderQuantity and calculate the quantity : if (quantity < reorderQuantity) quantity = reorderQuantity;
      • create

        public String create​(DispatchContext ctx,
                             GenericValue userLogin)
        create a ProposedOrder in the Requirement Entity calling the createRequirement service.
        Parameters:
        ctx - The DispatchContext used to call service to create the Requirement Entity record.
        Returns:
        String the requirementId
      • setMrpName

        public void setMrpName​(String mrpName)