Transaction
class Transaction extends Model implements Segragatable, Recyclable, Clearable, Assignable
Class Transaction
Traits
Constants
MODELNAME |
Transaction Model Name |
CS |
Transaction Types |
IN |
|
CN |
|
RC |
|
CP |
|
BL |
|
DN |
|
PY |
|
CE |
|
JN |
|
Properties
protected array | $fillable | The attributes that are mass assignable. | |
Entity | $entity | ||
ExchangeRate | $exchangeRate | ||
Account | $account | ||
Currency | $currency | ||
Carbon | $transaction_date | ||
string | $reference | ||
string | $transaction_no | ||
string | $transaction_type | ||
string | $narration | ||
bool | $credited | ||
float | $amount | ||
Carbon | $destroyed_at | ||
Carbon | $deleted_at |
Methods
Construct new Transaction.
Get Human Readable Transaction type
Get Human Readable Transaction types
The next Transaction number for the transaction type and transaction_date.
Transaction Saved Line Items.
Transaction Ledgers.
Transaction Currency.
Transaction Account.
Transaction Exchange Rate.
Transaction Assignments.
isPosted analog for Assignment model.
isCredited analog for Assignment model.
Cleared Object type.
getAmount analog for Assignment model.
Transaction attributes.
Get Transaction LineItems.
Relate LineItems to Transaction.
Post Transaction to the Ledger.
Check Transaction Relationships.
Check Transaction Integrity.
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 109
__construct($attributes = [])
Construct new Transaction.
at line 171
static string
getType(string $type)
Get Human Readable Transaction type
at line 183
static array
getTypes(array $types)
Get Human Readable Transaction types
at line 201
static string
transactionNo(string $type, Carbon $transaction_date = null)
The next Transaction number for the transaction type and transaction_date.
at line 221
HasMany
lineItems()
Transaction Saved Line Items.
at line 231
HasMany
ledgers()
Transaction Ledgers.
at line 241
BelongsTo
currency()
Transaction Currency.
at line 251
BelongsTo
account()
Transaction Account.
at line 261
BelongsTo
exchangeRate()
Transaction Exchange Rate.
at line 271
HasMany
assignments()
Transaction Assignments.
at line 279
bool
isPosted()
isPosted analog for Assignment model.
at line 289
bool
isCredited()
isCredited analog for Assignment model.
at line 299
string
getClearedType()
Cleared Object type.
at line 309
float
getAmount()
getAmount analog for Assignment model.
at line 331
object
attributes()
Transaction attributes.
at line 341
array
getLineItems()
Get Transaction LineItems.
at line 354
void
addLineItem(LineItem $lineItem)
Add LineItem to Transaction LineItems.
at line 374
void
removeLineItem(LineItem $lineItem)
Remove LineItem from Transaction LineItems.
at line 396
bool
save(array $options = [])
Relate LineItems to Transaction.
at line 425
void
post()
Post Transaction to the Ledger.
at line 439
bool
delete()
Check Transaction Relationships.
at line 460
bool
checkIntegrity()
Check Transaction Integrity.