Documentation

Vtiger_Inventory_Model
in package

Basic Inventory Model Class.

Tags
copyright

YetiForce Sp. z o.o

license

YetiForce Public License 4.0 (licenses/LicenseEN.txt or yetiforce.com)

author

Mariusz Krzaczkowski m.krzaczkowski@yetiforce.com

author

Radosław Skrzypczak r.skrzypczak@yetiforce.com

Table of Contents

TABLE_POSTFIX_BASE  = '_invfield'
Field configuration table postfix.
TABLE_POSTFIX_DATA  = '_inventory'
Data table postfix.
TABLE_POSTFIX_MAP  = '_invmap'
Field mapping table postfix.
$fields  : array<string|int, Vtiger_Basic_InventoryField>
$moduleName  : string
$tableName  : string
createInventoryTables()  : mixed
Create inventory tables.
deleteField()  : bool
Delete inventory field.
getAccountDiscount()  : array<string|int, mixed>
Get discount from the account.
getAccountTax()  : array<string|int, mixed>
Get tax from the account.
getAllColumns()  : array<string|int, astring>
Gets all columns.
getAutoCompleteFields()  : array<string|int, mixed>
Function return autocomplete fields.
getCustomAutoComplete()  : array<string|int, mixed>
Function to get custom values to complete in inventory.
getDataTableName()  : string
Gets data table name.
getDefaultGlobalTax()  : array<string|int, mixed>
Get default global tax .
getDiscountsConfig()  : array<string|int, mixed>
Get discounts configuration.
getField()  : Vtiger_Basic_InventoryField|null
Gets inventory field model.
getFieldById()  : Vtiger_Basic_InventoryField|null
Gets inventory field model by ID.
getFieldCleanInstance()  : Vtiger_Basic_InventoryField
Gets clean inventory field instance.
getFields()  : array<string|int, Vtiger_Basic_InventoryField>
Gets inventory fields.
getFieldsByBlocks()  : array<string|int, mixed>
Function that returns all the fields by blocks.
getFieldsByType()  : array<string|int, Vtiger_Basic_InventoryField>
Gets inventory fields by type.
getFieldsForView()  : array<string|int, Vtiger_Basic_InventoryField>
Gets the field for the view.
getFieldsTypes()  : array<string|int, Vtiger_Basic_InventoryField>
Retrieve list of all fields.
getGlobalDiscounts()  : array<string|int, mixed>
Get global discounts list.
getGlobalTaxes()  : array<string|int, mixed>
Get global tax list.
getInstance()  : self
Gets inventory instance.
getInventoryDataById()  : array<string|int, mixed>
Function to get data of inventory for record.
getInventoryListName()  : string
Function to get list elements in iventory as html code.
getInventoryPrice()  : float
Gets data from record.
getModuleName()  : string
Function returns module name.
getPurifyTemplate()  : array<string|int, mixed>
Gets template to purify.
getSummaryFields()  : array<string|int, string>
Getting summary fields name.
getTableName()  : string
Gets table name.
getTaxesConfig()  : array<string|int, mixed>
Get tax configuration.
isField()  : bool
Checks if inventory field exists.
loadRowData()  : array<string|int, mixed>
Load row data by record Id.
saveField()  : bool
Save inventory field.
saveSequence()  : int
Save sequence field.
setFieldData()  : mixed
Sets inventory field data.
setModuleName()  : mixed
Sets module name.

Constants

TABLE_POSTFIX_BASE

Field configuration table postfix.

private mixed TABLE_POSTFIX_BASE = '_invfield'

TABLE_POSTFIX_DATA

Data table postfix.

private mixed TABLE_POSTFIX_DATA = '_inventory'

TABLE_POSTFIX_MAP

Field mapping table postfix.

private mixed TABLE_POSTFIX_MAP = '_invmap'

Properties

Methods

createInventoryTables()

Create inventory tables.

public createInventoryTables() : mixed
Return values
mixed

deleteField()

Delete inventory field.

public deleteField(string $fieldName) : bool
Parameters
$fieldName : string
Tags
throws
Exception
Return values
bool

getAccountDiscount()

Get discount from the account.

public getAccountDiscount(mixed $relatedRecord) : array<string|int, mixed>
Parameters
$relatedRecord : mixed
Return values
array<string|int, mixed>

getAccountTax()

Get tax from the account.

public getAccountTax(int $relatedRecord) : array<string|int, mixed>
Parameters
$relatedRecord : int

Record ID

Return values
array<string|int, mixed>

getAllColumns()

Gets all columns.

public getAllColumns() : array<string|int, astring>
Tags
throws
AppException
Return values
array<string|int, astring>

getAutoCompleteFields()

Function return autocomplete fields.

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

getCustomAutoComplete()

Function to get custom values to complete in inventory.

public getCustomAutoComplete(string $sourceFieldName, Vtiger_Record_Model $recordModel) : array<string|int, mixed>
Parameters
$sourceFieldName : string
$recordModel : Vtiger_Record_Model
Return values
array<string|int, mixed>

getDataTableName()

Gets data table name.

public getDataTableName() : string
Return values
string

getDefaultGlobalTax()

Get default global tax .

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

tax list

getDiscountsConfig()

Get discounts configuration.

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

config data

getFieldsByBlocks()

Function that returns all the fields by blocks.

public getFieldsByBlocks() : array<string|int, mixed>
Tags
throws
AppException
Return values
array<string|int, mixed>

getGlobalDiscounts()

Get global discounts list.

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

discounts list

getGlobalTaxes()

Get global tax list.

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

tax list

getInstance()

Gets inventory instance.

public static getInstance(string $moduleName) : self
Parameters
$moduleName : string
Tags
throws
AppException
Return values
self

getInventoryDataById()

Function to get data of inventory for record.

public static getInventoryDataById(int $recordId, string $moduleName[, Vtiger_Paging_Model|null $pagingModel = null ]) : array<string|int, mixed>
Parameters
$recordId : int
$moduleName : string
$pagingModel : Vtiger_Paging_Model|null = null
Tags
throws
AppException
Return values
array<string|int, mixed>

getModuleName()

Function returns module name.

public getModuleName() : string
Return values
string

getPurifyTemplate()

Gets template to purify.

public getPurifyTemplate() : array<string|int, mixed>
Tags
throws
AppException
Return values
array<string|int, mixed>

getSummaryFields()

Getting summary fields name.

public getSummaryFields() : array<string|int, string>
Tags
throws
AppException
Return values
array<string|int, string>

getTableName()

Gets table name.

public getTableName([string $type = self::TABLE_POSTFIX_BASE ]) : string
Parameters
$type : string = self::TABLE_POSTFIX_BASE
Return values
string

getTaxesConfig()

Get tax configuration.

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

config data

isField()

Checks if inventory field exists.

public isField(string $fieldName) : bool
Parameters
$fieldName : string
Tags
throws
AppException
Return values
bool

loadRowData()

Load row data by record Id.

public loadRowData(int $recordId[, array<string|int, mixed> $params = [] ]) : array<string|int, mixed>
Parameters
$recordId : int
$params : array<string|int, mixed> = []
Return values
array<string|int, mixed>

saveSequence()

Save sequence field.

public saveSequence(array<string|int, int> $sequenceList) : int
Parameters
$sequenceList : array<string|int, int>
Tags
throws
Exception
Return values
int

setModuleName()

Sets module name.

protected setModuleName(string $name) : mixed
Parameters
$name : string
Return values
mixed

        

Search results