diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec
index 9f360c3ef19..110eae0a3a2 100755
--- a/build/rpm/dolibarr_fedora.spec
+++ b/build/rpm/dolibarr_fedora.spec
@@ -213,6 +213,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/reception
%_datadir/dolibarr/htdocs/resource
+%_datadir/dolibarr/htdocs/salaries
%_datadir/dolibarr/htdocs/societe
%_datadir/dolibarr/htdocs/stripe
%_datadir/dolibarr/htdocs/supplier_proposal
@@ -224,6 +225,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/website
+%_datadir/dolibarr/htdocs/zapier
%_datadir/dolibarr/htdocs/*.ico
%_datadir/dolibarr/htdocs/*.patch
%_datadir/dolibarr/htdocs/*.php
diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec
index 9c51feba990..ba5c426ea3f 100755
--- a/build/rpm/dolibarr_generic.spec
+++ b/build/rpm/dolibarr_generic.spec
@@ -293,6 +293,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/reception
%_datadir/dolibarr/htdocs/resource
+%_datadir/dolibarr/htdocs/salaries
%_datadir/dolibarr/htdocs/societe
%_datadir/dolibarr/htdocs/stripe
%_datadir/dolibarr/htdocs/supplier_proposal
@@ -304,6 +305,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/website
+%_datadir/dolibarr/htdocs/zapier
%_datadir/dolibarr/htdocs/*.ico
%_datadir/dolibarr/htdocs/*.patch
%_datadir/dolibarr/htdocs/*.php
diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec
index 9f87638e8ba..073ef0389ce 100755
--- a/build/rpm/dolibarr_mandriva.spec
+++ b/build/rpm/dolibarr_mandriva.spec
@@ -210,6 +210,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/reception
%_datadir/dolibarr/htdocs/resource
+%_datadir/dolibarr/htdocs/salaries
%_datadir/dolibarr/htdocs/societe
%_datadir/dolibarr/htdocs/stripe
%_datadir/dolibarr/htdocs/supplier_proposal
@@ -221,6 +222,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/website
+%_datadir/dolibarr/htdocs/zapier
%_datadir/dolibarr/htdocs/*.ico
%_datadir/dolibarr/htdocs/*.patch
%_datadir/dolibarr/htdocs/*.php
diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec
index f55ca13906d..be61853e165 100755
--- a/build/rpm/dolibarr_opensuse.spec
+++ b/build/rpm/dolibarr_opensuse.spec
@@ -221,6 +221,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/public
%_datadir/dolibarr/htdocs/reception
%_datadir/dolibarr/htdocs/resource
+%_datadir/dolibarr/htdocs/salaries
%_datadir/dolibarr/htdocs/societe
%_datadir/dolibarr/htdocs/stripe
%_datadir/dolibarr/htdocs/supplier_proposal
@@ -232,6 +233,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/website
+%_datadir/dolibarr/htdocs/zapier
%_datadir/dolibarr/htdocs/*.ico
%_datadir/dolibarr/htdocs/*.patch
%_datadir/dolibarr/htdocs/*.php
diff --git a/doc/images/dolibarr_screenshot1_1920x1080.jpg b/doc/images/dolibarr_screenshot1_1920x1080.jpg
index 67ddece6df5..bc46b00a130 100644
Binary files a/doc/images/dolibarr_screenshot1_1920x1080.jpg and b/doc/images/dolibarr_screenshot1_1920x1080.jpg differ
diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php
index b244d8be123..b0007395e0a 100644
--- a/htdocs/accountancy/class/accountingaccount.class.php
+++ b/htdocs/accountancy/class/accountingaccount.class.php
@@ -171,6 +171,7 @@ class AccountingAccount extends CommonObject
$sql .= " a.rowid = " . (int) $rowid;
} elseif ($account_number) {
$sql .= " a.account_number = '" . $this->db->escape($account_number) . "'";
+ $sql .= " AND a.entity = ".$conf->entity;
}
if (! empty($limittocurrentchart)) {
$sql .= ' AND a.fk_pcg_version IN (SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $this->db->escape($conf->global->CHARTOFACCOUNTS) . ')';
diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php
index 782b151a5a4..48df5ce374a 100644
--- a/htdocs/accountancy/customer/index.php
+++ b/htdocs/accountancy/customer/index.php
@@ -152,6 +152,8 @@ if ($action == 'validatehistory') {
while ($i < min($num_lines, 10000)) { // No more than 10000 at once
$objp = $db->fetch_object($result);
+ $isBuyerInEEC = isInEEC($objp);
+
// Search suggested account for product/service
$suggestedaccountingaccountfor = '';
if (($objp->country_code == $mysoc->country_code) || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php
index f6b149de291..d52c4c51f07 100644
--- a/htdocs/accountancy/customer/lines.php
+++ b/htdocs/accountancy/customer/lines.php
@@ -230,7 +230,7 @@ if (strlen(trim($search_country))) {
elseif ($search_country == 'special_eec') $sql .= " AND co.code IN (".$country_code_in_EEC.")";
elseif ($search_country == 'special_eecnotme') $sql .= " AND co.code IN (".$country_code_in_EEC_without_me.")";
elseif ($search_country == 'special_noteec') $sql .= " AND co.code NOT IN (".$country_code_in_EEC.")";
- else $sql .= natural_search(array("co.code", "co.label"), $search_country);
+ else $sql .= natural_search("co.code", $search_country);
}
if (strlen(trim($search_tvaintra))) {
$sql .= natural_search("s.tva_intra", $search_tvaintra);
diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php
index e8b898a455d..d964d348889 100644
--- a/htdocs/accountancy/customer/list.php
+++ b/htdocs/accountancy/customer/list.php
@@ -262,7 +262,7 @@ if (strlen(trim($search_country))) {
elseif ($search_country == 'special_eec') $sql .= " AND co.code IN (".$country_code_in_EEC.")";
elseif ($search_country == 'special_eecnotme') $sql .= " AND co.code IN (".$country_code_in_EEC_without_me.")";
elseif ($search_country == 'special_noteec') $sql .= " AND co.code NOT IN (".$country_code_in_EEC.")";
- else $sql .= natural_search(array("co.code", "co.label"), $search_country);
+ else $sql .= natural_search("co.code", $search_country);
}
if (strlen(trim($search_tvaintra))) {
$sql .= natural_search("s.tva_intra", $search_tvaintra);
diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php
index 1a0844436b6..3bc44698029 100644
--- a/htdocs/accountancy/supplier/index.php
+++ b/htdocs/accountancy/supplier/index.php
@@ -141,12 +141,14 @@ if ($action == 'validatehistory') {
} else {
$num_lines = $db->num_rows($result);
- $isSellerInEEC = isInEEC($mysoc);
+ $isBuyerInEEC = isInEEC($mysoc);
$i = 0;
while ($i < min($num_lines, 10000)) { // No more than 10000 at once
$objp = $db->fetch_object($result);
+ $isSellerInEEC = isInEEC($objp);
+
// Search suggested account for product/service
$suggestedaccountingaccountfor = '';
if (($objp->country_code == $mysoc->country_code) || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php
index 7afae1538e7..a035aed2b1f 100644
--- a/htdocs/accountancy/supplier/lines.php
+++ b/htdocs/accountancy/supplier/lines.php
@@ -225,7 +225,7 @@ if (strlen(trim($search_country))) {
elseif ($search_country == 'special_eec') $sql .= " AND co.code IN (".$country_code_in_EEC.")";
elseif ($search_country == 'special_eecnotme') $sql .= " AND co.code IN (".$country_code_in_EEC_without_me.")";
elseif ($search_country == 'special_noteec') $sql .= " AND co.code NOT IN (".$country_code_in_EEC.")";
- else $sql .= natural_search(array("co.code", "co.label"), $search_country);
+ else $sql .= natural_search("co.code", $search_country);
}
if (strlen(trim($search_tvaintra))) {
$sql .= natural_search("s.tva_intra", $search_tvaintra);
diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php
index 33e356dddb4..ecd41f2f9da 100644
--- a/htdocs/accountancy/supplier/list.php
+++ b/htdocs/accountancy/supplier/list.php
@@ -263,7 +263,7 @@ if (strlen(trim($search_country))) {
elseif ($search_country == 'special_eec') $sql .= " AND co.code IN (".$country_code_in_EEC.")";
elseif ($search_country == 'special_eecnotme') $sql .= " AND co.code IN (".$country_code_in_EEC_without_me.")";
elseif ($search_country == 'special_noteec') $sql .= " AND co.code NOT IN (".$country_code_in_EEC.")";
- else $sql .= natural_search(array("co.code", "co.label"), $search_country);
+ else $sql .= natural_search("co.code", $search_country);
}
if (strlen(trim($search_tvaintra))) {
$sql .= natural_search("s.tva_intra", $search_tvaintra);
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 1ec82f7da31..0aa7bcbf6ea 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -2752,6 +2752,9 @@ class Adherent extends CommonObject
$nbok = 0;
$nbko = 0;
+ $listofmembersok = array();
+ $listofmembersko = array();
+
$arraydaysbeforeend=explode(';', $daysbeforeendlist);
foreach($arraydaysbeforeend as $daysbeforeend) // Loop on each delay
{
@@ -2768,7 +2771,8 @@ class Adherent extends CommonObject
$datetosearchfor = dol_time_plus_duree(dol_mktime(0, 0, 0, $tmp['mon'], $tmp['mday'], $tmp['year']), $daysbeforeend, 'd');
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'adherent';
- $sql.= " WHERE datefin = '".$this->db->idate($datetosearchfor)."'";
+ $sql.= " WHERE entity = ".$conf->entity; // Do not use getEntity('adherent').")" here, we want the batch to be on its entity only;
+ $sql.= " AND datefin = '".$this->db->idate($datetosearchfor)."'";
$resql = $this->db->query($sql);
if ($resql)
@@ -2789,6 +2793,7 @@ class Adherent extends CommonObject
if (empty($adherent->email))
{
$nbko++;
+ $listofmembersko[$adherent->id]=$adherent->id;
}
else
{
@@ -2830,12 +2835,16 @@ class Adherent extends CommonObject
{
$error++;
$this->error = $cmail->error;
- $this->errors += $cmail->errors;
+ if (! is_null($cmail->errors)) {
+ $this->errors += $cmail->errors;
+ }
$nbko++;
+ $listofmembersko[$adherent->id]=$adherent->id;
}
else
{
$nbok++;
+ $listofmembersok[$adherent->id]=$adherent->id;
$message = $msg;
$sendto = $to;
@@ -2894,7 +2903,10 @@ class Adherent extends CommonObject
else
{
$blockingerrormsg="Can't find email template, defined into member module setup, to use for reminding";
+
$nbko++;
+ $listofmembersko[$adherent->id]=$adherent->id;
+
break;
}
}
@@ -2918,7 +2930,39 @@ class Adherent extends CommonObject
{
$this->output = 'Found '.($nbok + $nbko).' members to send reminder to.';
$this->output.= ' Send email successfuly to '.$nbok.' members';
- if ($nbko) $this->output.= ' - Canceled for '.$nbko.' member (no email or email sending error)';
+ if (is_array($listofmembersok)) {
+ $listofids = ''; $i = 0;
+ foreach($listofmembersok as $idmember) {
+ if ($i > 100) {
+ $listofids .= ', ...';
+ break;
+ }
+ if (empty($listofids)) $listofids .= ' [';
+ else $listofids .= ', ';
+ $listofids .= $idmember;
+ $i++;
+ }
+ if ($listofids) $listofids .= ']';
+ $this->output .= $listofids;
+ }
+ if ($nbko) {
+ $this->output.= ' - Canceled for '.$nbko.' member (no email or email sending error)';
+ if (is_array($listofmembersko)) {
+ $listofids = ''; $i = 0;
+ foreach($listofmembersko as $idmember) {
+ if ($i > 100) {
+ $listofids .= ', ...';
+ break;
+ }
+ if (empty($listofids)) $listofids .= ' [';
+ else $listofids .= ', ';
+ $listofids .= $idmember;
+ $i++;
+ }
+ if ($listofids) $listofids .= ']';
+ $this->output .= $listofids;
+ }
+ }
}
return 0;
diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php
index 49217b55963..b9a787cc67c 100644
--- a/htdocs/admin/emailcollector_card.php
+++ b/htdocs/admin/emailcollector_card.php
@@ -349,7 +349,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
// Call Hook formConfirm
- $parameters = array('lineid' => $lineid);
+ $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid);
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if (empty($reshook)) $formconfirm .= $hookmanager->resPrint;
elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint;
diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php
index 2e03eed937c..474c6020610 100644
--- a/htdocs/admin/mails.php
+++ b/htdocs/admin/mails.php
@@ -758,13 +758,31 @@ else
$text = '';
if ($conf->global->MAIN_MAIL_SENDMODE == 'mail')
{
- $text .= $langs->trans("WarningPHPMail");
+ $text .= $langs->trans("WarningPHPMail"); // To encourage to use SMTPS
}
- //$conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS='1.2.3.4';
- if (!empty($conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS))
+
+ if ($conf->global->MAIN_MAIL_SENDMODE == 'mail')
{
- $text .= ($text ? ' ' : '').$langs->trans("WarningPHPMail2", $conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS);
+ // MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS is list of IPs where email is sent from. Example: '1.2.3.4, [aaaa:bbbb:cccc:dddd]'.
+ if (!empty($conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS))
+ {
+ // List of IP show as record to add in SPF if we use the mail method
+ $text .= ($text ? '
' : '').$langs->trans("WarningPHPMailSPF", $conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS);
+ }
+ } else {
+ if (!empty($conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS))
+ {
+ // List of IP show as record to add as allowed IP if we use the smtp method
+ $text .= ($text ? '
' : '').$langs->trans("WarningPHPMail2", $conf->global->MAIN_EXTERNAL_SMTP_CLIENT_IP_ADDRESS);
+ }
+ if (!empty($conf->global->MAIN_EXTERNAL_SMTP_SPF_STRING_TO_ADD))
+ {
+ // List of string to add in SPF if we use the smtp method
+ $text .= ($text ? '