CashSale
class CashSale extends Transaction implements Sells, Fetchable
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
Construct new CashSale
The next Transaction number for the transaction type and transaction_date.
Validate CashSale Main Account
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 42
__construct($attributes = [])
Construct new CashSale
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.
at line 53
bool
save(array $options = [])
Validate CashSale Main Account
in Selling at line 33
void
post()
Validate Selling Transaction LineItems.
in Transaction at line 439
bool
delete()
Check Transaction Relationships.
in Transaction at line 460
bool
checkIntegrity()
Check Transaction Integrity.