Class PurchaseOrderLogic
java.lang.Object
com.echothree.util.server.control.BaseLogic
com.echothree.model.control.order.server.logic.OrderLogic
com.echothree.model.control.purchase.server.logic.PurchaseOrderLogic
- 
Method SummaryModifier and TypeMethodDescriptionvoidcheckOrderAvailableForModification(Session session, ExecutionErrorAccumulator eea, Order order, PartyPK modifiedBy) Check to see if an Order is available for modification, and if it isn't, send back an error.createPurchaseOrder(Session session, ExecutionErrorAccumulator eea, UserVisit userVisit, Party vendorParty, Boolean holdUntilComplete, Boolean allowBackorders, Boolean allowSubstitutions, Boolean allowCombiningShipments, String reference, Term term, FreeOnBoard freeOnBoard, String workflowEntranceName, Party createdByParty) Create a new Purchase Order using appropriate defaults where possible for Optional parameters.createPurchaseOrder(Session session, ExecutionErrorAccumulator eea, UserVisit userVisit, String vendorName, String termName, String strHoldUntilComplete, String strAllowBackorders, String strAllowSubstitutions, String strAllowCombiningShipments, String reference, String freeOnBoardName, String workflowEntranceName, Party createdByParty) getCancellationPolicy(ExecutionErrorAccumulator eea, VendorType vendorType, Vendor billToVendor) static PurchaseOrderLogicgetOrderBillToParty(Order order) Find the BILL_TO Party for a given Order.getOrderBillToVendorType(Order order) Find the VendorType for the BILL_TO Party for a given Order.getOrderByName(ExecutionErrorAccumulator eea, String orderName) getOrderByNameForUpdate(ExecutionErrorAccumulator eea, String orderName) getOrderPriorityByName(ExecutionErrorAccumulator eea, String orderPriorityName) getOrderPriorityByNameForUpdate(ExecutionErrorAccumulator eea, String orderPriorityName) getOrderShipToParty(Order order, boolean billToFallback, BasePK createdBy) Attempt to find a SHIP_TO Party for the Order.getPurchaseOrderStatusChoices(String defaultOrderStatusChoice, Language language, boolean allowNullChoice, Order order, PartyPK partyPK) getReturnPolicy(ExecutionErrorAccumulator eea, VendorType vendorType, Vendor billToVendor) getVendorTypeFromParty(Party party) Find the VendorType for a given Party.booleanisOrderInWorkflowSteps(ExecutionErrorAccumulator eea, EntityInstance entityInstance, String... workflowStepNames) booleanisOrderInWorkflowSteps(ExecutionErrorAccumulator eea, Order order, String... workflowStepNames) voidsetPurchaseOrderStatus(Session session, ExecutionErrorAccumulator eea, Order order, String orderStatusChoice, PartyPK modifiedBy) voidvalidatePurchaseOrderReference(ExecutionErrorAccumulator eea, String reference, Vendor vendor) Methods inherited from class com.echothree.model.control.order.server.logic.OrderLogiccheckItemAgainstOrderPaymentPreferences, checkItemAgainstShippingMethod, createOrder, createOrderPaymentPreference, createOrderShipmentGroup, getDefaultOrderShipmentGroup, getItemsFromOrder, getOrderAliasTypeByName, getOrderByName, getOrderByNameForUpdate, getOrderCurrency, getOrderName, getOrderPaymentPreferenceByName, getOrderPaymentPreferenceByNameForUpdate, getOrderPriorityByName, getOrderPriorityByNameForUpdate, getOrderRoleTypeByName, getOrderSequence, getOrderSequenceType, getOrderTypeByNameMethods inherited from class com.echothree.util.server.control.BaseLogicaddExecutionError, addSecurityMessage, getEntityInstanceByBaseEntity, getEntityInstanceByBasePK, getSession, handleExecutionError, handleSecurityMessage, hasExecutionErrors
- 
Method Details- 
getInstance
- 
validatePurchaseOrderReferencepublic void validatePurchaseOrderReference(ExecutionErrorAccumulator eea, String reference, Vendor vendor) 
- 
getCancellationPolicypublic CancellationPolicy getCancellationPolicy(ExecutionErrorAccumulator eea, VendorType vendorType, Vendor billToVendor) 
- 
getReturnPolicypublic ReturnPolicy getReturnPolicy(ExecutionErrorAccumulator eea, VendorType vendorType, Vendor billToVendor) 
- 
createPurchaseOrderpublic Order createPurchaseOrder(Session session, ExecutionErrorAccumulator eea, UserVisit userVisit, Party vendorParty, Boolean holdUntilComplete, Boolean allowBackorders, Boolean allowSubstitutions, Boolean allowCombiningShipments, String reference, Term term, FreeOnBoard freeOnBoard, String workflowEntranceName, Party createdByParty) Create a new Purchase Order using appropriate defaults where possible for Optional parameters.- Parameters:
- session- Required.
- eea- Required.
- userVisit- Required.
- vendorParty- Required.
- holdUntilComplete- Optional.
- allowBackorders- Optional.
- allowSubstitutions- Optional.
- allowCombiningShipments- Optional.
- reference- Optional.
- term- Optional.
- workflowEntranceName- Optional.
- createdByParty- Required.
- Returns:
- The newly created Order, or null if there was an error.
 
