28require
'../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/lib/contract.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/contrat/class/contrat.class.php';
31if (isModEnabled(
'project')) {
32 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
37require_once DOL_DOCUMENT_ROOT.
"/ticket/class/ticket.class.php";
39$langs->loadLangs(array(
'companies',
'contracts',
'tickets'));
44$action =
GETPOST(
'action',
'alpha');
46if ($id ==
'' && $ref ==
'') {
53if ($user->socid > 0) {
54 $socid = $user->socid;
64llxHeader(
"", $langs->trans(
"Tickets"),
"Contrat");
67$userstatic =
new User($db);
70$result =
$object->fetch($id, $ref);
71$ret =
$object->fetch_thirdparty();
77$linkback =
'<a href="'.DOL_URL_ROOT.
'/contrat/list.php'.(! empty($socid) ?
'?socid='.$socid :
'').
'">';
78$linkback .= $langs->trans(
"BackToList").
'</a>';
83$morehtmlref .=
'<div class="refidno">';
85$morehtmlref .= $form->editfieldkey(
96$morehtmlref .= $form->editfieldval(
110$morehtmlref .=
'<br>';
111$morehtmlref .= $form->editfieldkey(
122$morehtmlref .= $form->editfieldval(
136$morehtmlref .=
'<br>'.$langs->trans(
'ThirdParty') .
' : ' .
$object->thirdparty->getNomUrl(1);
138if (! empty($conf->projet->enabled)) {
139 require_once DOL_DOCUMENT_ROOT.
'/projet/class/task.class.php';
141 $langs->load(
"projects");
142 $morehtmlref .=
'<br>'.$langs->trans(
'Project') .
' : ';
143 if (! empty(
$object->fk_project)) {
145 $proj->fetch(
$object->fk_project);
146 $morehtmlref .=
'<a href="'.DOL_URL_ROOT.
'/projet/card.php?id=';
147 $morehtmlref .=
$object->fk_project .
'" title="' . $langs->trans(
'ShowProject') .
'">';
148 $morehtmlref .= $proj->ref;
149 $morehtmlref .=
'</a>';
154$morehtmlref .=
'</div>';
156dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'none', $morehtmlref);
158print
'<div class="underbanner clearboth"></div>';
165$title = $langs->trans(
"ListTicketsLinkToContract");
167print
'<table class="noborder" width="100%">';
168print
'<tr class="liste_titre">';
169print
'<td >'.$langs->trans(
"Ref").
'</td>';
170print
'<td width="300">'.$langs->trans(
"Subject").
'</td>';
171print
'<td align="left">'.$langs->trans(
"Type").
'</td>';
172print
'<td align="left" nowrap >'.$langs->trans(
"TicketCategory").
'</td>';
173print
'<td align="left">'.$langs->trans(
"Severity").
'</td>';
174print
'<td align="center">'.$langs->trans(
"Date").
'</td>';
175print
'<td align="center" nowrap >'.$langs->trans(
"DateEnd").
'</td>';
176print
'<td align="right">'.$langs->trans(
"Progress").
'</td>';
177print
'<td align="right" width="100">'.$langs->trans(
"Status").
'</td>';
180$allticketarray =
$object->getTicketsArray();
181if (is_array($allticketarray) && count($allticketarray) > 0) {
182 foreach ($allticketarray as $key => $value) {
191 print
'<td align="left">';
192 print $element->getNomUrl(1);
196 print
'<td align="left">'.$value->subject.
'</td>';
197 print
'<td align="left">'.$value->type_label.
'</td>';
198 print
'<td align="left">'.$value->category_label.
'</td>';
199 print
'<td align="left">'.$value->severity_label.
'</td>';
202 print
'<td align="center">'.dol_print_date($element->datec,
'day').
'</td>';
203 print
'<td align="center">'.dol_print_date($element->date_close,
'day').
'</td>';
206 print
'<td align="right">';
207 print(isset($element->progress) ? $element->progress.
'%' :
'');
211 print
'<td align="right">'.$element->getLibStatut(5).
'</td>';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage contracts.
Class to manage projects.
Class to manage Dolibarr users.
contract_prepare_head(Contrat $object)
Prepare array with list of tabs.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.