diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php
index 7fc2467de08..59f1a85803f 100644
--- a/htdocs/compta/deplacement/fiche.php
+++ b/htdocs/compta/deplacement/fiche.php
@@ -20,6 +20,12 @@
* $Source$
*
*/
+
+/*!
+ \file htdocs/compta/deplacement/fiche.php
+ \brief Page fiche d'un déplacement
+*/
+
require("./pre.inc.php");
$mesg = '';
@@ -45,13 +51,13 @@ if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
$deplacement->userid = $user->id; //$_POST["km"];
$id = $deplacement->create($user);
- if ($_POST["id"])
+ if ($id)
{
- Header ( "Location: fiche.php?id=".$_POST["id"]);
+ Header ( "Location: fiche.php?id=".$id);
}
else
{
- print "Error";
+ dolibarr_print_error($db);
}
}
@@ -136,6 +142,8 @@ else
$html = new Form($db);
$html->form_confirm("fiche.php?id=".$_GET["id"],"Supprimer ce déplacement","Etes-vous sűr de vouloir supprimer ce déplacement ?","confirm_delete");
+
+ print '
';
}
@@ -147,7 +155,7 @@ else
print '';
print '';
- print '
| '.dolibarr_print_date($objp->dd).' | '; print '' . $soc->nom_url . ' | '; - print ''.$objp->firstname.' '.$objp->name.' | '; + print ''.$objp->firstname.' '.$objp->name.' | '; print "\n"; @@ -97,8 +106,7 @@ if ( $db->query($sql) ) } else { - print $db->error(); - print "