class CreditNote extends Transaction implements Sells

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
protected $dates from  Transaction
protected array $compoundEntries

Compound Ledger entries for the transaction

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
bool $compound from  Transaction
float $amount from  Transaction
float $main_account_amount from  Transaction
Carbon $destroyed_at from  Transaction
Carbon $deleted_at from  Transaction

Methods

static void
bootSegregating()

Register EntityScope for Model.

BelongsTo
entity()

Model's Parent Entity.

static void
bootRecycling()

Model recycling events.

MorphMany
recycled()

Recycled Model records.

getClearedAmountAttribute()

Cleared Transaction amount.

from  Clearing
float
clearedAmountAsAt(Carbon $date)

Cleared Transaction amount as at the end of the given date.

from  Clearing
HasMany
clearances()

Cleared Model records.

from  Clearing
getBalanceAttribute()

Balance Remaining on Transaction.

getTable()

Determine the model table name

void
addCompoundEntry(array $compoundEntry, bool $credited)

Add Compound Entry to Transaction CompoundEntries.

__construct($attributes = [])

Construct new ContraEntry

static string
getClass(string $type)

Get Transaction Class

static array
getTypes(array $types)

Get Human Readable Transaction types

static string
getType(string $type)

Get Human Readable Transaction type

string
toString($type = false)

Instance Identifier.

HasMany
ledgers()

Transaction Ledgers.

BelongsTo
currency()

Transaction Currency.

BelongsTo
account()

Transaction Account.

BelongsTo
exchangeRate()

Transaction Exchange Rate.

HasMany
assignments()

Transaction Assignments.

HasMany
lineItems()

Transaction Saved Line Items.

MorphTo
attachment()

The model attached to the transaction.

string
getTypeAttribute()

Instance Type Translator.

bool
getIsPostedAttribute()

is_posted analog for Assignment model.

bool
getIsCreditedAttribute()

is_credited analog for Assignment model.

string
getClearedTypeAttribute()

cleared_type analog for Assignment model.

float
getAmountAttribute()

amount analog for Assignment model.

array
getCompoundEntries()

Get Transaction CompoundEntries.

array
getLineItems()

Get Transaction LineItems.

array
getVatAttribute()

Total Vat amount of the transaction.

bool
getAssignableAttribute()

Transaction is assignable predicate.

bool
getClearableAttribute()

Transaction is clearable predicate.

string
getDateAttribute()

Transaction date.

object
attributes()

Transaction attributes.

bool
addLineItem(LineItem $lineItem)

Validate Selling Transaction LineItem.

from  Selling
void
removeLineItem(LineItem $lineItem)

Remove LineItem from Transaction LineItems.

array
getAssigned()

Get this Transaction's assigned Transactions.

void
addAssigned(array $toBeAssigned)

Add Transaction to this Transaction's assigned Transactions.

void
processAssigned(int|null $forexAccountId = null)

Create assignments for the assigned transactions being staged.

void
post()

Post Transaction to the Ledger.

bool
save(array $options = [])

Validate Selling Transaction Main Account.

from  Selling
static string
transactionNo(string $type, Carbon|null $transaction_date = null, Entity|null $entity = null)

The next Transaction number for the transaction type and transaction_date.

bool
delete()

Check Transaction Relationships.

bool
getHasIntegrityAttribute()

Check Transaction Integrity.

Details

in Segregating at line 28
static void bootSegregating()

Register EntityScope for Model.

Return Value

void

in Segregating at line 46
BelongsTo entity()

Model's Parent Entity.

Return Value

BelongsTo

in Recycling at line 28
static void bootRecycling()

Model recycling events.

Return Value

void

in Recycling at line 73
MorphMany recycled()

Recycled Model records.

Return Value

MorphMany

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.

Parameters

Carbon $date

Return Value

float

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.

Return Value

HasMany

in Assigning at line 18
getBalanceAttribute()

Balance Remaining on Transaction.

in ModelTablePrefix at line 22
getTable()

Determine the model table name

in Transaction at line 210
protected void addCompoundEntry(array $compoundEntry, bool $credited)

