mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Rename "duree" property of interventions to "duration"
This also fixes the display problem of total duration on the "soleil" document model
This commit is contained in:
@@ -241,7 +241,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
|
||||
$pdf->SetXY($this->marge_gauche, $tab_top + 5);
|
||||
$text=$object->description;
|
||||
if ($object->duree > 0)
|
||||
if ($object->duration > 0)
|
||||
{
|
||||
$totaltime=convertSecondToTime($object->duration,'all',$conf->global->MAIN_DURATION_OF_WORKDAY);
|
||||
$text.=($text?' - ':'').$langs->trans("Total").": ".$totaltime;
|
||||
@@ -436,9 +436,9 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
||||
$pdf->SetXY($this->marge_gauche, $tab_top + 8);
|
||||
$text=$object->description;
|
||||
if ($object->duree > 0)
|
||||
if ($object->duration > 0)
|
||||
{
|
||||
$totaltime=convertSecondToTime($object->duree,'all',$conf->global->MAIN_DURATION_OF_WORKDAY);
|
||||
$totaltime=convertSecondToTime($object->duration,'all',$conf->global->MAIN_DURATION_OF_WORKDAY);
|
||||
$text.=($text?' - ':'').$langs->trans("Total").": ".$totaltime;
|
||||
}
|
||||
$desc=dol_htmlentitiesbr($text,1);
|
||||
|
||||
@@ -160,7 +160,7 @@ else if ($action == 'confirm_modify' && $confirm == 'yes' && $user->rights->fich
|
||||
else if ($action == 'add' && $user->rights->ficheinter->creer)
|
||||
{
|
||||
$object->socid = $socid;
|
||||
$object->duree = GETPOST('duree','int');
|
||||
$object->duration = GETPOST('duration','int');
|
||||
$object->fk_project = GETPOST('projectid','int');
|
||||
$object->fk_contrat = GETPOST('contratid','int');
|
||||
$object->author = $user->id;
|
||||
@@ -1256,7 +1256,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
// Duration
|
||||
print '<tr><td>'.$langs->trans("TotalDuration").'</td>';
|
||||
print '<td colspan="3">'.convertSecondToTime($object->duree, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY).'</td>';
|
||||
print '<td colspan="3">'.convertSecondToTime($object->duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ class Fichinter extends CommonObject
|
||||
var $datec;
|
||||
var $datev;
|
||||
var $datem;
|
||||
var $duree;
|
||||
var $duration;
|
||||
var $statut; // 0=draft, 1=validated, 2=invoiced
|
||||
var $description;
|
||||
var $note_private;
|
||||
@@ -116,7 +116,7 @@ class Fichinter extends CommonObject
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (! is_numeric($this->duree)) $this->duree = 0;
|
||||
if (! is_numeric($this->duration)) $this->duration = 0;
|
||||
|
||||
if ($this->socid <= 0)
|
||||
{
|
||||
@@ -234,8 +234,8 @@ class Fichinter extends CommonObject
|
||||
*/
|
||||
function update($user, $notrigger=0)
|
||||
{
|
||||
if (! is_numeric($this->duree)) {
|
||||
$this->duree = 0;
|
||||
if (! is_numeric($this->duration)) {
|
||||
$this->duration = 0;
|
||||
}
|
||||
if (! dol_strlen($this->fk_project)) {
|
||||
$this->fk_project = 0;
|
||||
@@ -245,7 +245,7 @@ class Fichinter extends CommonObject
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."fichinter SET ";
|
||||
$sql.= "description = '".$this->db->escape($this->description)."'";
|
||||
$sql.= ", duree = ".$this->duree;
|
||||
$sql.= ", duree = ".$this->duration;
|
||||
$sql.= ", fk_projet = ".$this->fk_project;
|
||||
$sql.= ", note_private = ".($this->note_private?"'".$this->db->escape($this->note_private)."'":"null");
|
||||
$sql.= ", note_public = ".($this->note_public?"'".$this->db->escape($this->note_public)."'":"null");
|
||||
@@ -306,7 +306,7 @@ class Fichinter extends CommonObject
|
||||
$this->description = $obj->description;
|
||||
$this->socid = $obj->fk_soc;
|
||||
$this->statut = $obj->fk_statut;
|
||||
$this->duree = $obj->duree;
|
||||
$this->duration = $obj->duree;
|
||||
$this->datec = $this->db->jdate($obj->datec);
|
||||
$this->datev = $this->db->jdate($obj->datev);
|
||||
$this->datem = $this->db->jdate($obj->datem);
|
||||
@@ -951,7 +951,7 @@ class Fichinter extends CommonObject
|
||||
$this->datec = $now;
|
||||
$this->note_private='Private note';
|
||||
$this->note_public='SPECIMEN';
|
||||
$this->duree = 0;
|
||||
$this->duration = 0;
|
||||
$nbp = 25;
|
||||
$xnbp = 0;
|
||||
while ($xnbp < $nbp)
|
||||
@@ -964,7 +964,7 @@ class Fichinter extends CommonObject
|
||||
$this->lines[$xnbp]=$line;
|
||||
$xnbp++;
|
||||
|
||||
$this->duree+=$line->duration;
|
||||
$this->duration+=$line->duration;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user