Trad: Traduction du statut des fiches interventions
This commit is contained in:
parent
98134851d0
commit
03c419fcc4
@ -45,14 +45,26 @@ class Fichinter
|
|||||||
var $note;
|
var $note;
|
||||||
var $projet_id;
|
var $projet_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Constructeur de la classe
|
||||||
|
* \param DB Handler accès base de données
|
||||||
|
* \param soc_idp Id societe
|
||||||
|
*/
|
||||||
function Fichinter($DB, $soc_idp="")
|
function Fichinter($DB, $soc_idp="")
|
||||||
{
|
{
|
||||||
|
global $langs;
|
||||||
|
|
||||||
$this->db = $DB ;
|
$this->db = $DB ;
|
||||||
$this->socidp = $soc_idp;
|
$this->socidp = $soc_idp;
|
||||||
$this->products = array();
|
$this->products = array();
|
||||||
$this->projet_id = 0;
|
$this->projet_id = 0;
|
||||||
|
|
||||||
|
// Statut 0=brouillon, 1=validé
|
||||||
|
$this->statuts[0]=$langs->trans("Draft");
|
||||||
|
$this->statuts[1]=$langs->trans("Validated");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function add_product($idproduct)
|
function add_product($idproduct)
|
||||||
{
|
{
|
||||||
if ($idproduct > 0)
|
if ($idproduct > 0)
|
||||||
@ -96,7 +108,6 @@ class Fichinter
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -124,8 +135,8 @@ class Fichinter
|
|||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -196,8 +207,8 @@ class Fichinter
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -214,7 +225,6 @@ class Fichinter
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Set generates files readonly
|
* Set generates files readonly
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
umask(0);
|
umask(0);
|
||||||
$file = $outputdir . "/$this->ref/$this->ref.tex";
|
$file = $outputdir . "/$this->ref/$this->ref.tex";
|
||||||
@ -272,6 +282,25 @@ class Fichinter
|
|||||||
$this->projet = $projet->title;
|
$this->projet = $projet->title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Retourne le libellé du statut de l'intervantion
|
||||||
|
* \return string Libellé
|
||||||
|
*/
|
||||||
|
function getLibStatut()
|
||||||
|
{
|
||||||
|
return $this->LibStatut($this->statut);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Renvoi le libellé d'un statut donné
|
||||||
|
* \param statut id statut
|
||||||
|
* \return string Libellé
|
||||||
|
*/
|
||||||
|
function LibStatut($statut)
|
||||||
|
{
|
||||||
|
return $this->statuts[$statut];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require("../contact.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/fichinter/fichinter.class.php");
|
||||||
|
|
||||||
$langs->load("interventions");
|
$langs->load("interventions");
|
||||||
|
|
||||||
@ -69,6 +70,8 @@ $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit( $limit + 1 ,$offset);
|
|||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
$fichinter_static=new Fichinter($db);
|
||||||
|
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
print_barre_liste($langs->trans("ListOfInterventions"), $page, "index.php","&socid=$socid",$sortfield,$sortorder,'',$num);
|
print_barre_liste($langs->trans("ListOfInterventions"), $page, "index.php","&socid=$socid",$sortfield,$sortorder,'',$num);
|
||||||
|
|
||||||
@ -90,22 +93,21 @@ if ($result)
|
|||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]>";
|
print "<tr $bc[$var]>";
|
||||||
print "<td><a href=\"fiche.php?id=$objp->fichid\">".img_object($langs->trans("Show"),"task").' '.$objp->ref."</a></td>\n";
|
print "<td><a href=\"fiche.php?id=$objp->fichid\">".img_object($langs->trans("Show"),"task").' '.$objp->ref."</a></td>\n";
|
||||||
|
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$objp->idp.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dolibarr_trunc($objp->nom,44)."</a></td>\n";
|
||||||
print '<td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$objp->idp.'">'.img_object($langs->trans("ShowCompany"),"company").' '.$objp->nom."</a></td>\n";
|
|
||||||
print '<td>'.nl2br($objp->note).'</td>';
|
print '<td>'.nl2br($objp->note).'</td>';
|
||||||
print '<td align="center">'.dolibarr_print_date($objp->dp)."</td>\n";
|
print '<td align="center">'.dolibarr_print_date($objp->dp)."</td>\n";
|
||||||
print '<td align="right">'.price($objp->duree).'</td>';
|
print '<td align="right">'.price($objp->duree).'</td>';
|
||||||
print '<td align="center">'.$objp->fk_statut.'</td>';
|
print '<td align="center">'.$fichinter_static->LibStatut($objp->fk_statut).'</td>';
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$total += $objp->duree;
|
$total += $objp->duree;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print '<tr class="liste_total"><td colspan="3"></td><td>'.$langs->trans("Total").'</td>';
|
print '<tr class="liste_total"><td colspan="3"></td><td>'.$langs->trans("Total").'</td>';
|
||||||
print "<td align=\"right\" nowrap>".price($total)."</td><td></td>";
|
print '<td align="right" nowrap>'.price($total).'</td><td></td>';
|
||||||
print "</tr>";
|
print '</tr>';
|
||||||
|
|
||||||
print "</table>";
|
print '</table>';
|
||||||
$db->free($result);
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -20,8 +20,9 @@
|
|||||||
* $Source$
|
* $Source$
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require("../contact.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
||||||
|
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
@ -29,6 +30,7 @@ if ($user->societe_id > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Liste
|
* Liste
|
||||||
*
|
*
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user