Account
class Account extends Model implements Recyclable, Segregatable
Class Account
Traits
Constants
| NON_CURRENT_ASSET |
Account Type. |
| CONTRA_ASSET |
|
| INVENTORY |
|
| BANK |
|
| CURRENT_ASSET |
|
| RECEIVABLE |
|
| NON_CURRENT_LIABILITY |
|
| CONTROL |
|
| CURRENT_LIABILITY |
|
| PAYABLE |
|
| EQUITY |
|
| OPERATING_REVENUE |
|
| OPERATING_EXPENSE |
|
| NON_OPERATING_REVENUE |
|
| DIRECT_EXPENSE |
|
| OVERHEAD_EXPENSE |
|
| OTHER_EXPENSE |
|
| RECONCILIATION |
|
| PURCHASABLES |
Purchaseable Account Types |
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 |
Methods
Get Human Readable Account types
Get Human Readable Account Type.
Get all accounts with opening balances for the given year
Chart of Account Section Balances for the Reporting Period.
Instance Type.
Instance Identifier.
Account Currency.
Account Category.
Account Balances.
Account attributes.
Get Account's Closing Balances for the Reporting Period.
Get Account's Opening Balances for the Reporting Period.
Get Account's Current Balances for the Period given, both of its days included.
Check if the account has closing transactions.
Get the account's has closing transactions.
Get Account's Transactions for the Reporting Period.
Account Transactions Query
Validate Account.
Check for Current Year Transactions.
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
ModelTablePrefix at line 22
getTable()
Determine the model table name
at line 117
static array
getTypes(array $types)
Get Human Readable Account types
at line 134
static string
getType(string $type)
Get Human Readable Account Type.
at line 147
static array
openingBalances(int $year, Entity|null $entity = null)
Get all accounts with opening balances for the given year
at line 183
static array
sectionBalances(array $accountTypes, string|Carbon $startDate = null, string|Carbon $endDate = null, bool $fullBalance = true, Entity|null $entity = null)
Chart of Account Section Balances for the Reporting Period.
at line 258
string
getTypeAttribute()
Instance Type.
at line 268
string
toString($type = false)
Instance Identifier.
at line 278
BelongsTo
currency()
Account Currency.
at line 288
BelongsTo
category()
Account Category.
at line 298
HasMany
balances()
Account Balances.
at line 308
object
attributes()
Account attributes.
at line 322
array
closingBalance(string|null $endDate = null, int|null $currencyId = null)
Get Account's Closing Balances for the Reporting Period.
at line 345
array
openingBalance(int|null $year = null, int|null $currencyId = null)
Get Account's Opening Balances for the Reporting Period.
at line 391
array
currentBalance(Carbon|null $startDate = null, Carbon|null $endDate = null, int|null $currencyId = null)
Get Account's Current Balances for the Period given, both of its days included.
at line 406
bool
isClosed(int|null $year = null)
Check if the account has closing transactions.
at line 443
array
closingTransactions(int|null $year = null)
Get the account's has closing transactions.
at line 481
array
getTransactions(string|null $startDate = null, string|null $endDate = null)
Get Account's Transactions for the Reporting Period.
at line 499
Builder
transactionsQuery(Carbon $startDate, Carbon $endDate, int|null $currencyId = null)
Account Transactions Query
at line 539
bool
save(array $options = [])
Validate Account.
at line 593
bool
delete()
Check for Current Year Transactions.