Documentation

Report
in package

The Report class provides methods to interact with report data in the database.

It includes functionality to retrieve reports by code and create new reports.

Table of Contents

Properties

$codeRangeGenerator  : CodeRangeGenerator
$db  : MySql

Methods

__construct()  : mixed
create()  : int
Create a report (admin).
getByCode()  : array<string|int, mixed>

Properties

Methods

create()

Create a report (admin).

public create(array<string, mixed> $data) : int

Expects in $data:

  • report_name (string, required)
  • company_id (int, required OR company_code)
  • company_code (string, required OR company_id)
  • report_type_id (int|null)
  • report_type_code (string|null)
  • time_period_id (int|null)
  • time_period_code (string|null)
  • main_export_format_code (string|null)
  • report_description (string|null)
  • sort_order (int|null)
  • status (int, default 1)
  • createdby (string, required)
  • modifiedby (string, required)
Parameters
$data : array<string, mixed>
Tags
throws
Throwable
Return values
int

newly created report.code

getByCode()

public getByCode(string $code) : array<string|int, mixed>
Parameters
$code : string
Return values
array<string|int, mixed>

        
On this page

Search results