class FormExpenseReport (View source)

Class to manage generation of HTML components for contract module

Properties

DoliDB $db
string $error

Methods

__construct(DoliDB $db)

Constructor

selectExpensereportStatus($selected = 0, string $htmlname = 'fk_statut', $useempty = 1, $useshortlabel = 0, $morecss = '')

Return the combobox for the different statuses of an expense report The list values are the ids from the labelStatus.

selectTypeExpenseReport($selected = 0, string $htmlname = 'type', $showempty = 0, $active = 1)

Return list of types of notes with select value = id

Details

__construct(DoliDB $db)

Constructor

Parameters

DoliDB $db

Database handler

selectExpensereportStatus($selected = 0, string $htmlname = 'fk_statut', $useempty = 1, $useshortlabel = 0, $morecss = '')

Return the combobox for the different statuses of an expense report The list values are the ids from the labelStatus.

@param int $selected preselect status

Parameters

$selected
string $htmlname

Name of HTML select @param int $useempty 1=Add empty line @param int $useshortlabel Use short labels @param string $morecss More CSS @return string HTML select with status

$useempty
$useshortlabel
$morecss

selectTypeExpenseReport($selected = 0, string $htmlname = 'type', $showempty = 0, $active = 1)

Return list of types of notes with select value = id

@param int $selected Preselected type

Parameters

$selected
string $htmlname

Name of field in form @param int $showempty Add an empty field @param int $active 1=Active only, 0=Unactive only, -1=All @return string Select html

$showempty
$active