ReportAccount
extends NoDatabase
in package
A Ledger account formatted for reporting purposes.
Table of Contents
- $balance : string
- $category : bool
- $code : string
- $credit : bool
- $creditBalance : string
- $currency : string
- $debit : bool
- $debitBalance : string
- $depth : int
- $extra : string
- $ledgerUuid : string
- $name : string
- $parent : string
- $total : string
- copy() : $this
- Selectively copy information from a data array.
- fromArray() : ReportAccount
- Build a new object from a data array.
- setReportTotals() : mixed
- validate() : self
Properties
$balance
public
string
$balance
Balance of this account, not including subaccount balances.
$category
public
bool
$category
Set if this is a category account.
$code
public
string
$code
The account's ledger code
$credit
public
bool
$credit
Set if this is a credit account.
$creditBalance
public
string
$creditBalance
An unsigned balance if the account has a credit, otherwise blank.
$currency
public
string
$currency
The currency that account toals/balances represent.
$debit
public
bool
$debit
Set if this is a debit account.
$debitBalance
public
string
$debitBalance
An unsigned balance if the account has a debit, otherwise blank.
$depth
public
int
$depth
The nesting level of this account in the Chart of Accounts.
$extra
public
string
$extra
Application dependent extra information for the account.
$ledgerUuid
public
string
$ledgerUuid
The account's unique ID
$name
public
string
$name
Language-resolved name of the account
$parent
public
string
$parent
Account code of the parent account (if any).
$total
public
string
$total
This is the total of the account balance plus all subaccount balances.
Methods
copy()
Selectively copy information from a data array.
public
copy(array<string|int, mixed>|object $data) : $this
Parameters
- $data : array<string|int, mixed>|object
Return values
$this —fromArray()
Build a new object from a data array.
public
static fromArray(array<string|int, mixed> $data) : ReportAccount
Parameters
- $data : array<string|int, mixed>
-
The source data.
Return values
ReportAccount —A new object populated with the data.
setReportTotals()
public
setReportTotals(int $decimals[, string $decimal = '.' ][, string $negative = '-' ][, string $thousands = '' ]) : mixed
Parameters
- $decimals : int
- $decimal : string = '.'
- $negative : string = '-'
- $thousands : string = ''
Return values
mixed —validate()
public
validate(int $opFlags) : self
Parameters
- $opFlags : int