BrightSide Workbench Full Report + Source Code
org.turro.erp.task.ResourceUsageValuation Class Reference
Inheritance diagram for org.turro.erp.task.ResourceUsageValuation:
Collaboration diagram for org.turro.erp.task.ResourceUsageValuation:

Public Member Functions

 ResourceUsageValuation (HumanResource humanResource, Resource resource, AptitudeDegree aptitudeDegree, AptitudeDegree aptitudeAssesment, double dedication)
 
double getUnitCost ()
 
double getUnitPrice ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 29 of file ResourceUsageValuation.java.

Constructor & Destructor Documentation

◆ ResourceUsageValuation()

org.turro.erp.task.ResourceUsageValuation.ResourceUsageValuation ( HumanResource  humanResource,
Resource  resource,
AptitudeDegree  aptitudeDegree,
AptitudeDegree  aptitudeAssesment,
double  dedication 
)

Definition at line 36 of file ResourceUsageValuation.java.

38  {
39  this.humanResource = humanResource;
40  this.resource = resource;
41  this.aptitudeDegree = aptitudeDegree;
42  this.aptitudeAssesment = aptitudeAssesment;
43  this.dedication = dedication;
44  }

Member Function Documentation

◆ getUnitCost()

double org.turro.erp.task.ResourceUsageValuation.getUnitCost ( )

Implements org.turro.erp.task.IUsageValuation.

Definition at line 47 of file ResourceUsageValuation.java.

47  {
48  double cost = 0.0;
49  AptitudeDegree aptitude = aptitudeAssesment != null ?
50  aptitudeAssesment : aptitudeDegree;
51  if(humanResource != null && aptitude != null) {
52  if(resource != null) {
53  if(humanResource.isInternal() && resource.isInternal()) {
54  cost = resource.getCostHour() + aptitude.getCost() + (humanResource.getCostHour() * dedication);
55  } else if(humanResource.isInternal()) {
56  cost = (resource.getCostHour() > 0.0 ? resource.getCostHour() : aptitude.getCost()) +
57  (humanResource.getCostHour() * dedication);
58  } else if(resource.isInternal()) {
59  cost = (resource.getCostHour() > 0.0 ? resource.getCostHour() : aptitude.getCost()) +
60  (humanResource.getCostHour() * dedication);
61  } else {
62  cost = (resource.getCostHour() > 0.0 ? resource.getCostHour() : aptitude.getCost());
63  }
64  } else {
65  if(humanResource.isInternal()) {
66  cost = aptitude.getCost() + (humanResource.getCostHour() * dedication);
67  } else {
68  cost = (humanResource.getCostHour() > 0.0 ? (humanResource.getCostHour() * dedication) : (aptitude.getCost() * dedication));
69  }
70  }
71  }
72  return cost;
73  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getUnitPrice()

double org.turro.erp.task.ResourceUsageValuation.getUnitPrice ( )

Implements org.turro.erp.task.IUsageValuation.

Definition at line 76 of file ResourceUsageValuation.java.

76  {
77  double price = 0.0;
78  AptitudeDegree aptitude = aptitudeAssesment != null ?
79  aptitudeAssesment : aptitudeDegree;
80  if(humanResource != null && aptitude != null) {
81  if(resource != null) {
82  if(humanResource.isInternal() && resource.isInternal()) {
83  price = (resource.getPriceHour() > 0.0 ? resource.getPriceHour() : aptitude.getPrice());
84  } else if(humanResource.isInternal()) {
85  price = (resource.getPriceHour() > 0.0 ? resource.getPriceHour() : aptitude.getPrice());
86  } else if(resource.isInternal()) {
87  price = (resource.getPriceHour() > 0.0 ? resource.getPriceHour() : aptitude.getPrice());
88  } else {
89  price = (resource.getPriceHour() > 0.0 ? resource.getPriceHour() : aptitude.getPrice());
90  }
91  } else {
92  if(humanResource.isInternal()) {
93  price = (humanResource.getPriceHour() > 0.0 ? humanResource.getPriceHour() : aptitude.getPrice());
94  } else {
95  price = (humanResource.getPriceHour() > 0.0 ? humanResource.getPriceHour() : aptitude.getPrice());
96  }
97  }
98  }
99  return price;
100  }
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: