JournalEntry
class JournalEntry extends Transaction implements Assignable, Clearable, Fetchable
Class JournalEntry
Traits
Constants
MODELNAME |
Transaction Model Name |
CS |
Transaction Types |
IN |
|
CN |
|
RC |
|
CP |
|
BL |
|
DN |
|
PY |
|
CE |
|
JN |
|
PREFIX |
Transaction Number prefix |
Properties
protected array | $fillable | The attributes that are mass assignable. | from Transaction |
Entity | $entity | ||
ExchangeRate | $exchangeRate | ||
Account | $account | ||
Currency | $currency | ||
Carbon | $transaction_date | from Transaction | |
string | $reference | ||
string | $transaction_no | ||
string | $transaction_type | ||
string | $narration | ||
bool | $credited | ||
float | $amount | ||
Carbon | $destroyed_at | ||
Carbon | $deleted_at | ||
Carbon | $date |
Methods
Construct new JournalEntry
The next Transaction number for the transaction type and transaction_date.
Details
in Segragating at line 29
static null
bootSegragating()
Register EntityScope for Model.
in Segragating at line 54
HasOne
entity()
Model's Parent Entity.
in Recycling at line 26
static void
bootRecycling()
Model recycling events.
in Recycling at line 69
MorphMany
recycled()
Recycled Model records.
in Clearing at line 21
clearedAmount()
Cleared Transaction amount.
in Clearing at line 35
MorphMany
clearances()
Cleared Model records.
in Assigning at line 21
balance()
Balance Remaining on Transaction.
in ModelTablePrefix at line 20
getTable()
Determine the model table name
at line 61
__construct($attributes = [])
Construct new JournalEntry
in Transaction at line 171
static string
getType(string $type)
Get Human Readable Transaction type
in Transaction at line 183
static array
getTypes(array $types)
Get Human Readable Transaction types
in Transaction at line 201
static string
transactionNo(string $type, Carbon $transaction_date = null)
The next Transaction number for the transaction type and transaction_date.
in Transaction at line 221
HasMany
lineItems()
Transaction Saved Line Items.
in Transaction at line 231
HasMany
ledgers()
Transaction Ledgers.
in Transaction at line 241
BelongsTo
currency()
Transaction Currency.
in Transaction at line 251
BelongsTo
account()
Transaction Account.
in Transaction at line 261
BelongsTo
exchangeRate()
Transaction Exchange Rate.
in Transaction at line 271
HasMany
assignments()
Transaction Assignments.
in Transaction at line 279
bool
isPosted()
isPosted analog for Assignment model.
in Transaction at line 289
bool
isCredited()
isCredited analog for Assignment model.
in Transaction at line 299
string
getClearedType()
Cleared Object type.
in Transaction at line 309
float
getAmount()
getAmount analog for Assignment model.
in Transaction at line 331
object
attributes()
Transaction attributes.
in Transaction at line 341
array
getLineItems()
Get Transaction LineItems.
in Transaction at line 354
void
addLineItem(LineItem $lineItem)
Add LineItem to Transaction LineItems.
in Transaction at line 374
void
removeLineItem(LineItem $lineItem)
Remove LineItem from Transaction LineItems.
in Transaction at line 396
bool
save(array $options = [])
Relate LineItems to Transaction.
in Transaction at line 425
void
post()
Post Transaction to the Ledger.
in Transaction at line 439
bool
delete()
Check Transaction Relationships.
in Transaction at line 460
bool
checkIntegrity()
Check Transaction Integrity.