Balance
class Balance extends Model implements Recyclable, Clearable, Segregatable
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 | ||
| int | $year | ||
| string | $reference | ||
| string | $transaction_no | ||
| string | $transaction_type | ||
| string | $balance_type | ||
| float | $total_amount | ||
| float | $balance | ||
| Carbon | $destroyed_at | ||
| Carbon | $deleted_at |
Methods
Cleared Transaction amount as at the end of the given date.
Construct new Balance.
Get Human Readable Balance Type.
Get Human Readable Balance types
Instance Identifier.
Instance Type Translator.
Instance Transaction Type Translator.
is_posted analog for Assignment model.
is_credited analog for Assignment model.
cleared_type analog for Assignment model.
amount analog for Assignment model.
Balance Currency.
Balance Account.
Balance Exchange Rate.
Balance Reporting Period.
Balance attributes.
Balance Validation.
Details
in
Segregating at line 28
static void
bootSegregating()
Register EntityScope for Model.
in
Segregating at line 46
BelongsTo
entity()
Model's Parent Entity.
in
Recycling at line 28
static void
bootRecycling()
Model recycling events.
in
Recycling at line 73
MorphMany
recycled()
Recycled Model records.
in
Clearing at line 26
getClearedAmountAttribute()
Cleared Transaction amount.
in
Clearing at line 45
float
clearedAmountAsAt(Carbon $date)
Cleared Transaction amount as at the end of the given date.
in
Clearing at line 62
HasMany
clearances()
Cleared Model records.
Matched on cleared_type and not the class, which for a Transaction subclass such as a ClientInvoice is not the type its clearances are stored under.
in
ModelTablePrefix at line 22
getTable()
Determine the model table name
at line 102
__construct($attributes = [])
Construct new Balance.
at line 122
static string
getType(string $type)
Get Human Readable Balance Type.
at line 134
static array
getTypes(array $types)
Get Human Readable Balance types
at line 149
string
toString($type = false)
Instance Identifier.
at line 161
string
getTypeAttribute()
Instance Type Translator.
at line 171
string
getTransactionAttribute()
Instance Transaction Type Translator.
at line 179
bool
getIsPostedAttribute()
is_posted analog for Assignment model.
at line 189
bool
getIsCreditedAttribute()
is_credited analog for Assignment model.
at line 199
string
getClearedTypeAttribute()
cleared_type analog for Assignment model.
at line 209
float
getAmountAttribute()
amount analog for Assignment model.
at line 219
BelongsTo
currency()
Balance Currency.
at line 229
BelongsTo
account()
Balance Account.
at line 239
BelongsTo
exchangeRate()
Balance Exchange Rate.
at line 249
BelongsTo
reportingPeriod()
Balance Reporting Period.
at line 259
object
attributes()
Balance attributes.
at line 269
bool
save(array $options = [])
Balance Validation.