Jump to content

Question

Posted

Hey Everyone

 

What I am looking to do is get a report of all active services

that will show an estimated annual income.

 

The issue I see some services will bill monthly, quarterly .... annually

 

How can we normalize this and generate a report?

 

Any help or if this is already there please let me know :)

1 answer to this question

Recommended Posts

  • 0
Posted

For a custom report, you'll need to calculate the cost estimate of every service in the SELECT clause for a column in your query.

 

Below is pseudo-code for the algorithm to calculate annual cost for a service. You can implement it as SQL in your query.

// Annual income is price * period / term in days
annual_service_income :=
(service_price)
* (
if service_period is 'day'
return 365.24
elseif service_period is 'week'
return 52
elseif service_period is 'month'
return 12
else
return 1
)
/ (service_term)

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...