- 
createPurchaseOrderpublic Order createPurchaseOrder(Session session, ExecutionErrorAccumulator eea, UserVisit userVisit, String vendorName, String termName, String strHoldUntilComplete, String strAllowBackorders, String strAllowSubstitutions, String strAllowCombiningShipments, String reference, String freeOnBoardName, String workflowEntranceName, Party createdByParty) 
- 
isOrderInWorkflowStepspublic boolean isOrderInWorkflowSteps(ExecutionErrorAccumulator eea, Order order, String... workflowStepNames) 
- 
isOrderInWorkflowStepspublic boolean isOrderInWorkflowSteps(ExecutionErrorAccumulator eea, EntityInstance entityInstance, String... workflowStepNames) 
- 
getOrderByName
- 
getOrderByNameForUpdate
- 
getOrderPriorityByNamepublic OrderPriority getOrderPriorityByName(ExecutionErrorAccumulator eea, String orderPriorityName) 
- 
getOrderPriorityByNameForUpdatepublic OrderPriority getOrderPriorityByNameForUpdate(ExecutionErrorAccumulator eea, String orderPriorityName) 
- 
getPurchaseOrderStatusChoicespublic PurchaseOrderStatusChoicesBean getPurchaseOrderStatusChoices(String defaultOrderStatusChoice, Language language, boolean allowNullChoice, Order order, PartyPK partyPK) 
- 
setPurchaseOrderStatuspublic void setPurchaseOrderStatus(Session session, ExecutionErrorAccumulator eea, Order order, String orderStatusChoice, PartyPK modifiedBy) 
- 
checkOrderAvailableForModificationpublic void checkOrderAvailableForModification(Session session, ExecutionErrorAccumulator eea, Order order, PartyPK modifiedBy) Check to see if an Order is available for modification, and if it isn't, send back an error.- Parameters:
- session- Required.
- eea- Required.
- order- Required.
- modifiedBy- Required.
 
- 
getOrderBillToPartyFind the BILL_TO Party for a given Order.- Parameters:
- order- Required.
- Returns:
- The Party used for the BILL_TO OrderRoleType. May be null.
 
- 
getVendorTypeFromPartyFind the VendorType for a given Party.- Parameters:
- party- Optional.
- Returns:
- The VendorType for the Party. May be null.
 
- 
getOrderBillToVendorTypeFind the VendorType for the BILL_TO Party for a given Order.- Parameters:
- order- Required.
- Returns:
- The VendorType for the BILL_TO Party. May be null.
 
- 
getOrderShipToPartyAttempt to find a SHIP_TO Party for the Order. If none is found, and billToFallback is set to true, then attempt to find the BILL_TO Party. If a BILL_TO Party is found, copy it to the SHIP_TO.- Parameters:
- order- Required.
- billToFallback- Required.
- createdBy- Required if billToFallback is true.
- Returns:
- The Party that is to be used for the SHIP_TO OrderRoleType. May be null.
 
 
-