PHP Class CommonITILCost, glpi

Inheritance: extends CommonDBChild
Exibir arquivo Open project: glpi-project/glpi Class Usage Examples

Public Properties

Property Type Description
$dohistory

Public Methods

Method Description
computeTotalCost ( $actiontime, $cost_time, $cost_fixed, $cost_material, $edit = true ) : total Computer total cost of a item
displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
getCostsSummary ( $type, $ID ) : array Get costs summary values
getItilObjectItemType ( )
getLastCostForItem ( $items_id ) Get last datas for an item
getSearchOptions ( )
getSearchOptionsToAdd ( )
getTabNameForItem ( CommonGLPI $item, $withtemplate )
getTotalActionTimeForItem ( $items_id ) Get total actiNULL 11400 0.0000 0.0000 0.0000 on time used on costs for an item
getTypeName ( $nb )
initBasedOnPrevious ( ) Init cost for creation based on previous cost
showForObject ( $item, $withtemplate = '' ) : total Print the item costs
showForm ( $ID, $options = [] ) Print the item cost form

Method Details

computeTotalCost() static public method

Computer total cost of a item
static public computeTotalCost ( $actiontime, $cost_time, $cost_fixed, $cost_material, $edit = true ) : total
$actiontime float actiontime
$cost_time float time cost
$cost_fixed float fixed cost
$cost_material float material cost
$edit boolean used for edit of computation ? (true by default)
return total cost formatted string

displayTabContentForItem() static public method

static public displayTabContentForItem ( CommonGLPI $item, $tabnum = 1, $withtemplate )
$item CommonGLPI CommonGLPI object
$tabnum (default 1)
$withtemplate (default 0)

getCostsSummary() static public method

Get costs summary values
static public getCostsSummary ( $type, $ID ) : array
$type string type
$ID integer ID of the ticket
return array of costs and actiontime

getItilObjectItemType() public method

getLastCostForItem() public method

Get last datas for an item
public getLastCostForItem ( $items_id )
$items_id integer ID of the item

getSearchOptions() public method

public getSearchOptions ( )

getSearchOptionsToAdd() static public method

static public getSearchOptionsToAdd ( )

getTabNameForItem() public method

See also: CommonGLPI::getTabNameForItem()
public getTabNameForItem ( CommonGLPI $item, $withtemplate )
$item CommonGLPI

getTotalActionTimeForItem() public method

Get total actiNULL 11400 0.0000 0.0000 0.0000 on time used on costs for an item
public getTotalActionTimeForItem ( $items_id )
$items_id integer ID of the item

getTypeName() static public method

static public getTypeName ( $nb )

initBasedOnPrevious() public method

Init cost for creation based on previous cost
public initBasedOnPrevious ( )

showForObject() static public method

Print the item costs
static public showForObject ( $item, $withtemplate = '' ) : total
$item CommonITILObject object or Project
$withtemplate boolean Template or basic item (default '')
return total cost

showForm() public method

Print the item cost form
public showForm ( $ID, $options = [] )
$ID integer ID of the item
$options array options used

Property Details

$dohistory public_oe property

public $dohistory