Invoice line items

Each invoice is made up of individual line items.

Each line item is associated with a specific invoiceId.

class Item extends AbstractModel implements InvoiceItemInterface

Properties summary

Type Property Description
protected $table
$timestamps
protected $booleans
protected $dates
protected $columnMap
protected $fillable
int $id Unique id number for this line item.
int $invoiceId Invoice ID for the invoice this line item belongs to.
int $userId UserID of the invoice this line item belongs to.
string $type The type of item to which this invoice line item relates. Empty for no relationship.
int $relatedEntityId The related id of the corresponding entity type.
string $description A text description of this line item.
float $amount Total amount due for this line item.
bool $taxed True, if this items is taxable, otherwise false.
Carbon $dueDate Date this line item is due.
string $paymentMethod Internal name of payment gateway module selected for this line item.
string $notes Any admin supplied notes for this line item. (This property is not used internally by WHMCS, but is left in place for legacy purposes.)
Invoice $invoice The invoice this line item belongs to.
Addon|null $addon The related model for the addon invoice item
Domain|null $domain The related model for the domain invoice item
Service|null $service The related model for the service invoice item

Methods summary

Return Type Method Name Description
BelongsTo invoice() Each invoice item belongs to an invoice.
BelongsTo addon() -
BelongsTo domain() -
BelongsTo service() -
scopeOnlyServices($query) -
scopeOnlyAddons($query) -
scopeOnlyDomains($query) -
scopeClientId(Builder $query, int $userId) -
scopeNotInvoiced(Builder $query) -
Builder clientId(int $clientId) -
Builder notInvoiced() -

Details

BelongsTo invoice ()

Each invoice item belongs to an invoice.

Return Value

BelongsTo

BelongsTo addon ()

Return Value

BelongsTo

BelongsTo domain ()

Return Value

BelongsTo

BelongsTo service ()

Return Value

BelongsTo

scopeOnlyServices ($query)

Parameters

$query

scopeOnlyAddons ($query)

Parameters

$query

scopeOnlyDomains ($query)

Parameters

$query

scopeClientId (Builder $query, int $userId)

Parameters

Builder $query
int $userId

scopeNotInvoiced (Builder $query)

Parameters

Builder $query

Builder clientId (int $clientId)

Parameters

int $clientId

Return Value

Builder

Builder notInvoiced ()

Return Value

Builder