Fix: Navigation arrows were missing
This commit is contained in:
parent
763eb8f32c
commit
9ed46d9892
@ -220,7 +220,7 @@ class Fichinter extends CommonObject
|
||||
$sql.= " f.tms as datem,";
|
||||
$sql.= " f.duree, f.fk_projet, f.note_public, f.note_private, f.model_pdf, f.extraparams";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."fichinter as f";
|
||||
if ($ref) $sql.= " WHERE f.ref='".$ref."'";
|
||||
if ($ref) $sql.= " WHERE f.ref='".$this->db->escape($ref)."'";
|
||||
else $sql.= " WHERE f.rowid=".$rowid;
|
||||
|
||||
dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
|
||||
@ -244,7 +244,7 @@ class Fichinter extends CommonObject
|
||||
$this->note_public = $obj->note_public;
|
||||
$this->note_private = $obj->note_private;
|
||||
$this->modelpdf = $obj->model_pdf;
|
||||
|
||||
|
||||
$this->extraparams = (array) dol_json_decode($obj->extraparams, true);
|
||||
|
||||
if ($this->statut == 0) $this->brouillon = 1;
|
||||
|
||||
@ -34,6 +34,7 @@ $langs->load("sendings");
|
||||
$langs->load("companies");
|
||||
|
||||
$id = GETPOST('id','int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action','alpha');
|
||||
|
||||
// Security check
|
||||
@ -41,6 +42,7 @@ if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'ficheinter', $id, 'fichinter');
|
||||
|
||||
$object = new Fichinter($db);
|
||||
$result = $object->fetch($id,$ref);
|
||||
|
||||
|
||||
/*
|
||||
@ -49,8 +51,6 @@ $object = new Fichinter($db);
|
||||
|
||||
if ($action == 'addcontact' && $user->rights->ficheinter->creer)
|
||||
{
|
||||
$result = $object->fetch($id);
|
||||
|
||||
if ($result > 0 && $id > 0)
|
||||
{
|
||||
$result = $object->add_contact(GETPOST('contactid','int'), GETPOST('type','int'), GETPOST('source','alpha'));
|
||||
@ -78,20 +78,12 @@ if ($action == 'addcontact' && $user->rights->ficheinter->creer)
|
||||
// bascule du statut d'un contact
|
||||
else if ($action == 'swapstatut' && $user->rights->ficheinter->creer)
|
||||
{
|
||||
if ($object->fetch($id))
|
||||
{
|
||||
$result=$object->swapContactStatus(GETPOST('ligne','int'));
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
$result=$object->swapContactStatus(GETPOST('ligne','int'));
|
||||
}
|
||||
|
||||
// Efface un contact
|
||||
else if ($action == 'deletecontact' && $user->rights->ficheinter->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result = $object->delete_contact(GETPOST('lineid','int'));
|
||||
|
||||
if ($result >= 0)
|
||||
@ -109,63 +101,51 @@ else if ($action == 'deletecontact' && $user->rights->ficheinter->creer)
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
$form = new Form($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
$contactstatic=new Contact($db);
|
||||
$userstatic=new User($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
/* *************************************************************************** */
|
||||
/* */
|
||||
/* Mode vue et edition */
|
||||
/* */
|
||||
/* *************************************************************************** */
|
||||
|
||||
// Mode vue et edition
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
|
||||
if ($id > 0)
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
if ($object->fetch($id) > 0)
|
||||
{
|
||||
$soc = new Societe($db);
|
||||
$soc->fetch($object->socid);
|
||||
$soc = new Societe($db);
|
||||
$soc->fetch($object->socid);
|
||||
|
||||
|
||||
$head = fichinter_prepare_head($object);
|
||||
dol_fiche_head($head, 'contact', $langs->trans("InterventionCard"), 0, 'intervention');
|
||||
$head = fichinter_prepare_head($object);
|
||||
dol_fiche_head($head, 'contact', $langs->trans("InterventionCard"), 0, 'intervention');
|
||||
|
||||
|
||||
/*
|
||||
* Fiche intervention synthese pour rappel
|
||||
*/
|
||||
print '<table class="border" width="100%">';
|
||||
/*
|
||||
* Fiche intervention synthese pour rappel
|
||||
*/
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print $object->ref;
|
||||
print "</td></tr>";
|
||||
// Ref
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||
print $form->showrefnav($object,'ref','',1,'ref','ref');
|
||||
print "</td></tr>";
|
||||
|
||||
// Customer
|
||||
if ( is_null($object->client) )
|
||||
$object->fetch_thirdparty();
|
||||
// Customer
|
||||
if ( is_null($object->client) )
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
print "<tr><td>".$langs->trans("Company")."</td>";
|
||||
print '<td colspan="3">'.$object->client->getNomUrl(1).'</td></tr>';
|
||||
print "</table>";
|
||||
print "<tr><td>".$langs->trans("Company")."</td>";
|
||||
print '<td colspan="3">'.$object->client->getNomUrl(1).'</td></tr>';
|
||||
print "</table>";
|
||||
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Contacts lines
|
||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/contacts.tpl.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
print "ErrorRecordNotFound";
|
||||
}
|
||||
print '<br>';
|
||||
|
||||
// Contacts lines
|
||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/contacts.tpl.php');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -39,6 +39,7 @@ $langs->load("companies");
|
||||
$langs->load("interventions");
|
||||
|
||||
$id = GETPOST('id','int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action','alpha');
|
||||
|
||||
// Security check
|
||||
@ -59,7 +60,7 @@ if (! $sortfield) $sortfield="name";
|
||||
|
||||
|
||||
$object = new Fichinter($db);
|
||||
$object->fetch($id);
|
||||
$object->fetch($id, $ref);
|
||||
|
||||
$upload_dir = $conf->ficheinter->dir_output.'/'.dol_sanitizeFileName($object->ref);
|
||||
$modulepart='fichinter';
|
||||
@ -155,7 +156,9 @@ if ($object->id)
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
// Ref
|
||||
print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td>'.$object->ref.'</td></tr>';
|
||||
print '<tr><td width="30%">'.$langs->trans("Ref").'</td><td>';
|
||||
print $form->showrefnav($object,'ref','',1,'ref','ref');
|
||||
print '</td></tr>';
|
||||
|
||||
// Societe
|
||||
print "<tr><td>".$langs->trans("Company")."</td><td>".$object->client->getNomUrl(1)."</td></tr>";
|
||||
|
||||
@ -227,7 +227,7 @@ else if ($action == 'setnote_public' && $user->rights->ficheinter->creer)
|
||||
else if ($action == 'setnote_private' && $user->rights->ficheinter->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
|
||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES));
|
||||
if ($result < 0) dol_print_error($db,$object->error);
|
||||
}
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@ $langs->load('companies');
|
||||
$langs->load("interventions");
|
||||
|
||||
$id = GETPOST('id','int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action=GETPOST('action','alpha');
|
||||
|
||||
// Security check
|
||||
@ -37,62 +38,60 @@ if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'ficheinter', $id, 'fichinter');
|
||||
|
||||
$object = new Fichinter($db);
|
||||
$object->fetch($id,$ref);
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* Actions */
|
||||
/******************************************************************************/
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == 'setnote_public' && $user->rights->ficheinter->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result=$object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
|
||||
if ($result < 0) dol_print_error($db,$object->error);
|
||||
}
|
||||
|
||||
else if ($action == 'setnote' && $user->rights->ficheinter->creer)
|
||||
else if ($action == 'setnote_private' && $user->rights->ficheinter->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
|
||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES));
|
||||
if ($result < 0) dol_print_error($db,$object->error);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/* Affichage fiche */
|
||||
/******************************************************************************/
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
if ($id > 0)
|
||||
if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
if ($mesg) print $mesg;
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
if ($object->fetch($id))
|
||||
$societe = new Societe($db);
|
||||
if ($societe->fetch($object->socid))
|
||||
{
|
||||
$societe = new Societe($db);
|
||||
if ($societe->fetch($object->socid))
|
||||
{
|
||||
$head = fichinter_prepare_head($object);
|
||||
dol_fiche_head($head, 'note', $langs->trans('InterventionCard'), 0, 'intervention');
|
||||
$head = fichinter_prepare_head($object);
|
||||
dol_fiche_head($head, 'note', $langs->trans('InterventionCard'), 0, 'intervention');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">'.$object->ref.'</td></tr>';
|
||||
print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">';
|
||||
print $form->showrefnav($object,'ref','',1,'ref','ref');
|
||||
print '</td></tr>';
|
||||
|
||||
// Company
|
||||
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="3">'.$societe->getNomUrl(1).'</td></tr>';
|
||||
// Company
|
||||
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="3">'.$societe->getNomUrl(1).'</td></tr>';
|
||||
|
||||
print "</table>";
|
||||
print "</table>";
|
||||
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php');
|
||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php');
|
||||
|
||||
print '</div>';
|
||||
}
|
||||
print '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user