LineItem
class LineItem extends Model implements Recyclable, Segregatable
Class LineItem
Traits
Properties
| protected array | $fillable | The attributes that are mass assignable. |
|
| Entity | $entity | ||
| Transaction | $transaction | ||
| Vat | $vat | ||
| Account | $account | ||
| int | $quantity | ||
| float | $amount | ||
| bool | $vat_inclusive | ||
| Carbon | $destroyed_at | ||
| Carbon | $deleted_at |
Methods
Construct new LineItem
Instance Identifier.
LineItem Ledgers.
LineItem Transaction.
LineItem Account.
LineItem Applied VATs.
Total Vat amount of the LineItem.
LineItem attributes.
Get LineItem Vats.
Validate LineItem.
Details
in
Segregating at line 28
static void
bootSegregating()
Register EntityScope for Model.
in
Segregating at line 46
BelongsTo
entity()
Model's Parent Entity.
in
Recycling at line 28
static void
bootRecycling()
Model recycling events.
in
Recycling at line 73
MorphMany
recycled()
Recycled Model records.
in
ModelTablePrefix at line 22
getTable()
Determine the model table name
at line 116
__construct(array $attributes = [])
Construct new LineItem
at line 132
string
toString($type = false)
Instance Identifier.
at line 144
HasMany
ledgers()
LineItem Ledgers.
at line 154
BelongsTo
transaction()
LineItem Transaction.
at line 164
BelongsTo
account()
LineItem Account.
at line 174
HasMany
appliedVats()
LineItem Applied VATs.
at line 184
array
getVatAttribute()
Total Vat amount of the LineItem.
at line 203
object
attributes()
LineItem attributes.
at line 213
bool
addVat(Vat $vat)
Add Vat to LineItem Vats.
at line 245
array
getVats()
Get LineItem Vats.
at line 260
void
removeVat(Vat $vat)
Remove Vat from LineItem Vats.
at line 289
bool
save(array $options = [])
Validate LineItem.