diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index 36c79c0f7c5..0a34723e2ce 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -328,8 +328,7 @@ if (empty($reshook))
$label = $lines[$i]->product_label;
}
- if ($conf->global->PRODUIT_DESC_IN_FORM)
- $desc .= ($lines[$i]->desc && $lines[$i]->desc!=$lines[$i]->libelle)?dol_htmlentitiesbr($lines[$i]->desc):'';
+ $desc .= ($lines[$i]->desc && $lines[$i]->desc!=$lines[$i]->libelle)?dol_htmlentitiesbr($lines[$i]->desc):'';
}
else {
$desc = dol_htmlentitiesbr($lines[$i]->desc);
@@ -360,7 +359,6 @@ if (empty($reshook))
$error++;
break;
}
-
}
}
}
diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php
index a946649592a..71b852880fb 100644
--- a/htdocs/expensereport/card.php
+++ b/htdocs/expensereport/card.php
@@ -333,7 +333,7 @@ if ($action == "confirm_save_from_refuse" && GETPOST("confirm") == "yes" && $id
if ($result > 0)
{
- if (! empty($conf->global->DEPLACEMENT_TO_CLEAN))
+ if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition
{
// Send mail
@@ -390,6 +390,7 @@ if ($action == "confirm_save_from_refuse" && GETPOST("confirm") == "yes" && $id
else
{
$mesg=$mailfile->error;
+ setEventMessages($mesg, null, 'errors');
}
// END - Send mail
}
@@ -438,7 +439,7 @@ if ($action == "confirm_approve" && GETPOST("confirm") == "yes" && $id > 0 && $u
if ($result > 0)
{
- if (! empty($conf->global->DEPLACEMENT_TO_CLEAN))
+ if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition
{
// Send mail
@@ -542,7 +543,7 @@ if ($action == "confirm_refuse" && GETPOST('confirm')=="yes" && $id > 0 && $user
if ($result > 0)
{
- if (! empty($conf->global->DEPLACEMENT_TO_CLEAN))
+ if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition
{
// Send mail
@@ -583,7 +584,6 @@ if ($action == "confirm_refuse" && GETPOST('confirm')=="yes" && $id > 0 && $user
else
{
setEventMessages($langs->trans("ErrorFailedToSendMail",$emailFrom,$emailTo), null, 'errors');
- $mesg="Impossible d'envoyer l'email.";
}
// END - Send mail
}
@@ -627,7 +627,7 @@ if ($action == "confirm_cancel" && GETPOST('confirm')=="yes" && GETPOST('detail_
if ($result > 0)
{
- if (! empty($conf->global->DEPLACEMENT_TO_CLEAN))
+ if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition
{
// Send mail
@@ -667,6 +667,7 @@ if ($action == "confirm_cancel" && GETPOST('confirm')=="yes" && GETPOST('detail_
else
{
$mesg="Impossible d'envoyer l'email.";
+ setEventMessages($mesg, null, 'errors');
}
// END - Send mail
}
@@ -756,7 +757,7 @@ if ($action == 'set_paid' && $id > 0 && $user->rights->expensereport->to_paid)
if ($result > 0)
{
- if (! empty($conf->global->DEPLACEMENT_TO_CLEAN))
+ if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition
{
// Send mail
@@ -806,9 +807,8 @@ if ($action == 'set_paid' && $id > 0 && $user->rights->expensereport->to_paid)
endif;
else:
-
- $mesg="Impossible d'envoyer l'email.";
-
+ $mesg="Impossible d'envoyer l'email.";
+ setEventMessages($mesg, null, 'errors');
endif;
// END - Send mail
}
@@ -921,7 +921,7 @@ if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes")
$total_ht = $object_ligne->total_ht;
$total_tva = $object_ligne->total_tva;
- $result=$object->deleteline(GETPOST("rowid"));
+ $result=$object->deleteline(GETPOST("rowid"), $user);
if ($result >= 0)
{
if ($result > 0)
@@ -961,7 +961,6 @@ if ($action == "updateligne" )
$rowid = $_POST['rowid'];
$type_fees_id = GETPOST('fk_c_type_fees');
- $object_ligne->vatrate = price2num(GETPOST('vatrate'));
$projet_id = $fk_projet;
$comments = GETPOST('comments');
$qty = GETPOST('qty');
@@ -983,6 +982,7 @@ if ($action == "updateligne" )
if (! $error)
{
+ // TODO Use update method of ExpenseReportLine
$result = $object->updateline($rowid, $type_fees_id, $projet_id, $vatrate, $comments, $qty, $value_unit, $date, $id);
if ($result >= 0)
{
@@ -1078,29 +1078,6 @@ $formfile = new FormFile($db);
$formproject = new FormProjets($db);
$projecttmp = new Project($db);
-if (! empty($conf->global->DEPLACEMENT_TO_CLEAN))
-{
- if(!empty($_GET['mesg']))
- {
- $text_mesg = explode(",",$_GET['mesg']);
-
- foreach($text_mesg as $text)
- {
- $mesg.= "- ".$langs->trans($text)."
";
- }
-
- print "