Fix: Visited company not saved
This commit is contained in:
parent
98e46b4011
commit
6c2d7c07a2
@ -40,9 +40,11 @@ class Deplacement extends CommonObject
|
||||
var $fk_user;
|
||||
var $km;
|
||||
var $note;
|
||||
|
||||
var $socid;
|
||||
|
||||
|
||||
/*
|
||||
* Initialistation automatique de la classe
|
||||
* Constructor
|
||||
*/
|
||||
function Deplacement($DB)
|
||||
{
|
||||
@ -104,9 +106,10 @@ class Deplacement extends CommonObject
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
function update($user)
|
||||
{
|
||||
global $langs;
|
||||
@ -164,6 +167,7 @@ class Deplacement extends CommonObject
|
||||
$obj = $this->db->fetch_object($result);
|
||||
|
||||
$this->id = $obj->rowid;
|
||||
$this->ref = $obj->rowid;
|
||||
$this->date = $obj->dated;
|
||||
$this->fk_user = $obj->fk_user;
|
||||
$this->socid = $obj->fk_soc;
|
||||
|
||||
@ -197,13 +197,13 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
print "<tr>";
|
||||
print '<td>'.$langs->trans("CompanyVisited").'</td><td>';
|
||||
print $html->select_societes($soc->id,'socid','',1);
|
||||
print '<td>'.$langs->trans("Type").'</td><td>';
|
||||
print $html->select_type_fees($deplacement->type,'type',1);
|
||||
print '</td></tr>';
|
||||
|
||||
print "<tr>";
|
||||
print '<td>'.$langs->trans("Type").'</td><td>';
|
||||
print $html->select_type_fees($deplacement->type,'type',1);
|
||||
print '<td>'.$langs->trans("CompanyVisited").'</td><td>';
|
||||
print $html->select_societes($soc->id,'socid','',1);
|
||||
print '</td></tr>';
|
||||
|
||||
print "<tr>";
|
||||
@ -254,13 +254,13 @@ else
|
||||
print $deplacement->ref;
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td>'.$langs->trans($deplacement->type).'</td></tr>';
|
||||
|
||||
print '<tr><td width="20%">'.$langs->trans("CompanyVisited").'</td>';
|
||||
print '<td>';
|
||||
if ($soc->id) print $soc->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Type").'</td><td>'.$langs->trans($deplacement->type).'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Person").'</td><td>';
|
||||
$userfee=new User($db,$deplacement->fk_user);
|
||||
$userfee->fetch();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user