YetiForce PHP Documentation

ServiceContracts extends CRMEntity
in package

ServiceContracts CRMEntity class.

Tags
copyright

YetiForce Sp. z o.o

license

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

author

Mariusz Krzaczkowski m.krzaczkowski@yetiforce.com

Table of Contents

$column_fields  : mixed
$customFieldTable  : mixed
Mandatory table for supporting custom fields.
$def_basicsearch_col  : mixed
$def_detailview_recname  : mixed
$default_order_by  : mixed
$default_sort_order  : mixed
$IsCustomModule  : mixed
Indicator if this is a custom module or standard module
$list_fields  : mixed
Mandatory for Listing (Related listview).
$list_fields_name  : mixed
$list_link_field  : mixed
$mandatory_fields  : mixed
$popup_fields  : mixed
$relationFields  : array<string|int, string>
$search_fields  : mixed
$search_fields_name  : mixed
$special_functions  : mixed
$tab_name  : mixed
Mandatory for Saving, Include tables related to this module.
$tab_name_index  : mixed
Mandatory for Saving, Include tablename and tablekey columnname here.
$table_index  : mixed
$table_name  : mixed
calculateProgress()  : mixed
Function to Calculate the End Date, Planned Duration, Actual Duration and Progress of a Service Contract.
computeUsedUnits()  : mixed
moduleHandler()  : mixed
Invoked when special actions are performed on the module.
updateHelpDeskRelatedTo()  : mixed
Function to Update the parent_id of HelpDesk with sc_related_to of ServiceContracts if the parent_id is not set.
updateServiceContractState()  : mixed
updateUsedUnits()  : mixed
Function to Upate the Used Units of the Service Contract.

Properties

$customFieldTable

Mandatory table for supporting custom fields.

public mixed $customFieldTable = ['vtiger_servicecontractscf', 'servicecontractsid']

$def_detailview_recname

public mixed $def_detailview_recname = 'subject'

$IsCustomModule

Indicator if this is a custom module or standard module

public mixed $IsCustomModule = rue

$list_fields

Mandatory for Listing (Related listview).

public mixed $list_fields = [ // Format: Field Label => Array(tablename, columnname) // tablename should not have prefix 'vtiger_' 'Subject' => ['servicecontracts', 'subject'], 'Assigned To' => ['crmentity', 'smownerid'], 'Related to' => ['servicecontracts', 'sc_related_to'], 'Status' => ['servicecontracts', 'contract_status'], 'Used Units' => ['servicecontracts', 'used_units'], 'Total Units' => ['servicecontracts', 'total_units'], 'Contract No' => ['servicecontracts', 'contract_no'], ]

$list_fields_name

public mixed $list_fields_name = [ // Format: Field Label => fieldname 'Subject' => 'subject', 'Assigned To' => 'assigned_user_id', 'Related To' => 'sc_related_to', 'Status' => 'contract_status', 'Used Units' => 'used_units', 'Total Units' => 'total_units', 'Contract No' => 'contract_no', ]

$mandatory_fields

public mixed $mandatory_fields = ['subject', 'assigned_user_id']

$search_fields

public mixed $search_fields = [ // Format: Field Label => Array(tablename, columnname) // tablename should not have prefix 'vtiger_' 'Subject' => ['servicecontracts', 'subject'], 'Status' => ['servicecontracts', 'contract_status'], 'Due Date' => ['servicecontracts', 'due_date'], 'Start Date' => ['servicecontracts', 'start_date'], 'Type' => ['servicecontracts', 'contract_type'], 'Related to' => ['servicecontracts', 'sc_related_to'], 'Used Units' => ['servicecontracts', 'used_units'], 'Total Units' => ['servicecontracts', 'total_units'], 'Assigned To' => ['crmentity', 'smownerid'], 'Contract No' => ['servicecontracts', 'contract_no'], ]

$special_functions

public mixed $special_functions = ['set_import_assigned_user']

$tab_name

Mandatory for Saving, Include tables related to this module.

public mixed $tab_name = ['vtiger_crmentity', 'vtiger_servicecontracts', 'vtiger_servicecontractscf', 'vtiger_entity_stats']

$tab_name_index

Mandatory for Saving, Include tablename and tablekey columnname here.

public mixed $tab_name_index = ['vtiger_crmentity' => 'crmid', 'vtiger_servicecontracts' => 'servicecontractsid', 'vtiger_servicecontractscf' => 'servicecontractsid', 'vtiger_entity_stats' => 'crmid']

Methods

calculateProgress()

Function to Calculate the End Date, Planned Duration, Actual Duration and Progress of a Service Contract.

public calculateProgress() : mixed
Return values
mixed

computeUsedUnits()

public computeUsedUnits(mixed $ticketData[, mixed $operator = '+' ]) : mixed
Parameters
$ticketData : mixed
$operator : mixed = '+'
Return values
mixed

moduleHandler()

Invoked when special actions are performed on the module.

public moduleHandler(string $moduleName, string $eventType) : mixed
Parameters
$moduleName : string
$eventType : string
Return values
mixed

updateHelpDeskRelatedTo()

Function to Update the parent_id of HelpDesk with sc_related_to of ServiceContracts if the parent_id is not set.

public updateHelpDeskRelatedTo(int $focusId, int $entityIds) : mixed
Parameters
$focusId : int
$entityIds : int
Return values
mixed

updateServiceContractState()

public updateServiceContractState(mixed $focusId) : mixed
Parameters
$focusId : mixed
Return values
mixed

updateUsedUnits()

Function to Upate the Used Units of the Service Contract.

public updateUsedUnits(float $usedUnits) : mixed
Parameters
$usedUnits : float
Return values
mixed

Search results