';
+// Ref customer
+$morehtmlref.=$form->editfieldkey(
+ "RefCustomer", 'ref_customer', $object->ref_customer,
+ $object, 0, 'string', '', 0, 1
+);
+$morehtmlref.=$form->editfieldval(
+ "RefCustomer", 'ref_customer', $object->ref_customer,
+ $object, 0, 'string', '', null, null, '', 1
+);
+// Ref supplier
+$morehtmlref.='
';
+$morehtmlref.=$form->editfieldkey(
+ "RefSupplier", 'ref_supplier', $object->ref_supplier,
+ $object, 0, 'string', '', 0, 1
+);
+$morehtmlref.=$form->editfieldval(
+ "RefSupplier", 'ref_supplier', $object->ref_supplier,
+ $object, 0, 'string', '', null, null, '', 1
+);
+// Thirdparty
+$morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
+// Project
+if (! empty($conf->projet->enabled)) {
+ require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
+
+ $langs->load("projects");
+ $morehtmlref.='
'.$langs->trans('Project') . ' : ';
+ if (! empty($object->fk_project)) {
+ $proj = new Project($db);
+ $proj->fetch($object->fk_project);
+ $morehtmlref.='
';
+ $morehtmlref.=$proj->ref;
+ $morehtmlref.='';
+ } else {
+ $morehtmlref.='';
+ }
+}
+$morehtmlref.='
';
+
+dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'none', $morehtmlref);
+
+print '';
+ print '';
+ print '| '.$langs->trans("Ref").' | ';
+ print ''.$langs->trans("Subject").' | ';
+ print ''.$langs->trans("Type").' | ';
+ print ''.$langs->trans("TicketCategory").' | ';
+ print ''.$langs->trans("Severity").' | ';
+ print ''.$langs->trans("Date").' | ';
+ print ''.$langs->trans("DateEnd").' | ';
+ print ''.$langs->trans("Progress").' | ';
+ print ''.$langs->trans("Status").' | ';
+ print '
';
+ // on récupère la totalité des tickets liés au contrat
+ $allticketarray = $object->getTicketsArray();
+ if ($allticketarray >0) {
+ //var_dump($object->tickets);
+ foreach ($object->tickets as $key => $value) {
+ $total_ht = 0;
+ $total_ttc = 0;
+ $num=count($object->tickets);
+
+ for ($i = 0; $i < $num; $i++) {
+ $element = new Ticket($db);
+ $element->fetch($value->rowid);
+
+ print "";
+
+ // Ref
+ print '| ';
+ print $element->getNomUrl(1);
+ print " | \n";
+
+ // Informaitons
+ print ''.$value->subject.' | ';
+ print ''.$value->type_label.' | ';
+ print ''.$value->category_label.' | ';
+ print ''.$value->severity_label.' | ';
+
+ // Date
+ print ''.dol_print_date($element->datec, 'day').' | ';
+ print ''.dol_print_date($element->date_close, 'day').' | ';
+
+ // Durée
+ print '';
+ print (isset($element->progress)?$element->progress:' '). '%';
+ print ' | ';
+
+ // Status
+ print ''.$element->getLibStatut(5).' | ';
+ print '
';
+
+ }
+ print "
";
+
+ }
+ }
+
+
+llxFooter();
+$db->close();
From 3281db874322f9e416e293a36d32ab11154f0513 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Charl=C3=A8ne=20Benke?=
<1179011+defrance@users.noreply.github.com>
Date: Fri, 4 Aug 2023 14:54:57 +0200
Subject: [PATCH 07/15] Update ticket.php
---
htdocs/contrat/ticket.php | 31 +++++++++++++------------------
1 file changed, 13 insertions(+), 18 deletions(-)
diff --git a/htdocs/contrat/ticket.php b/htdocs/contrat/ticket.php
index 519739e5343..d0dc2b368c3 100644
--- a/htdocs/contrat/ticket.php
+++ b/htdocs/contrat/ticket.php
@@ -1,5 +1,7 @@
+/* Copyright (C) 2004 Rodolphe Quiedeville