diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php
index bc12fd5ddd6..997b0e97bdb 100644
--- a/htdocs/admin/mails.php
+++ b/htdocs/admin/mails.php
@@ -526,11 +526,17 @@ else
print '
| '.$langs->trans("Parameter").' | '.$langs->trans("Value").' |
';
// Disable
- print '| '.$langs->trans("MAIN_DISABLE_ALL_MAILS").' | '.yn($conf->global->MAIN_DISABLE_ALL_MAILS).' |
';
+ print '| '.$langs->trans("MAIN_DISABLE_ALL_MAILS").' | '.yn($conf->global->MAIN_DISABLE_ALL_MAILS);
+ if (! empty($conf->global->MAIN_DISABLE_ALL_MAILS)) print img_warning($langs->trans("Disabled"));
+ print ' |
';
// Force e-mail recipient
print '| '.$langs->trans("MAIN_MAIL_FORCE_SENDTO").' | '.$conf->global->MAIN_MAIL_FORCE_SENDTO;
- if (! empty($conf->global->MAIN_MAIL_FORCE_SENDTO) && ! isValidEmail($conf->global->MAIN_MAIL_FORCE_SENDTO)) print img_warning($langs->trans("ErrorBadEMail"));
+ if (! empty($conf->global->MAIN_MAIL_FORCE_SENDTO))
+ {
+ if (! isValidEmail($conf->global->MAIN_MAIL_FORCE_SENDTO)) print img_warning($langs->trans("ErrorBadEMail"));
+ else print img_warning($langs->trans("RecipientEmailsWillBeReplacedWithThisValue"));
+ }
print ' |
';
//Add user to select destinaries list
diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php
index 1fbae964dff..bd57005b7bf 100644
--- a/htdocs/comm/action/list.php
+++ b/htdocs/comm/action/list.php
@@ -43,7 +43,7 @@ $action=GETPOST('action', 'alpha');
$contextpage=GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'actioncommlist'; // To manage different context of search
$resourceid=GETPOST("search_resourceid", "int")?GETPOST("search_resourceid", "int"):GETPOST("resourceid", "int");
$pid=GETPOST("search_projectid", 'int', 3)?GETPOST("search_projectid", 'int', 3):GETPOST("projectid", 'int', 3);
-$status=GETPOST("search_status", 'alpha')?GETPOST("search_status", 'alpha'):GETPOST("status", 'alpha');
+$status=(GETPOST("search_status", 'alpha') != '')?GETPOST("search_status", 'alpha'):GETPOST("status", 'alpha');
$type=GETPOST('search_type', 'alphanohtml')?GETPOST('search_type', 'alphanohtml'):GETPOST('type', 'alphanohtml');
$optioncss = GETPOST('optioncss', 'alpha');
$year=GETPOST("year", 'int');
diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php
index b5473ddacb9..a10eea9c1a8 100644
--- a/htdocs/compta/prelevement/card.php
+++ b/htdocs/compta/prelevement/card.php
@@ -63,78 +63,86 @@ $object = new BonPrelevement($db, "");
// Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
+$hookmanager->initHooks(array('directdebitprevcard','globalcard'));
/*
* Actions
*/
-if ( $action == 'confirm_delete' )
+$parameters = array('socid' => $socid);
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
+if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
+
+if (empty($reshook))
{
- $res=$object->delete($user);
- if ($res > 0)
+ if ( $action == 'confirm_delete' )
+ {
+ $res=$object->delete($user);
+ if ($res > 0)
+ {
+ header("Location: index.php");
+ exit;
+ }
+ }
+
+ // Seems to no be used and replaced with $action == 'infocredit'
+ if ( $action == 'confirm_credite' && GETPOST('confirm','alpha') == 'yes')
+ {
+ $res=$object->set_credite();
+ if ($res >= 0)
+ {
+ header("Location: card.php?id=".$id);
+ exit;
+ }
+ }
+
+ if ($action == 'infotrans' && $user->rights->prelevement->bons->send)
+ {
+ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
+
+ $dt = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
+
+ /*
+ if ($_FILES['userfile']['name'] && basename($_FILES['userfile']['name'],".ps") == $object->ref)
+ {
+ $dir = $conf->prelevement->dir_output.'/receipts';
+
+ if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $dir . "/" . dol_unescapefile($_FILES['userfile']['name']),1) > 0)
+ {
+ $object->set_infotrans($user, $dt, GETPOST('methode','alpha'));
+ }
+
+ header("Location: card.php?id=".$id);
+ exit;
+ }
+ else
+ {
+ dol_syslog("Fichier invalide",LOG_WARNING);
+ $mesg='BadFile';
+ }*/
+
+ $error = $object->set_infotrans($user, $dt, GETPOST('methode', 'alpha'));
+
+ if ($error)
+ {
+ header("Location: card.php?id=".$id."&error=$error");
+ exit;
+ }
+ }
+
+ // Set direct debit order to credited, create payment and close invoices
+ if ($action == 'infocredit' && $user->rights->prelevement->bons->credit)
{
- header("Location: index.php");
- exit;
- }
-}
+ $dt = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
-// Seems to no be used and replaced with $action == 'infocredit
-if ( $action == 'confirm_credite' && GETPOST('confirm', 'alpha') == 'yes')
-{
- $res=$object->set_credite();
- if ($res >= 0)
- {
- header("Location: card.php?id=".$id);
- exit;
- }
-}
+ $error = $object->set_infocredit($user, $dt);
-if ($action == 'infotrans' && $user->rights->prelevement->bons->send)
-{
- require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
-
- $dt = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
-
- /*
- if ($_FILES['userfile']['name'] && basename($_FILES['userfile']['name'],".ps") == $object->ref)
- {
- $dir = $conf->prelevement->dir_output.'/receipts';
-
- if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $dir . "/" . dol_unescapefile($_FILES['userfile']['name']),1) > 0)
- {
- $object->set_infotrans($user, $dt, GETPOST('methode','alpha'));
- }
-
- header("Location: card.php?id=".$id);
- exit;
- }
- else
- {
- dol_syslog("Fichier invalide",LOG_WARNING);
- $mesg='BadFile';
- }*/
-
- $error = $object->set_infotrans($user, $dt, GETPOST('methode', 'alpha'));
-
- if ($error)
- {
- header("Location: card.php?id=".$id."&error=$error");
- exit;
- }
-}
-
-// Set direct debit order to credited, create payment and close invoices
-if ($action == 'infocredit' && $user->rights->prelevement->bons->credit)
-{
- $dt = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
-
- $error = $object->set_infocredit($user, $dt);
-
- if ($error)
- {
- header("Location: card.php?id=".$id."&error=$error");
- exit;
- }
+ if ($error)
+ {
+ header("Location: card.php?id=".$id."&error=$error");
+ exit;
+ }
+ }
}
diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php
index 3ac50a65e9a..0318efb7e1a 100644
--- a/htdocs/compta/sociales/card.php
+++ b/htdocs/compta/sociales/card.php
@@ -655,7 +655,7 @@ if ($id > 0)
else
{
- print '| '.$langs->trans("None").' | ';
+ print '
| '.$langs->trans("None").' | ';
print ' | | | | ';
print '
';
}
diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php
index 28e5addd2b2..9f94dd86867 100644
--- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php
+++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php
@@ -414,7 +414,11 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
}
}
// Make substitutions into odt of thirdparty
- $tmparray=$this->get_substitutionarray_thirdparty($socobject, $outputlangs);
+ if ($socobject->element == 'contact') {
+ $tmparray = $this->get_substitutionarray_contact($socobject, $outputlangs);
+ } else {
+ $tmparray = $this->get_substitutionarray_thirdparty($socobject, $outputlangs);
+ }
foreach($tmparray as $key=>$value)
{
try {
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index be22f4eab8c..4cf9edaa28e 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1930,3 +1930,4 @@ YouWillFindItOnYourIFTTTAccount=You will find it on your IFTTT account
EndPointFor=End point for %s : %s
DeleteEmailCollector=Delete email collector
ConfirmDeleteEmailCollector=Are you sure you want to delete this email collector?
+RecipientEmailsWillBeReplacedWithThisValue=Recipient emails will be always replaced with this value