class Account extends Model implements Recyclable, Segragatable

Class Account

Traits

Constants

NON_CURRENT_ASSET

Account Type.

CONTRA_ASSET

INVENTORY

BANK

CURRENT_ASSET

RECEIVABLE

NON_CURRENT_LIABILITY

CONTROL_ACCOUNT

CURRENT_LIABILITY

PAYABLE

EQUITY

OPERATING_REVENUE

OPERATING_EXPENSE

NON_OPERATING_REVENUE

DIRECT_EXPENSE

OVERHEAD_EXPENSE

OTHER_EXPENSE

RECONCILIATION

Properties

protected array $fillable The attributes that are mass assignable.
Entity $entity
Category $category
Currency $currency
int|null $code
string $name
string $description
string $account_type
Carbon $destroyed_at
Carbon $deleted_at
float $openingBalance
float $currentBalance
float $closingBalance

Methods

static null
bootSegragating()

Register EntityScope for Model.

HasOne
entity()

Model's Parent Entity.

static void
bootRecycling()

Model recycling events.

from Recycling
MorphMany
recycled()

Recycled Model records.

from Recycling
getTable()

Determine the model table name

__construct($attributes = [])

Construct new Account.

static string
getType(string $type)

Get Human Readable Account Type.

static array
getTypes(array $types)

Get Human Readable Account types

static array
sectionBalances(string $accountType, string $startDate = null, string $endDate = null)

Chart of Account Section Balances for the Reporting Period.

BelongsTo
currency()

Account Currency.

BelongsTo
category()

Account Category.

HasMany
balances()

Account Balances.

object
attributes()

Account attributes.

float
openingBalance(string $year = null)

Get Account's Opening Balance for the Reporting Period.

float
closingBalance(string $startDate = null, string $endDate = null)

Get Account's Closing Balance for the Reporting Period.

bool
save(array $options = [])

Calculate Account Code.

bool
delete()

Check for Current Year Transactions.

Details

in Segragating at line 29
static null bootSegragating()

Register EntityScope for Model.

Return Value

null

in Segragating at line 54
HasOne entity()

Model's Parent Entity.

Return Value

HasOne

in Recycling at line 26
static void bootRecycling()

Model recycling events.

Return Value

void

in Recycling at line 69
MorphMany recycled()

Recycled Model records.

Return Value

MorphMany

in ModelTablePrefix at line 20
getTable()

Determine the model table name

at line 94
__construct($attributes = [])

Construct new Account.

Parameters

$attributes

at line 109
static string getType(string $type)

Get Human Readable Account Type.

Parameters

string $type

Return Value

string

at line 121
static array getTypes(array $types)

Get Human Readable Account types

Parameters

array $types

Return Value

array

at line 140
static array sectionBalances(string $accountType, string $startDate = null, string $endDate = null)

Chart of Account Section Balances for the Reporting Period.

Parameters

string $accountType
string $startDate
string $endDate

Return Value

array

at line 179
BelongsTo currency()

Account Currency.

Return Value

BelongsTo

at line 189
BelongsTo category()

Account Category.

Return Value

BelongsTo

at line 199
HasMany balances()

Account Balances.

Return Value

HasMany

at line 209
object attributes()

Account attributes.

Return Value

object

at line 222
float openingBalance(string $year = null)

Get Account's Opening Balance for the Reporting Period.

Parameters

string $year

Return Value

float

at line 244
float closingBalance(string $startDate = null, string $endDate = null)

Get Account's Closing Balance for the Reporting Period.

Parameters

string $startDate
string $endDate

Return Value

float

at line 257
bool save(array $options = [])

Calculate Account Code.

Parameters

array $options

Return Value

bool

at line 277
bool delete()

Check for Current Year Transactions.

Return Value

bool