29require
'../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/contract.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/contrat/class/contrat.class.php';
32if (isModEnabled(
'project')) {
33 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
38require_once DOL_DOCUMENT_ROOT.
"/ticket/class/ticket.class.php";
40$langs->loadLangs(array(
'companies',
'contracts',
'tickets'));
45$action =
GETPOST(
'action',
'alpha');
47if ($id ==
'' && $ref ==
'') {
54if ($user->socid > 0) {
55 $socid = $user->socid;
64$title = $langs->trans(
"Contract") .
' - ' . $langs->trans(
"Tickets");
65$help_url =
'EN:Module_Contracts|FR:Module_Contrat|ES:Contratos_de_servicio';
67llxHeader(
"", $title, $help_url,
'', 0, 0,
'',
'',
'',
'mod-contrat page-card_ticket');
70$userstatic =
new User($db);
73$result =
$object->fetch($id, $ref);
74$ret =
$object->fetch_thirdparty();
80$linkback =
'<a href="'.DOL_URL_ROOT.
'/contrat/list.php'.(! empty($socid) ?
'?socid='.$socid :
'').
'">';
81$linkback .= $langs->trans(
"BackToList").
'</a>';
86$morehtmlref .=
'<div class="refidno">';
88$morehtmlref .= $form->editfieldkey(
99$morehtmlref .= $form->editfieldval(
113$morehtmlref .=
'<br>';
114$morehtmlref .= $form->editfieldkey(
125$morehtmlref .= $form->editfieldval(
139$morehtmlref .=
'<br>'.$langs->trans(
'ThirdParty') .
' : ' .
$object->thirdparty->getNomUrl(1);
141if (! empty($conf->projet->enabled)) {
142 require_once DOL_DOCUMENT_ROOT.
'/projet/class/task.class.php';
144 $langs->load(
"projects");
145 $morehtmlref .=
'<br>'.$langs->trans(
'Project') .
' : ';
146 if (! empty(
$object->fk_project)) {
148 $proj->fetch(
$object->fk_project);
149 $morehtmlref .=
'<a href="'.DOL_URL_ROOT.
'/projet/card.php?id=';
150 $morehtmlref .=
$object->fk_project .
'" title="' . $langs->trans(
'ShowProject') .
'">';
151 $morehtmlref .= $proj->ref;
152 $morehtmlref .=
'</a>';
157$morehtmlref .=
'</div>';
159dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'none', $morehtmlref);
161print
'<div class="underbanner clearboth"></div>';
168$title = $langs->trans(
"ListTicketsLinkToContract");
170print
'<table class="noborder" width="100%">';
171print
'<tr class="liste_titre">';
172print
'<td >'.$langs->trans(
"Ref").
'</td>';
173print
'<td width="300">'.$langs->trans(
"Subject").
'</td>';
174print
'<td align="left">'.$langs->trans(
"Type").
'</td>';
175print
'<td align="left" nowrap >'.$langs->trans(
"TicketCategory").
'</td>';
176print
'<td align="left">'.$langs->trans(
"Severity").
'</td>';
177print
'<td align="center">'.$langs->trans(
"Date").
'</td>';
178print
'<td align="center" nowrap >'.$langs->trans(
"DateEnd").
'</td>';
179print
'<td align="right">'.$langs->trans(
"Progress").
'</td>';
180print
'<td align="right" width="100">'.$langs->trans(
"Status").
'</td>';
183$allticketarray =
$object->getTicketsArray();
184if (is_array($allticketarray) && count($allticketarray) > 0) {
185 foreach ($allticketarray as $key => $value) {
194 print
'<td align="left">';
195 print $element->getNomUrl(1);
199 print
'<td align="left">'.$value->subject.
'</td>';
200 print
'<td align="left">'.$value->type_label.
'</td>';
201 print
'<td align="left">'.$value->category_label.
'</td>';
202 print
'<td align="left">'.$value->severity_label.
'</td>';
205 print
'<td align="center">'.dol_print_date($element->datec,
'day').
'</td>';
206 print
'<td align="center">'.dol_print_date($element->date_close,
'day').
'</td>';
209 print
'<td align="right">';
210 print(isset($element->progress) ? $element->progress.
'%' :
'');
214 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($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
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.