Class ProposedOrder
- java.lang.Object
-
- org.apache.ofbiz.manufacturing.mrp.ProposedOrder
-
public class ProposedOrder extends java.lang.Object
Proposed Order Object generated by the MRP process or other re-Order process
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
facilityId
protected boolean
isBuilt
protected java.lang.String
manufacturingFacilityId
static java.lang.String
module
protected java.lang.String
mrpName
protected GenericValue
product
protected java.lang.String
productId
protected java.math.BigDecimal
quantity
protected java.sql.Timestamp
requiredByDate
protected java.sql.Timestamp
requirementStartDate
static java.lang.String
resource
-
Constructor Summary
Constructors Constructor Description ProposedOrder(GenericValue product, java.lang.String facilityId, java.lang.String manufacturingFacilityId, boolean isBuilt, java.sql.Timestamp requiredByDate, java.math.BigDecimal quantity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
calculateQuantityToSupply(java.math.BigDecimal reorderQuantity, java.math.BigDecimal minimumStock, java.util.ListIterator<GenericValue> listIterIEP)
calculate the ProposedOrder quantity and update the quantity property.java.util.Map<java.lang.String,java.lang.Object>
calculateStartDate(int daysToShip, GenericValue routing, Delegator delegator, LocalDispatcher dispatcher, GenericValue userLogin)
calculate the ProposedOrder requirementStartDate and update the requirementStartDate property.java.lang.String
create(DispatchContext ctx, GenericValue userLogin)
create a ProposedOrder in the Requirement Entity calling the createRequirement service.java.math.BigDecimal
getQuantity()
get the quantity property.java.sql.Timestamp
getRequirementStartDate()
get the requirementStartDate property.void
setMrpName(java.lang.String mrpName)
-
-
-
Field Detail
-
module
public static final java.lang.String module
-
resource
public static final java.lang.String resource
- See Also:
- Constant Field Values
-
product
protected GenericValue product
-
isBuilt
protected boolean isBuilt
-
productId
protected java.lang.String productId
-
facilityId
protected java.lang.String facilityId
-
manufacturingFacilityId
protected java.lang.String manufacturingFacilityId
-
mrpName
protected java.lang.String mrpName
-
requiredByDate
protected java.sql.Timestamp requiredByDate
-
requirementStartDate
protected java.sql.Timestamp requirementStartDate
-
quantity
protected java.math.BigDecimal quantity
-
-
Constructor Detail
-
ProposedOrder
public ProposedOrder(GenericValue product, java.lang.String facilityId, java.lang.String manufacturingFacilityId, boolean isBuilt, java.sql.Timestamp requiredByDate, java.math.BigDecimal quantity)
-
-
Method Detail
-
getQuantity
public java.math.BigDecimal getQuantity()
get the quantity property.- Returns:
- the quantity property
-
getRequirementStartDate
public java.sql.Timestamp getRequirementStartDate()
get the requirementStartDate property.- Returns:
- the quantity property
-
calculateStartDate
public java.util.Map<java.lang.String,java.lang.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.
- For the build product,
-
calculateQuantityToSupply
public void calculateQuantityToSupply(java.math.BigDecimal reorderQuantity, java.math.BigDecimal minimumStock, java.util.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 java.lang.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(java.lang.String mrpName)
-
-