SystemOverviewStatistics extends SystemOverviewModel
System Overview statistics
Table of Contents
Methods
| __construct() | Initialize |
| getActiveUsersCount() | Retrieves the number of active users over time |
| getClientCount() | Retrieves the number of clients of the given status |
| getClients() | Retrieves the number of clients created between the given dates |
| getRecurringInvoiceCount() | Retrieves the number of recurring invoices currently active in the system for the currently active company |
| getServiceCount() | Retrieves the number of services of the given status |
| getServices() | Retrieves the number of services of a given status between the given dates |
Methods
__construct()
Initialize
public
__construct() : mixed
getActiveUsersCount()
Retrieves the number of active users over time
public
getActiveUsersCount(int $company_id, string $start_date, string $end_date) : int
Parameters
- $company_id : int
-
The company ID from which to fetch active users
- $start_date : string
-
The UTC start date timestamp in yyyy-mm-dd hh:mm:ss format
- $end_date : string
-
The UTC end date timestamp in yyyy-mm-dd hh:mm:ss format
Return values
int —The number of active users
getClientCount()
Retrieves the number of clients of the given status
public
getClientCount(int $company_id[, string $status = 'active' ]) : int
Parameters
- $company_id : int
-
The company ID from which to fetch the number of clients
- $status : string = 'active'
-
The status of the client ("active", "inactive", "fraud") (optional, default "active")
Return values
int —The number of clients with the given status
getClients()
Retrieves the number of clients created between the given dates
public
getClients(mixed $company_id, string $start_date, string $end_date) : mixed
Parameters
- $company_id : mixed
- $start_date : string
-
The UTC start date timestamp in yyyy-mm-dd hh:mm:ss format
- $end_date : string
-
The UTC end date timestamp in yyyy-mm-dd hh:mm:ss format
getRecurringInvoiceCount()
Retrieves the number of recurring invoices currently active in the system for the currently active company
public
getRecurringInvoiceCount() : mixed
getServiceCount()
Retrieves the number of services of the given status
public
getServiceCount(int $company_id[, string $status = 'active' ]) : int
Parameters
- $company_id : int
-
The company ID from which to fetch the number of services
- $status : string = 'active'
-
The status of the service ("active", "canceled", "pending", "suspended", "scheduled_cancellation") (optional, default "active")
Return values
int —The number of services with the given status
getServices()
Retrieves the number of services of a given status between the given dates
public
getServices(mixed $company_id, string $start_date, string $end_date[, string $status = 'active' ]) : int
Parameters
- $company_id : mixed
- $start_date : string
-
The UTC start date timestamp in yyyy-mm-dd hh:mm:ss format
- $end_date : string
-
The UTC end date timestamp in yyyy-mm-dd hh:mm:ss format
- $status : string = 'active'
-
The status of the service ("active", "canceled", "pending", "suspended", "scheduled_cancellation") (optional, default "active")
Return values
int —The number of services of the given status