dolibarr 20.0.0
FormContract Class Reference

Class to manage generation of HTML components for contract module. More...

Public Member Functions

 __construct ($db)
 Constructor.
 
 select_contract ($socid=-1, $selected=0, $htmlname='contrattid', $maxlength=16, $showempty=1, $showRef=0, $noouput=0, $morecss='minwidth150')
 Show a combo list with contracts qualified for a third party.
 
 formSelectContract ($page, $socid=-1, $selected=0, $htmlname='contrattid', $maxlength=16, $showempty=1, $showRef=0, $noouput=0)
 Show a form to select a contract.
 

Detailed Description

Class to manage generation of HTML components for contract module.

Definition at line 28 of file html.formcontract.class.php.

Constructor & Destructor Documentation

◆ __construct()

FormContract::__construct ( $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 46 of file html.formcontract.class.php.

Member Function Documentation

◆ formSelectContract()

FormContract::formSelectContract ( $page,
$socid = -1,
$selected = 0,
$htmlname = 'contrattid',
$maxlength = 16,
$showempty = 1,
$showRef = 0,
$noouput = 0 )

Show a form to select a contract.

Parameters
int$pagePage
int$socidId third party (-1=all, 0=only contracts not linked to a third party, id=contracts not linked or linked to third party id)
int$selectedId contract preselected
string$htmlnameNom de la zone html
int$maxlengthMaximum length of label
int$showemptyShow empty line
int$showRefShow customer and supplier reference on each contract (when found)
int$noouput1=Return the output instead of display
Returns
string|void html string

Definition at line 193 of file html.formcontract.class.php.

References select_contract().

◆ select_contract()

FormContract::select_contract ( $socid = -1,
$selected = 0,
$htmlname = 'contrattid',
$maxlength = 16,
$showempty = 1,
$showRef = 0,
$noouput = 0,
$morecss = 'minwidth150' )

Show a combo list with contracts qualified for a third party.

Parameters
int$socidId third party (-1=all, 0=only contracts not linked to a third party, id=contracts not linked or linked to third party id)
int$selectedId contract preselected
string$htmlnameNom de la zone html
int$maxlengthMaximum length of label
int$showemptyShow empty line
int$showRefShow customer and supplier reference on each contract (when found)
int$noouput1=Return the output instead of display
string$morecssMore CSS
Returns
int|string If nooutput = 0: Nbr of contract if OK, <0 if KO, If nooutput = 1: The HTML select string

Definition at line 66 of file html.formcontract.class.php.

References ajax_combobox(), dol_print_error(), dol_syslog(), dol_trunc(), and getDolGlobalString().

Referenced by formSelectContract().


The documentation for this class was generated from the following file: