TimeTrex API Manual

AuditTrailReport extends Report
in package

Table of Contents

$currency_obj  : mixed
$data  : mixed
$duplicate_value_ignored_columns  : mixed
$file_mime_type  : mixed
$file_name  : mixed
$html  : mixed
$pdf  : mixed
$permission_obj  : mixed
$title  : mixed
$user_obj  : mixed
$validator  : mixed
$api_message_id  : mixed
$chart_images  : mixed
$config  : mixed
$custom_column_dynamic_types  : mixed
$custom_fields  : mixed
$data_column_widths  : mixed
$enable_system_columns  : mixed
$form_data  : mixed
$form_obj  : mixed
$maximum_memory_limit  : mixed
$PDF_IMAGE_SCALE_RATIO  : mixed
$profiler  : mixed
$progress_bar_obj  : mixed
$start_time  : float
$tmp_data  : mixed
$total_row  : mixed
$option_cache  : mixed
__construct()  : mixed
AuditTrailReport constructor.
_getData()  : bool
Get raw data for report
_html()  : bool|null|string
_html_Chart()  : bool
_html_checkMaximumPageLimit()  : bool
_html_CSS()  : string
_html_fontSize()  : float
_html_Footer()  : mixed
_html_Header()  : bool
_html_Initialize()  : bool
_html_setPageOrientationCSS()  : string
_html_Table()  : bool
_html_TopSummary()  : bool
_output()  : array<string|int, mixed>|bool
_pdf()  : bool
_pdf_AddPage()  : bool
_pdf_Chart()  : bool
_pdf_checkMaximumPageLimit()  : bool
_pdf_checkPageBreak()  : bool
_pdf_detectPageSize()  : array<string|int, mixed>
_pdf_displayMaximumPageLimitError()  : bool
_pdf_drawLine()  : bool
_pdf_fontSize()  : float
_pdf_Footer()  : bool
_pdf_getColumnHeight()  : float|int
_pdf_getColumnWidth()  : float|int
_pdf_getLargestWrappedWord()  : null
_pdf_getMaximumHeightFromArray()  : int
_pdf_getPageSizeDimensionsFromWidth()  : array<string|int, mixed>
_pdf_getTableColumnWidths()  : array<string|int, mixed>|bool
_pdf_Header()  : bool
_pdf_Initialize()  : bool
_pdf_scaleSize()  : float
_pdf_Table()  : bool
Generate PDF.
_pdf_TopSummary()  : bool
_pdf_unitsToPixels()  : mixed
_postGroup()  : bool
Place holder for after group() has been called, process the data for each report.
_postOutput()  : bool
_postProcess()  : bool
_preOutput()  : bool
_preProcess()  : bool
PreProcess data such as calculating additional columns from raw data etc.
calculateCustomColumnFilters()  : bool
calculateCustomColumns()  : bool
chart()  : bool
checkPermissions()  : bool
columnFormatter()  : array<string|int, mixed>|bool|false|mixed|null|string
convertArrayNumericKeysToString()  : array<string|int, mixed>|bool
Used for converting $test[] = blah, or $test[] = array( 'col' => blah ) to $test['col'] => $blah.
convertTimePeriodToStartEndDate()  : array<string|int, mixed>|bool
currencyConvertToBase()  : bool
downloadOutput()  : bool
email()  : bool
emailOutput()  : bool
formatGroupConfig()  : array<string|int, mixed>|bool
formatSubTotalConfig()  : array<string|int, mixed>|bool
When multiple columns are selected for sub-totaling, we need to multiply the sub-total passes, ie: pay_period, branch, department would need to sub-total on pay_period.branch.department, pay_period.branch, pay_period
getAPIMessageID()  : bool|null
Returns the API messageID for each individual call.
getBaseCurrencyObject()  : bool|object
getChartConfig()  : bool|mixed
getColumnConfig()  : bool|mixed
getColumnDataConfig()  : bool|mixed
getColumnFormatConfig()  : array<string|int, mixed>
getCompanyFormConfig()  : bool|array<string|int, mixed>
getConfig()  : array<string|int, mixed>
Get all options
getCurrencyConvertToBase()  : bool
Object of the currency used in the report, we use this to base currency column formats on.
getCurrencyObject()  : null
getCustomColumnConfig()  : bool|mixed
getCustomColumnFormatOptions()  : array<string|int, mixed>
getCustomFieldColumns()  : array<string|int, mixed>|bool
getCustomFieldFormatOptions()  : array<string|int, mixed>
getCustomFields()  : array<string|int, mixed>
getCustomFilterConfig()  : bool|mixed
getData()  : bool
Get raw data for report
getDescription()  : bool|string
getDescriptionBlock()  : string
Returns the full description block of text.
getDynamicCustomFieldColumns()  : array<string|int, mixed>
getEnableSystemColumns()  : bool
getFileMimeType()  : string
Returns the default file mime type if none is specified.
getFileName()  : string
Returns the default file name if none is specified.
getFilterConfig()  : bool|mixed
getFormConfig()  : bool|mixed
getGroupConfig()  : bool|mixed
getLargestColumnData()  : array<string|int, mixed>
Return the string from each column that is the largest, so we can base the column widths on these.
getOptions()  : bool|mixed
Return options from sub-class for things like columns, sorting columns, grouping columns, sub-total columns, etc.
getOtherConfig()  : bool|mixed
getOutput()  : array<string|int, mixed>|bool
getPageBreakConfig()  : bool|mixed
getPermissionObject()  : null
getProgressBarObject()  : null|ProgressBar
getReportColumns()  : bool|mixed
When using grouping, we have to be able to get a list of just the columns that will be displayed for reporting purposes.
getReportCustomFields()  : mixed
getSortConfig()  : bool|mixed
getStaticCustomFieldColumns()  : array<string|int, mixed>
getSubTotalColumnLabelPosition()  : bool|mixed
getSubTotalConfig()  : bool|mixed
getTable()  : string
Used for TTLog::addEntry.
getTemplate()  : bool|mixed
getTimePeriodFormatOptions()  : array<string|int, mixed>
getUserObject()  : UserFactory|null
group()  : bool
Group Data - Automatically include all static columns that are also selected to be viewed, so the user doesn't have to re-select all columns twice.
handleReportCurrency()  : bool
hasData()  : bool
isEnabledChart()  : bool
isSystemLoadValid()  : bool
loadTemplate()  : bool
Loads a template config.
pageBreak()  : bool
Calculate page break points - This must be done *after* sub-totaling and sorting, as the data may need to be re-sorted to properly merge page break points back into main array.
postGroup()  : bool
After group() has been called, process the data.
postProcess()  : bool
Last operation before displaying data to the user, format data within locale, add dollar signs, thousand separators etc... This increases performance when heavy grouping is used, as there is less data to process.
preProcess()  : bool
PreProcess data such as calculating additional columns (Day of Week, Year Quarter, combined multiple columns together, etc...) from raw data etc.
setAPIMessageID()  : bool
setChartConfig()  : bool
setColumnConfig()  : bool
Store column options - This must be in the format of 'column' => TRUE, ie: 'regular_time => TRUE
setColumnDataConfig()  : bool
setCompanyFormConfig()  : bool
Uses UserReportData class to save the form config for the entire company.
setConfig()  : bool
Set all options at once.
setCurrencyObject()  : bool
setCustomColumnConfig()  : bool
setCustomFilterConfig()  : bool
setEnableSystemColumns()  : bool
When this is enabled, it ignores checking that the columns returned are actually in the list of available columns.
setExecutionMemoryLimit()  : bool
Defines the max execution memory limit for PHP
setExecutionTimeLimit()  : bool
Defines the max execution timelimit for PHP
setFilterConfig()  : bool
Store filter options
setFormConfig()  : bool
Used for government form config.
setGroupConfig()  : bool
Grouping options - Use a single re-orderable dropdown for grouping options? Add function like: getGroupOptions( $columns ), that only shows the possible group_by columns based on the displayed columns?
setOtherConfig()  : bool
Misc. options
setPageBreakConfig()  : bool
Page Break On options - Use a single re-orderable dropdown for page break options.
setPermissionObject()  : bool
setQueryStatementTimeout()  : bool
setSortConfig()  : bool
Sorting options When sub-totaling, we must sort by the sub-total columns *first*, otherwise the sub-totals won't be in the right place.
setSubTotalConfig()  : bool
Sub-Total options - If grouping is being used, we can only sub-total based on grouped columns.
setUserObject()  : bool
Object of the user generating the report, we use this to base permission checks on, etc.
sort()  : bool
Sort data
sortFormData()  : bool
subTotal()  : bool
Calculate subtotals - This must be done *after* sorting, as the data may need to be re-sorted to properly merge sub-totals back into main array.
Total()  : bool
Calculate overall total in memory before we do any sub-totaling, then append *after* subtotaling is complete.
validateConfig()  : null|Validator
Validates report config, mainly so users aren't surprised when they set group by options that aren't doing anything.
__getOptions()  : array<string|int, mixed>|null
_checkPermissions()  : bool
_getOptions()  : array<string|int, mixed>|bool|mixed|null
_validateConfig()  : bool

