BrightSide Workbench Full Report + Source Code
org.turro.financials.product.Margins Class Reference

Static Public Member Functions

static double getProfitMargin (Service service)
 
static double getStructureMargin (Department department)
 

Detailed Description

Member Function Documentation

◆ getProfitMargin()

static double org.turro.financials.product.Margins.getProfitMargin ( Service  service)
static

Definition at line 30 of file bsfinancials-core/src/main/java/org/turro/financials/product/Margins.java.

30  {
31  double profitMargin = 0.0;
32  if(service != null) {
33  profitMargin += service.getProfitMargin();
34  if(service.getCompany() != null) {
35  profitMargin += service.getCompany().getProfitMargin();
36  }
37  }
38  return profitMargin;
39  }
Here is the call graph for this function:

◆ getStructureMargin()

static double org.turro.financials.product.Margins.getStructureMargin ( Department  department)
static

Definition at line 41 of file bsfinancials-core/src/main/java/org/turro/financials/product/Margins.java.

41  {
42  double structureMargin = 0.0;
43  if(department != null) {
44  structureMargin += department.getStructureMargin();
45  if(department.getHeadquarters() != null) {
46  structureMargin += department.getHeadquarters().getStructureMargin();
47  if(department.getHeadquarters().getCompany() != null) {
48  structureMargin += department.getHeadquarters().getCompany().getStructureMargin();
49  }
50  }
51  }
52  return structureMargin;
53  }
Here is the call graph for this function:

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