Add Compound Entry to Transaction CompoundEntries.

Parameters

array $compoundEntry
bool $credited

Return Value

void

at line 36
__construct($attributes = [])

Construct new ContraEntry

Parameters

$attributes

in Transaction at line 233
static string getClass(string $type)

Get Transaction Class

Parameters

string $type

Return Value

string

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

Get Human Readable Transaction types

Parameters

array $types

Return Value

array

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

Get Human Readable Transaction type

Parameters

string $type

Return Value

string

in Transaction at line 283
string toString($type = false)

Instance Identifier.

Parameters

$type

Return Value

string

in Transaction at line 294
HasMany ledgers()

Transaction Ledgers.

Return Value

HasMany

in Transaction at line 304
BelongsTo currency()

Transaction Currency.

Return Value

BelongsTo

in Transaction at line 314
BelongsTo account()

Transaction Account.

Return Value

BelongsTo

in Transaction at line 324
BelongsTo exchangeRate()

Transaction Exchange Rate.

Return Value

BelongsTo

in Transaction at line 334
HasMany assignments()

Transaction Assignments.

Return Value

HasMany

in Transaction at line 344
HasMany lineItems()

Transaction Saved Line Items.

Return Value

HasMany

in Transaction at line 354
MorphTo attachment()

The model attached to the transaction.

Return Value

MorphTo

in Transaction at line 364
string getTypeAttribute()

Instance Type Translator.

Return Value

string

in Transaction at line 372
bool getIsPostedAttribute()

is_posted analog for Assignment model.

Return Value

bool

in Transaction at line 382
bool getIsCreditedAttribute()

is_credited analog for Assignment model.

Return Value

bool

in Transaction at line 392
string getClearedTypeAttribute()

cleared_type analog for Assignment model.

Return Value

string

in Transaction at line 402
float getAmountAttribute()

amount analog for Assignment model.

Return Value

float

in Transaction at line 440
array getCompoundEntries()

Get Transaction CompoundEntries.

Return Value

array

in Transaction at line 464
array getLineItems()

Get Transaction LineItems.

Return Value

array

in Transaction at line 479
array getVatAttribute()

Total Vat amount of the transaction.

Return Value

array

in Transaction at line 498
bool getAssignableAttribute()

Transaction is assignable predicate.

Return Value

bool

in Transaction at line 508
bool getClearableAttribute()

Transaction is clearable predicate.

Return Value

bool

in Transaction at line 518
string getDateAttribute()

Transaction date.

Return Value

string

in Transaction at line 528
object attributes()

Transaction attributes.

Return Value

object

in Selling at line 36
bool addLineItem(LineItem $lineItem)

Validate Selling Transaction LineItem.

Parameters

LineItem $lineItem

Return Value

bool

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

Remove LineItem from Transaction LineItems.

Parameters

LineItem $lineItem

Return Value

void

in Transaction at line 604
array getAssigned()

Get this Transaction's assigned Transactions.

Return Value

array

in Transaction at line 614
void addAssigned(array $toBeAssigned)

Add Transaction to this Transaction's assigned Transactions.

Parameters

array $toBeAssigned

Return Value

void

in Transaction at line 659
void processAssigned(int|null $forexAccountId = null)

Create assignments for the assigned transactions being staged.

Parameters

int|null $forexAccountId

Return Value

void

in Transaction at line 678
void post()

Post Transaction to the Ledger.

Return Value

void

in Selling at line 24
bool save(array $options = [])

Validate Selling Transaction Main Account.

Parameters

array $options

Return Value

bool

in Transaction at line 775
static string transactionNo(string $type, Carbon|null $transaction_date = null, Entity|null $entity = null)

The next Transaction number for the transaction type and transaction_date.

Parameters

string $type
Carbon|null $transaction_date
Entity|null $entity

Return Value

string

in Transaction at line 812
bool delete()

Check Transaction Relationships.

Return Value

bool

in Transaction at line 838
bool getHasIntegrityAttribute()

Check Transaction Integrity.

Return Value

bool