Properties

$duplicate_value_ignored_columns

public mixed $duplicate_value_ignored_columns = ['first_name' => \true, 'last_name' => \true, 'verified_time_sheet' => \true, 'verified_time_sheet_date' => \true, 'date_stamp' => \true, 'start_date' => \true, 'end_date' => \true, 'start_time' => \true, 'end_time' => \true]

$file_mime_type

public mixed $file_mime_type = 'application/pdf'

$api_message_id

protected mixed $api_message_id = \null

$config

protected mixed $config = ['other' => [ 'report_name' => '', //Name to be displayed on the report. 'is_embedded' => \false, //Is it an embedded report that should hide things like the description header? 'disable_grand_total' => \false, //'output_format' => 'pdf', //PDF, PDF_PRINT, PDF_FORM(Tax Form), PDF_FORM_PRINT(Print Tax Form), HTML, EMAIL 'page_orientation' => 'P', //Portrait 'page_format' => 'LETTER', //Letter/Legal 'default_font' => '', //Leave blank to default to locale specific font. //'default_font' => 'helvetica', //Core PDF font, works with setFontSubsetting(TRUE) and is fast with small PDF sizes. //'default_font' => 'freeserif', //Slow with setFontSubsetting(TRUE), produces PDFs at least 1mb. 'maximum_page_limit' => 100, //User configurable limit to prevent accidental large report generation. Don't allow it to be more than 1000. 'maximum_row_limit' => \false, //postProcessing maximum number of rows. //Set limits high for On-Site installs, this is all configurable in the .ini file though. 'query_statement_timeout' => 600000, //In milliseconds. Default to 10 minutes. 'maximum_memory_limit' => '3072M', 'maximum_execution_limit' => 1800, //30 Minutes 'font_size' => 0, //+5, +4, .., +1, 0, -1, ..., -4, -5 (adjusts relative font size) 'table_header_font_size' => 8, 'table_row_font_size' => 8, 'table_header_word_wrap' => 10, //Characters per word when wrapping. 'table_data_word_wrap' => 50, //Characters per word when wrapping data on each row of the report. 'top_margin' => 5, //Allow the user to adjust the left/top margins for different printers. 'bottom_margin' => 5, 'left_margin' => 5, 'right_margin' => 5, 'adjust_horizontal_position' => 0, //We may need these for government forms/check printing, for on-page adjustments. 'adjust_vertical_position' => 0, 'show_blank_values' => \true, //Uses "- -" in place of a blank value. 'blank_value_placeholder' => '-', //Used to replace blank values with. Was '- -' 'show_duplicate_values' => \false, //Hides duplicate values in the same columns. 'duplicate_value_placeholder' => ' ', //Used to replace duplicate values with. Can't be '' as that represents a blank value. 'auto_refresh' => \false, ], 'chart' => [ 'enable' => \false, 'type' => 10, //'horizontal_bar', // horizontal_bar, vertical_bar, pie //'type' => 'vertical_bar', // horizontal_bar, vertical_bar, pie 'display_mode' => 10, //Displays chart above/below table data 'point_labels' => \true, //Show bar/point labels. 'include_sub_total' => \false, //Include sub_totals in chart. 'axis_scale_min' => \false, //Set y_axis_minimum value, to rebase the axis scale on. 'axis_scale_static' => \false, //Keeps the same axis scale for all graphs in a group. 'combine_columns' => \true, ]]

$custom_column_dynamic_types

protected mixed $custom_column_dynamic_types = [ 400, //Integer 410, //Decimal 420, //Decimal 1300, ]

$data_column_widths

protected mixed $data_column_widths = \null

$enable_system_columns

protected mixed $enable_system_columns = \false

$maximum_memory_limit

protected mixed $maximum_memory_limit = \false

$PDF_IMAGE_SCALE_RATIO

protected mixed $PDF_IMAGE_SCALE_RATIO = 1.25

$progress_bar_obj

protected mixed $progress_bar_obj = \null

Methods

__construct()

AuditTrailReport constructor.

public __construct() : mixed
Return values
mixed

_getData()

Get raw data for report

public _getData([null $format = null ]) : bool
Parameters
$format : null = null
Return values
bool

_html()

public _html() : bool|null|string
Return values
bool|null|string

_html_Chart()

public _html_Chart() : bool
Return values
bool

_html_checkMaximumPageLimit()

public _html_checkMaximumPageLimit( $cur) : bool
Parameters
$cur :
Return values
bool

_html_CSS()

public _html_CSS() : string
Return values
string

_html_fontSize()

public _html_fontSize( $size) : float
Parameters
$size :
Return values
float
public _html_Footer() : mixed
Return values
mixed

_html_Header()

public _html_Header() : bool
Return values
bool

_html_Initialize()

public _html_Initialize() : bool
Return values
bool

_html_setPageOrientationCSS()

public _html_setPageOrientationCSS() : string
Return values
string

_html_Table()

public _html_Table() : bool
Return values
bool

_html_TopSummary()

public _html_TopSummary() : bool
Return values
bool

_output()

public _output([null $format = null ]) : array<string|int, mixed>|bool
Parameters
$format : null = null
Return values
array<string|int, mixed>|bool

_pdf_AddPage()

public _pdf_AddPage() : bool
Return values
bool

_pdf_Chart()

public _pdf_Chart() : bool
Return values
bool

_pdf_checkMaximumPageLimit()

public _pdf_checkMaximumPageLimit() : bool
Return values
bool

_pdf_checkPageBreak()

public _pdf_checkPageBreak( $height[, bool $add_page = true ]) : bool
Parameters
$height :
$add_page : bool = true
Return values
bool

_pdf_detectPageSize()

public _pdf_detectPageSize( $column_options,  $columns) : array<string|int, mixed>
Parameters
$column_options :
$columns :
Return values
array<string|int, mixed>

_pdf_displayMaximumPageLimitError()

public _pdf_displayMaximumPageLimitError() : bool
Return values
bool

_pdf_drawLine()

public _pdf_drawLine([int $width = 3 ]) : bool
Parameters
$width : int = 3
Return values
bool

_pdf_fontSize()

public _pdf_fontSize( $size) : float
Parameters
$size :
Return values
float
public _pdf_Footer() : bool
Return values
bool

_pdf_getColumnHeight()

public _pdf_getColumnHeight( $text,  $layout[, bool $wrap_width = false ]) : float|int
Parameters
$text :
$layout :
$wrap_width : bool = false
Return values
float|int

_pdf_getColumnWidth()

public _pdf_getColumnWidth( $text,  $layout[, bool $wrap_width = false ]) : float|int
Parameters
$text :
$layout :
$wrap_width : bool = false
Return values
float|int

_pdf_getLargestWrappedWord()

public _pdf_getLargestWrappedWord( $string, string $width,  $layout) : null
Parameters
$string :
$width : string

UUID

$layout :
Return values
null

_pdf_getMaximumHeightFromArray()

public _pdf_getMaximumHeightFromArray( $columns,  $column_options, array<string|int, mixed> $column_widths, string $wrap_width, int $min_height[, int $multiplier = 1 ][, int $multiplier_threshold = null ]) : int
Parameters
$columns :
$column_options :
$column_widths : array<string|int, mixed>
$wrap_width : string

UUID

$min_height : int
$multiplier : int = 1

Multiplier on the detected height in case its off slightly.

$multiplier_threshold : int = null

Threshold value as to when the multiplier should be used.

Return values
int

_pdf_getPageSizeDimensionsFromWidth()

public _pdf_getPageSizeDimensionsFromWidth(string $min_width) : array<string|int, mixed>
Parameters
$min_width : string

UUID

Return values
array<string|int, mixed>

_pdf_getTableColumnWidths()

public _pdf_getTableColumnWidths( $columns,  $layout[, bool $fill_page = true ][, bool $wrap_width = false ]) : array<string|int, mixed>|bool
Parameters
$columns :
$layout :
$fill_page : bool = true
$wrap_width : bool = false
Return values
array<string|int, mixed>|bool

_pdf_Header()

public _pdf_Header() : bool
Return values
bool

_pdf_Initialize()

public _pdf_Initialize() : bool
Return values
bool

_pdf_scaleSize()

public _pdf_scaleSize( $size) : float
Parameters
$size :
Return values
float

_pdf_Table()

Generate PDF.

public _pdf_Table() : bool
Tags
noinspection

PhpUnusedLocalVariableInspection

Return values
bool

_pdf_TopSummary()

public _pdf_TopSummary() : bool
Return values
bool

_pdf_unitsToPixels()

public _pdf_unitsToPixels( $size) : mixed
Parameters
$size :
Return values
mixed

_postGroup()

Place holder for after group() has been called, process the data for each report.

public _postGroup() : bool
Return values
bool

_postOutput()

public _postOutput([null $format = null ]) : bool
Parameters
$format : null = null
Return values
bool

_postProcess()

public _postProcess([null $format = null ]) : bool
Parameters
$format : null = null
Return values
bool

_preOutput()

public _preOutput([null $format = null ]) : bool
Parameters
$format : null = null
Return values
bool

_preProcess()

PreProcess data such as calculating additional columns from raw data etc.

public _preProcess() : bool

..

Return values
bool

calculateCustomColumnFilters()

public calculateCustomColumnFilters(int $type_id) : bool
Parameters
$type_id : int
Return values
bool

calculateCustomColumns()

public calculateCustomColumns(int $type_id) : bool
Parameters
$type_id : int
Return values
bool

chart()

public chart( $format) : bool
Parameters
$format :
Return values
bool

checkPermissions()

public checkPermissions() : bool
Return values
bool

columnFormatter()

public columnFormatter( $type,  $column, mixed $value[, null $format = null ]) : array<string|int, mixed>|bool|false|mixed|null|string
Parameters
$type :
$column :
$value : mixed
$format : null = null
Return values
array<string|int, mixed>|bool|false|mixed|null|string

convertArrayNumericKeysToString()

Used for converting $test[] = blah, or $test[] = array( 'col' => blah ) to $test['col'] => $blah.

public convertArrayNumericKeysToString( $arr) : array<string|int, mixed>|bool

Mainly for multi-dimension awesomebox group by, sub_total by, sorting...

Parameters
$arr :
Return values
array<string|int, mixed>|bool

convertTimePeriodToStartEndDate()

public convertTimePeriodToStartEndDate( $time_period_arr[, null $prefix = null ][, bool $force_dates_for_pay_periods = false ]) : array<string|int, mixed>|bool
Parameters
$time_period_arr :
$prefix : null = null
$force_dates_for_pay_periods : bool = false
Return values
array<string|int, mixed>|bool

currencyConvertToBase()

public currencyConvertToBase() : bool
Return values
bool

downloadOutput()

public downloadOutput() : bool
Return values
bool

email()

public email( $output[, object $report_schedule_obj = null ]) : bool
Parameters
$output :
$report_schedule_obj : object = null
Return values
bool

emailOutput()

public emailOutput() : bool
Return values
bool

formatGroupConfig()

public formatGroupConfig() : array<string|int, mixed>|bool
Return values
array<string|int, mixed>|bool

formatSubTotalConfig()

When multiple columns are selected for sub-totaling, we need to multiply the sub-total passes, ie: pay_period, branch, department would need to sub-total on pay_period.branch.department, pay_period.branch, pay_period

public formatSubTotalConfig() : array<string|int, mixed>|bool
Return values
array<string|int, mixed>|bool

getAPIMessageID()

Returns the API messageID for each individual call.

public getAPIMessageID() : bool|null
Return values
bool|null

getBaseCurrencyObject()

public getBaseCurrencyObject() : bool|object
Return values
bool|object

getChartConfig()

public getChartConfig() : bool|mixed
Return values
bool|mixed

getColumnConfig()

public getColumnConfig() : bool|mixed
Return values
bool|mixed

getColumnDataConfig()

public getColumnDataConfig() : bool|mixed
Return values
bool|mixed

getColumnFormatConfig()

public getColumnFormatConfig() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCompanyFormConfig()

public getCompanyFormConfig() : bool|array<string|int, mixed>
Return values
bool|array<string|int, mixed>

getConfig()

Get all options

public getConfig() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCurrencyConvertToBase()

Object of the currency used in the report, we use this to base currency column formats on.

public getCurrencyConvertToBase() : bool
Return values
bool

getCurrencyObject()

public getCurrencyObject() : null
Return values
null

getCustomColumnConfig()

public getCustomColumnConfig() : bool|mixed
Return values
bool|mixed

getCustomColumnFormatOptions()

public getCustomColumnFormatOptions([array<string|int, mixed> $format_options = [] ]) : array<string|int, mixed>
Parameters
$format_options : array<string|int, mixed> = []
Return values
array<string|int, mixed>

getCustomFieldColumns()

public getCustomFieldColumns( $prefix_begin_counter,  $company_id,  $parent_table,  $no_prefix_parent_table) : array<string|int, mixed>|bool
Parameters
$prefix_begin_counter :
$company_id :
$parent_table :
$no_prefix_parent_table :
Return values
array<string|int, mixed>|bool

getCustomFieldFormatOptions()

public getCustomFieldFormatOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCustomFields()

public getCustomFields( $company_id,  $parent_table,  $no_prefix_parent_table) : array<string|int, mixed>
Parameters
$company_id :
$parent_table :
$no_prefix_parent_table :
Return values
array<string|int, mixed>

getCustomFilterConfig()

public getCustomFilterConfig() : bool|mixed
Return values
bool|mixed

getData()

Get raw data for report

public getData( $format) : bool
Parameters
$format :
Return values
bool

getDescription()

public getDescription( $label[, null $params = null ]) : bool|string
Parameters
$label :
$params : null = null
Return values
bool|string

getDescriptionBlock()

Returns the full description block of text.

public getDescriptionBlock([bool $html = false ][, bool $relative_time_period = false ]) : string
Parameters
$html : bool = false
$relative_time_period : bool = false
Return values
string

getDynamicCustomFieldColumns()

public getDynamicCustomFieldColumns( $prefix_begin_counter,  $company_id,  $parent_table,  $no_prefix_parent_table) : array<string|int, mixed>
Parameters
$prefix_begin_counter :
$company_id :
$parent_table :
$no_prefix_parent_table :
Return values
array<string|int, mixed>

getEnableSystemColumns()

public getEnableSystemColumns() : bool
Return values
bool

getFileMimeType()

Returns the default file mime type if none is specified.

public getFileMimeType() : string
Return values
string

getFileName()

Returns the default file name if none is specified.

public getFileName() : string
Return values
string

getFilterConfig()

public getFilterConfig() : bool|mixed
Return values
bool|mixed

getFormConfig()

public getFormConfig() : bool|mixed
Return values
bool|mixed

getGroupConfig()

public getGroupConfig() : bool|mixed
Return values
bool|mixed

getLargestColumnData()

Return the string from each column that is the largest, so we can base the column widths on these.

public getLargestColumnData( $columns[, bool $include_headers = true ]) : array<string|int, mixed>
Parameters
$columns :
$include_headers : bool = true
Return values
array<string|int, mixed>

getOptions()

Return options from sub-class for things like columns, sorting columns, grouping columns, sub-total columns, etc.

public getOptions( $name[, null $params = null ]) : bool|mixed

..

Parameters
$name :
$params : null = null
Return values
bool|mixed

getOtherConfig()

public getOtherConfig() : bool|mixed
Return values
bool|mixed

getOutput()

public getOutput([null $format = null ]) : array<string|int, mixed>|bool
Parameters
$format : null = null
Return values
array<string|int, mixed>|bool

getPageBreakConfig()

public getPageBreakConfig() : bool|mixed
Return values
bool|mixed

getPermissionObject()

public getPermissionObject() : null
Return values
null

getReportColumns()

When using grouping, we have to be able to get a list of just the columns that will be displayed for reporting purposes.

public getReportColumns([bool $num = false ]) : bool|mixed
Parameters
$num : bool = false
Return values
bool|mixed

getReportCustomFields()

public getReportCustomFields() : mixed
Return values
mixed

getSortConfig()

public getSortConfig() : bool|mixed
Return values
bool|mixed

getStaticCustomFieldColumns()

public getStaticCustomFieldColumns( $prefix_begin_counter,  $company_id,  $parent_table,  $no_prefix_parent_table) : array<string|int, mixed>
Parameters
$prefix_begin_counter :
$company_id :
$parent_table :
$no_prefix_parent_table :
Return values
array<string|int, mixed>

getSubTotalColumnLabelPosition()

public getSubTotalColumnLabelPosition( $row,  $columns,  $sub_total_columns) : bool|mixed
Parameters
$row :
$columns :
$sub_total_columns :
Return values
bool|mixed

getSubTotalConfig()

public getSubTotalConfig() : bool|mixed
Return values
bool|mixed

getTable()

Used for TTLog::addEntry.

public getTable() : string
Return values
string

getTemplate()

public getTemplate( $name) : bool|mixed
Parameters
$name :
Return values
bool|mixed

getTimePeriodFormatOptions()

public getTimePeriodFormatOptions([array<string|int, mixed> $format_options = [] ]) : array<string|int, mixed>
Parameters
$format_options : array<string|int, mixed> = []
Return values
array<string|int, mixed>

group()

Group Data - Automatically include all static columns that are also selected to be viewed, so the user doesn't have to re-select all columns twice.

public group() : bool

Its actually the opposite, select on NON-static columns, and ignore all static columns except the grouped columns.

Return values
bool

handleReportCurrency()

public handleReportCurrency( $currency_convert_to_base, object $base_currency_obj,  $filter_data) : bool
Parameters
$currency_convert_to_base :
$base_currency_obj : object
$filter_data :
Return values
bool

hasData()

public hasData() : bool
Return values
bool

isEnabledChart()

public isEnabledChart() : bool
Return values
bool

isSystemLoadValid()

public isSystemLoadValid() : bool
Return values
bool

loadTemplate()

Loads a template config.

public loadTemplate( $name) : bool
Parameters
$name :
Return values
bool

pageBreak()

Calculate page break points - This must be done *after* sub-totaling and sorting, as the data may need to be re-sorted to properly merge page break points back into main array.

public pageBreak() : bool
Return values
bool

postGroup()

After group() has been called, process the data.

public postGroup() : bool
Return values
bool

postProcess()

Last operation before displaying data to the user, format data within locale, add dollar signs, thousand separators etc... This increases performance when heavy grouping is used, as there is less data to process.

public postProcess([null $format = null ]) : bool

As well it reduces memory usage as we can overwrite columns with nicely displaying columns instead. Unfortunatley the above performance optimizations dont' work, so we need to postProcess immediately after preProcess as sometimes there are columns postProcess needs that grouping will drop. For example when two or three columns are required to postProcess into a single column. If group_by on that single column happens before postProcess, all the necessary data will be lost. This will have to be one of the restrictions, that postProcess can only use a SINGLE column at a time, as its not guaranteed to have more than that due to grouping.

Parameters
$format : null = null
Return values
bool

preProcess()

PreProcess data such as calculating additional columns (Day of Week, Year Quarter, combined multiple columns together, etc...) from raw data etc.

public preProcess([null $format = null ]) : bool

..

Parameters
$format : null = null
Return values
bool

setAPIMessageID()

public setAPIMessageID(string $id) : bool
Parameters
$id : string

UUID

Return values
bool

setChartConfig()

public setChartConfig( $data) : bool
Parameters
$data :
Return values
bool

setColumnConfig()

Store column options - This must be in the format of 'column' => TRUE, ie: 'regular_time => TRUE

public setColumnConfig( $data) : bool
Parameters
$data :
Return values
bool

setColumnDataConfig()

public setColumnDataConfig( $data) : bool
Parameters
$data :
Return values
bool

setCompanyFormConfig()

Uses UserReportData class to save the form config for the entire company.

public setCompanyFormConfig([null $data = null ]) : bool

NOTE: This is duplicated in SetupPresets class. If you change it here, change it there too.

Parameters
$data : null = null
Return values
bool

setConfig()

Set all options at once.

public setConfig( $data) : bool
Parameters
$data :
Return values
bool

setCurrencyObject()

public setCurrencyObject(object $obj) : bool
Parameters
$obj : object
Return values
bool

setCustomColumnConfig()

public setCustomColumnConfig( $columns) : bool
Parameters
$columns :
Return values
bool

setCustomFilterConfig()

public setCustomFilterConfig( $data) : bool
Parameters
$data :
Return values
bool

setEnableSystemColumns()

When this is enabled, it ignores checking that the columns returned are actually in the list of available columns.

public setEnableSystemColumns( $bool) : bool

Useful for when we need reports to return IDs and such, like when sending AgencyReprots to TimeTrex PaymentServices.

Parameters
$bool :
Return values
bool

setExecutionMemoryLimit()

Defines the max execution memory limit for PHP

public setExecutionMemoryLimit([bool $str = false ]) : bool
Parameters
$str : bool = false
Return values
bool

setExecutionTimeLimit()

Defines the max execution timelimit for PHP

public setExecutionTimeLimit([bool $int = false ]) : bool
Parameters
$int : bool = false
Return values
bool

setFilterConfig()

Store filter options

public setFilterConfig( $data) : bool
Parameters
$data :
Return values
bool

setFormConfig()

Used for government form config.

public setFormConfig( $data) : bool
Parameters
$data :
Return values
bool

setGroupConfig()

Grouping options - Use a single re-orderable dropdown for grouping options? Add function like: getGroupOptions( $columns ), that only shows the possible group_by columns based on the displayed columns?

public setGroupConfig( $data) : bool
Parameters
$data :
Return values
bool

setOtherConfig()

Misc. options

public setOtherConfig( $data) : bool
Parameters
$data :
Return values
bool

setPageBreakConfig()

Page Break On options - Use a single re-orderable dropdown for page break options.

public setPageBreakConfig( $data) : bool
Parameters
$data :
Return values
bool

setPermissionObject()

public setPermissionObject(object $obj) : bool
Parameters
$obj : object
Return values
bool

setQueryStatementTimeout()

public setQueryStatementTimeout([null $milliseconds = null ]) : bool
Parameters
$milliseconds : null = null
Return values
bool

setSortConfig()

Sorting options When sub-totaling, we must sort by the sub-total columns *first*, otherwise the sub-totals won't be in the right place.

public setSortConfig( $data) : bool
Parameters
$data :
Return values
bool

setSubTotalConfig()

Sub-Total options - If grouping is being used, we can only sub-total based on grouped columns.

public setSubTotalConfig( $data) : bool

In any case we can't sub-total by the last column, as that wouldn't make any sense anyways.

Parameters
$data :
Return values
bool

setUserObject()

Object of the user generating the report, we use this to base permission checks on, etc.

public setUserObject(object $obj) : bool

..

Parameters
$obj : object
Return values
bool

sort()

Sort data

public sort() : bool
Return values
bool

sortFormData()

public sortFormData() : bool
Return values
bool

subTotal()

Calculate subtotals - This must be done *after* sorting, as the data may need to be re-sorted to properly merge sub-totals back into main array.

public subTotal() : bool
Return values
bool

Total()

Calculate overall total in memory before we do any sub-totaling, then append *after* subtotaling is complete.

public Total() : bool
Return values
bool

validateConfig()

Validates report config, mainly so users aren't surprised when they set group by options that aren't doing anything.

public validateConfig([bool $format = false ]) : null|Validator
Parameters
$format : bool = false
Return values
null|Validator

__getOptions()

protected __getOptions( $name[, null $params = null ]) : array<string|int, mixed>|null
Parameters
$name :
$params : null = null
Return values
array<string|int, mixed>|null

_checkPermissions()

protected _checkPermissions(string $user_id, string $company_id) : bool
Parameters
$user_id : string

UUID

$company_id : string

UUID

Return values
bool

_getOptions()

protected _getOptions( $name[, null $params = null ]) : array<string|int, mixed>|bool|mixed|null
Parameters
$name :
$params : null = null
Return values
array<string|int, mixed>|bool|mixed|null

Search results