class Balance extends Model implements Recyclable, Clearable, Segragatable

Class Balance

Traits

Constants

MODELNAME

Balance Model Name

DEBIT

Balance Type

CREDIT

Properties

protected array $fillable The attributes that are mass assignable.
Entity $entity
Account $account
Currency $currency
ExchangeRate $exchangeRate
integer $year
string $reference
string $transaction_no
string $transaction_type
string $balance_type
float $amount
Carbon $destroyed_at
Carbon $deleted_at

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
clearedAmount()

Cleared Transaction amount.

from Clearing
MorphMany
clearances()

Cleared Model records.

from Clearing
getTable()

Determine the model table name

__construct($attributes = [])

Construct new Balance.

static string
getType(string $type)

Get Human Readable Balance Type.

static array
getTypes(array $types)

Get Human Readable Balance types

bool
isPosted()

isPosted analog for Assignment model.

bool
isCredited()

isCredited analog for Assignment model.

string
getClearedType()

Cleared Object type.

string
getAmount()

getAmount analog for Assignment model.

BelongsTo
currency()

Balance Currency.

BelongsTo
account()

Balance Account.

BelongsTo
exchangeRate()

Balance Exchange Rate.

object
attributes()

Balance attributes.

bool
save(array $options = [])

Balance Validation.

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 Clearing at line 21
clearedAmount()

Cleared Transaction amount.

in Clearing at line 35
MorphMany clearances()

Cleared Model records.

Return Value

MorphMany

in ModelTablePrefix at line 20
getTable()

Determine the model table name

at line 95
__construct($attributes = [])

Construct new Balance.

Parameters

$attributes

at line 125
static string getType(string $type)

Get Human Readable Balance Type.

Parameters

string $type

Return Value

string

at line 137
static array getTypes(array $types)

Get Human Readable Balance types

Parameters

array $types

Return Value

array

at line 150
bool isPosted()

isPosted analog for Assignment model.

Return Value

bool

at line 160
bool isCredited()

isCredited analog for Assignment model.

Return Value

bool

at line 170
string getClearedType()

Cleared Object type.

Return Value

string

at line 180
string getAmount()

getAmount analog for Assignment model.

Return Value

string

at line 190
BelongsTo currency()

Balance Currency.

Return Value

BelongsTo

at line 200
BelongsTo account()

Balance Account.

Return Value

BelongsTo

at line 210
BelongsTo exchangeRate()

Balance Exchange Rate.

Return Value

BelongsTo

at line 220
object attributes()

Balance attributes.

Return Value

object

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

Balance Validation.

Parameters

array $options

Return Value

bool