Arikaim CMS

Document

Document table trait

Table of Contents

Methods

deleteItem()  : bool
Delete document item
getDocumentItemsClass()  : string|null
Get document model class
getExternal()  : Model|null
Get external document
getItemsCount()  : int
Get document items count
getSubTotal()  : float
Get document total
getSubTotalAttribute()  : float
sub_total attribute
getTotal()  : float
Get total document fees
getTotalAttribute()  : float
total attribute
getTotalFees()  : float
Get total document fees
getTotalFeesAttribute()  : float
total_fees attribute
hasExternal()  : bool
Return true if external document exists
isEmpty()  : bool
Return true if document is empty
items()  : Relation|null
Document items relation
itemsToArray()  : array<string|int, mixed>
Items array
saveItem()  : object|null
Save document item
updateTotals()  : bool
Update document total

Methods

deleteItem()

Delete document item

public deleteItem(string|int $id) : bool
Parameters
$id : string|int
Return values
bool

getDocumentItemsClass()

Get document model class

public getDocumentItemsClass() : string|null
Return values
string|null

getExternal()

Get external document

public getExternal(string $externalId, string $driverName) : Model|null
Parameters
$externalId : string
$driverName : string
Return values
Model|null

getItemsCount()

Get document items count

public getItemsCount() : int
Return values
int

getSubTotal()

Get document total

public getSubTotal() : float
Return values
float

getSubTotalAttribute()

sub_total attribute

public getSubTotalAttribute() : float
Return values
float

getTotal()

Get total document fees

public getTotal() : float
Return values
float

getTotalAttribute()

total attribute

public getTotalAttribute() : float
Return values
float

getTotalFees()

Get total document fees

public getTotalFees() : float
Return values
float

getTotalFeesAttribute()

total_fees attribute

public getTotalFeesAttribute() : float
Return values
float

hasExternal()

Return true if external document exists

public hasExternal(string $externalId, string $driverName) : bool
Parameters
$externalId : string
$driverName : string
Return values
bool

isEmpty()

Return true if document is empty

public isEmpty() : bool
Return values
bool

items()

Document items relation

public items() : Relation|null
Return values
Relation|null

itemsToArray()

Items array

public itemsToArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

saveItem()

Save document item

public saveItem(int $productId, array<string|int, mixed> $data) : object|null
Parameters
$productId : int
$data : array<string|int, mixed>
Return values
object|null

updateTotals()

Update document total

public updateTotals() : bool
Return values
bool

        
On this page

Search results