class DebitNote extends Transaction implements Buys, Fetchable, Assignable

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 from Transaction
ExchangeRate $exchangeRate from Transaction
Account $account from Transaction
Currency $currency from Transaction
Carbon $transaction_date from Transaction
string $reference from Transaction
string $transaction_no from Transaction
string $transaction_type from Transaction
string $narration from Transaction
bool $credited from Transaction
float $amount from Transaction
Carbon $destroyed_at from Transaction
Carbon $deleted_at from Transaction

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

Balance Remaining on Transaction.

from Assigning
getTable()

Determine the model table name

__construct($attributes = [])

Construct new ContraEntry

static string
getType(string $type)

Get Human Readable Transaction type

static array
getTypes(array $types)

Get Human Readable Transaction types

static string
transactionNo(string $type, Carbon $transaction_date = null)

The next Transaction number for the transaction type and transaction_date.

HasMany
lineItems()

Transaction Saved Line Items.

HasMany
ledgers()

Transaction Ledgers.

BelongsTo
currency()

Transaction Currency.

BelongsTo
account()

Transaction Account.

BelongsTo
exchangeRate()

Transaction Exchange Rate.

HasMany
assignments()

Transaction Assignments.

bool
isPosted()

isPosted analog for Assignment model.

bool
isCredited()

isCredited analog for Assignment model.

string
getClearedType()

Cleared Object type.

float
getAmount()

getAmount analog for Assignment model.

object
attributes()

Transaction attributes.

array
getLineItems()

Get Transaction LineItems.

void
addLineItem(LineItem $lineItem)

Add LineItem to Transaction LineItems.

void
removeLineItem(LineItem $lineItem)

Remove LineItem from Transaction LineItems.

bool
save(array $options = [])

Validate Buying Transaction Main Account.

from Buying
void
post()

Validate Buying Transaction LineItems.

from Buying
bool
delete()

Check Transaction Relationships.

bool
checkIntegrity()

Check Transaction Integrity.

static Collection
fetch(Carbon $startTime = null, Carbon $endTime = null, Account $account = null, Currency $currency = null)

Fetch Transactions given the filters

from Fetching

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 Assigning at line 21
balance()

Balance Remaining on Transaction.

in ModelTablePrefix at line 20
getTable()

Determine the model table name

at line 42
__construct($attributes = [])

Construct new ContraEntry

Parameters

$attributes

in Transaction at line 171
static string getType(string $type)

Get Human Readable Transaction type

Parameters

string $type

Return Value

string

in Transaction at line 183
static array getTypes(array $types)

Get Human Readable Transaction types

Parameters

array $types

Return Value

array

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.

Parameters

string $type
Carbon $transaction_date

Return Value

string

in Transaction at line 221
HasMany lineItems()

Transaction Saved Line Items.

Return Value

HasMany

in Transaction at line 231
HasMany ledgers()

Transaction Ledgers.

Return Value

HasMany

in Transaction at line 241
BelongsTo currency()

Transaction Currency.

Return Value

BelongsTo

in Transaction at line 251
BelongsTo account()

Transaction Account.

Return Value

BelongsTo

in Transaction at line 261
BelongsTo exchangeRate()

Transaction Exchange Rate.

Return Value

BelongsTo

in Transaction at line 271
HasMany assignments()

Transaction Assignments.

Return Value

HasMany

in Transaction at line 279
bool isPosted()

isPosted analog for Assignment model.

Return Value

bool

in Transaction at line 289
bool isCredited()

isCredited analog for Assignment model.

Return Value

bool

in Transaction at line 299
string getClearedType()

Cleared Object type.

Return Value

string

in Transaction at line 309
float getAmount()

getAmount analog for Assignment model.

Return Value

float

in Transaction at line 331
object attributes()

Transaction attributes.

Return Value

object

in Transaction at line 341
array getLineItems()

Get Transaction LineItems.

Return Value

array

in Transaction at line 354
void addLineItem(LineItem $lineItem)

Add LineItem to Transaction LineItems.

Parameters

LineItem $lineItem

Return Value

void

in Transaction at line 374
void removeLineItem(LineItem $lineItem)

Remove LineItem from Transaction LineItems.

Parameters

LineItem $lineItem

Return Value

void

in Buying at line 21
bool save(array $options = [])

Validate Buying Transaction Main Account.

Parameters

array $options

Return Value

bool

in Buying at line 33
void post()

Validate Buying Transaction LineItems.

Return Value

void

in Transaction at line 439
bool delete()

Check Transaction Relationships.

Return Value

bool

in Transaction at line 460
bool checkIntegrity()

Check Transaction Integrity.

Return Value

bool

in Fetching at line 37
static Collection fetch(Carbon $startTime = null, Carbon $endTime = null, Account $account = null, Currency $currency = null)

Fetch Transactions given the filters

Parameters

Carbon $startTime
Carbon $endTime
Account $account
Currency $currency

Return Value

Collection