Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0

This commit is contained in:
Laurent Destailleur 2022-12-26 17:07:54 +01:00
commit 088e70a9db
4 changed files with 16 additions and 14 deletions

View File

@ -109,8 +109,9 @@ if ($user->rights->adherent->cotisation->creer && $action == 'update' && !$cance
$object->dateh = dol_mktime(GETPOST('datesubhour', 'int'), GETPOST('datesubmin', 'int'), 0, GETPOST('datesubmonth', 'int'), GETPOST('datesubday', 'int'), GETPOST('datesubyear', 'int')); $object->dateh = dol_mktime(GETPOST('datesubhour', 'int'), GETPOST('datesubmin', 'int'), 0, GETPOST('datesubmonth', 'int'), GETPOST('datesubday', 'int'), GETPOST('datesubyear', 'int'));
$object->datef = dol_mktime(GETPOST('datesubendhour', 'int'), GETPOST('datesubendmin', 'int'), 0, GETPOST('datesubendmonth', 'int'), GETPOST('datesubendday', 'int'), GETPOST('datesubendyear', 'int')); $object->datef = dol_mktime(GETPOST('datesubendhour', 'int'), GETPOST('datesubendmin', 'int'), 0, GETPOST('datesubendmonth', 'int'), GETPOST('datesubendday', 'int'), GETPOST('datesubendyear', 'int'));
$object->fk_type = $typeid; $object->fk_type = $typeid;
$object->note = $note; $object->note_public = $note;
$object->note_private = $note; $object->note_private = $note;
$object->amount = $amount; $object->amount = $amount;
$result = $object->update($user); $result = $object->update($user);

View File

@ -179,14 +179,16 @@ if (!empty($conf->global->BARCODE_PRODUCT_ADDON_NUM)) {
if (preg_match('/^mod_barcode_product_.*php$/', $file)) { if (preg_match('/^mod_barcode_product_.*php$/', $file)) {
$file = substr($file, 0, dol_strlen($file) - 4); $file = substr($file, 0, dol_strlen($file) - 4);
try { if ($file == $conf->global->BARCODE_PRODUCT_ADDON_NUM) {
dol_include_once($dirroot.$file.'.php'); try {
} catch (Exception $e) { dol_include_once($dirroot.$file.'.php');
dol_syslog($e->getMessage(), LOG_ERR); } catch (Exception $e) {
} dol_syslog($e->getMessage(), LOG_ERR);
}
$modBarCodeProduct = new $file(); $modBarCodeProduct = new $file();
break; break;
}
} }
} }
closedir($handle); closedir($handle);

View File

@ -409,7 +409,7 @@ class mailing_contacts1 extends MailingTargets
} }
// Filter on language // Filter on language
if ($filter_lang != '') { if (!empty($filter_lang)) {
$sql .= " AND sp.default_lang LIKE '".$this->db->escape($filter_lang)."%'"; $sql .= " AND sp.default_lang LIKE '".$this->db->escape($filter_lang)."%'";
} }
@ -418,7 +418,7 @@ class mailing_contacts1 extends MailingTargets
//print "xx".$key; //print "xx".$key;
if ($key == 'prospects') { if ($key == 'prospects') {
$sql .= " AND s.client=2"; $sql .= " AND s.client = 2";
} }
foreach ($prospectlevel as $codelevel => $valuelevel) { foreach ($prospectlevel as $codelevel => $valuelevel) {
if ($key == 'prospectslevel'.$codelevel) { if ($key == 'prospectslevel'.$codelevel) {
@ -426,10 +426,10 @@ class mailing_contacts1 extends MailingTargets
} }
} }
if ($key == 'customers') { if ($key == 'customers') {
$sql .= " AND s.client=1"; $sql .= " AND s.client = 1";
} }
if ($key == 'suppliers') { if ($key == 'suppliers') {
$sql .= " AND s.fournisseur=1"; $sql .= " AND s.fournisseur = 1";
} }
// Filter on job position // Filter on job position
@ -440,7 +440,6 @@ class mailing_contacts1 extends MailingTargets
$sql .= " ORDER BY sp.email"; $sql .= " ORDER BY sp.email";
// print "wwwwwwx".$sql; // print "wwwwwwx".$sql;
// Stocke destinataires dans cibles // Stocke destinataires dans cibles
$result = $this->db->query($sql); $result = $this->db->query($sql);
if ($result) { if ($result) {

View File

@ -74,7 +74,7 @@ if ($action == 'presend') {
$outputlangs = new Translate('', $conf); $outputlangs = new Translate('', $conf);
$outputlangs->setDefaultLang($newlang); $outputlangs->setDefaultLang($newlang);
// Load traductions files required by page // Load traductions files required by page
$outputlangs->loadLangs(array('commercial', 'bills', 'orders', 'contracts', 'members', 'propal', 'products', 'supplier_proposal', 'interventions', 'receptions')); $outputlangs->loadLangs(array('commercial', 'bills', 'orders', 'contracts', 'members', 'propal', 'products', 'supplier_proposal', 'interventions', 'receptions', 'sendings'));
} }
$topicmail = ''; $topicmail = '';