public class DefaultB2BBudgetExceededEvaluationStrategy extends AbstractPermissionEvaluationStrategy<B2BPermissionModel> implements PermissionEvaluateStrategy<B2BPermissionResultModel,AbstractOrderModel,B2BCustomerModel>
B2BBudgetExceededPermissionModelNOLIMIT| Constructor and Description |
|---|
DefaultB2BBudgetExceededEvaluationStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkBudgetExceeded(AbstractOrderModel order)
Check if the order has exceeded the active budget.
|
B2BPermissionResultModel |
evaluate(AbstractOrderModel order,
B2BCustomerModel employee)
1) Check if order would exceed budget of cost center 1.1) If it doesn't, fine, set permissionresult for this type
to approved and exit 1.2) If it does, continue with 2 2) Check if user has BudgetExceeded permission 2.1) If he
doesn't, continue with 3 2.2) If he does, fine, set permission result for this type to approved and exit 3) Set
PermissionResult to Open and later processing has to find approver
|
protected B2BBudgetService<B2BBudgetModel,B2BCustomerModel> |
getB2BBudgetService() |
protected B2BCostCenterService |
getB2bCostCenterService() |
B2BBudgetExceededPermissionModel |
getPermissionToEvaluate(java.util.Set<B2BPermissionModel> permissions,
java.lang.Class<? extends B2BPermissionModel> type) |
java.lang.Class<? extends B2BPermissionModel> |
getPermissionType()
Gets the permission type.
|
void |
setB2BBudgetService(B2BBudgetService<B2BBudgetModel,B2BCustomerModel> b2BBudgetService) |
void |
setB2bCostCenterService(B2BCostCenterService b2bCostCenterService) |
getActivePermissions, getOrderEntryTotal, getOrderTotal, getOrderTotals, getPermissions, getTotalOfEntriesWithCostCenter, getTotalTax, getTypesToEvaluate, toMoneygetModelService, getTypeService, setModelService, setTypeServicepublic DefaultB2BBudgetExceededEvaluationStrategy()
public B2BPermissionResultModel evaluate(AbstractOrderModel order, B2BCustomerModel employee)
evaluate in interface EvaluateStrategy<B2BPermissionResultModel,AbstractOrderModel,B2BCustomerModel>order - the AbstractOrderModelemployee - the B2BCustomerModelprotected boolean checkBudgetExceeded(AbstractOrderModel order)
order - A b2b orderpublic B2BBudgetExceededPermissionModel getPermissionToEvaluate(java.util.Set<B2BPermissionModel> permissions, java.lang.Class<? extends B2BPermissionModel> type)
public java.lang.Class<? extends B2BPermissionModel> getPermissionType()
PermissionEvaluateStrategygetPermissionType in interface PermissionEvaluateStrategy<B2BPermissionResultModel,AbstractOrderModel,B2BCustomerModel>getPermissionType in class AbstractPermissionEvaluationStrategy<B2BPermissionModel>public void setB2bCostCenterService(B2BCostCenterService b2bCostCenterService)
public void setB2BBudgetService(B2BBudgetService<B2BBudgetModel,B2BCustomerModel> b2BBudgetService)
protected B2BCostCenterService getB2bCostCenterService()
protected B2BBudgetService<B2BBudgetModel,B2BCustomerModel> getB2BBudgetService()
Copyright © 2018 SAP SE. All Rights Reserved.