Merge branch '14.0' into 14p23

This commit is contained in:
Alexandre SPANGARO 2021-10-27 09:36:22 +02:00
commit 9bfd5c4f41
18 changed files with 149 additions and 60 deletions

View File

@ -168,6 +168,18 @@ In htdocs/includes/tecnickcom/tcpdf/tcpdf.php
- protected $default_monospaced_font = 'courier';
+ protected $default_monospaced_font = 'freemono';
* In tecnickcom/tcpdf/include/tcpdf_static, in function intToRoman, right at the beginning
of the function, replace:
$roman = '';
with:
$roman = '';
if ($number >= 4000) {
// do not represent numbers above 4000 in Roman numerals
return strval($number);
}

View File

@ -2831,6 +2831,16 @@ if (empty($reshook)) {
* View
*/
if (empty($object->id)) {
llxHeader();
$head = facture_prepare_head($object);
$langs->load('errors');
echo dol_get_fiche_head($head, 'compta', $langs->trans("InvoiceCustomer"), -1, 'bill'),
'<div class="error">' . $langs->trans("ErrorRecordNotFound") . '</div>';
llxFooter();
exit;
}
$form = new Form($db);
$formother = new FormOther($db);
$formfile = new FormFile($db);

View File

@ -100,6 +100,16 @@ if ($action == 'addcontact' && $user->rights->facture->creer) {
* View
*/
if (empty($object->id)) {
llxHeader();
$head = facture_prepare_head($object);
$langs->load('errors');
echo dol_get_fiche_head($head, 'contact', $langs->trans("InvoiceCustomer"), -1, 'bill'),
'<div class="error">' . $langs->trans("ErrorRecordNotFound") . '</div>';
llxFooter();
exit;
}
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('ContactsAddresses');
$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
llxHeader('', $title, $helpurl);

View File

@ -92,6 +92,16 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
* View
*/
if (empty($object->id)) {
llxHeader();
$head = facture_prepare_head($object);
$langs->load('errors');
echo dol_get_fiche_head($head, 'documents', $langs->trans("InvoiceCustomer"), -1, 'bill'),
'<div class="error">' . $langs->trans("ErrorRecordNotFound") . '</div>';
llxFooter();
exit;
}
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Documents');
$help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";

View File

@ -62,6 +62,16 @@ $result = restrictedArea($user, 'facture', $object->id, '', '', 'fk_soc', $field
* View
*/
if (empty($object->id)) {
llxHeader();
$head = facture_prepare_head($object);
$langs->load('errors');
echo dol_get_fiche_head($head, 'info', $langs->trans("InvoiceCustomer"), -1, 'bill'),
'<div class="error">' . $langs->trans("ErrorRecordNotFound") . '</div>';
llxFooter();
exit;
}
$form = new Form($db);
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Info');

View File

@ -69,6 +69,16 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
* View
*/
if (empty($object->id)) {
llxHeader();
$head = facture_prepare_head($object);
$langs->load('errors');
echo dol_get_fiche_head($head, 'note', $langs->trans("InvoiceCustomer"), -1, 'bill'),
'<div class="error">' . $langs->trans("ErrorRecordNotFound") . '</div>';
llxFooter();
exit;
}
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Notes');
$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
llxHeader('', $title, $helpurl);

View File

@ -801,7 +801,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
print '<tr>';
print '<td class="noemail"><label for="no_email">'.$langs->trans("No_Email").'</label></td>';
print '<td>'.$form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS), 1, false, ($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2)).'</td>';
print '<td>';
print $form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS), 1, false, ($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2));
print '</td>';
print '</tr>';
}
@ -1087,8 +1089,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
print '<tr>';
print '<td class="noemail"><label for="no_email">'.$langs->trans("No_Email").'</label></td>';
print '<td>';
$useempty = (isset($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && ($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2));
print '<td>'.$form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : $object->no_email), 1, false, $useempty).'</td>';
print $form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'int') : $object->no_email), 1, false, $useempty);
print '</td>';
print '</tr>';
}
@ -1319,7 +1323,13 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
print '<tr><td>'.$langs->trans("No_Email").'</td><td>'.yn($object->no_email).'</td></tr>';
print '<tr><td>'.$langs->trans("No_Email").'</td><td>';
if ($object->email) {
print yn($object->no_email);
} else {
print '<span class="opacitymedium">'.$langs->trans("EMailNotDefined").'</span>';
}
print '</td></tr>';
}
print '<tr><td>'.$langs->trans("ContactVisibility").'</td><td>';

View File

@ -203,6 +203,12 @@ if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) {
$arrayfields['s.nom'] = array('label'=>"ThirdParty", 'position'=>25, 'checked'=>1);
}
$arrayfields['unsubscribed'] = array(
'label'=>'No_Email',
'checked'=>0,
'enabled'=>(!empty($conf->mailing->enabled)),
'position'=>41);
if (!empty($conf->socialnetworks->enabled)) {
foreach ($socialnetworks as $key => $value) {
if ($value['active']) {
@ -353,7 +359,7 @@ if ($resql) {
}
$sql = "SELECT s.rowid as socid, s.nom as name,";
$sql .= " p.rowid, p.lastname as lastname, p.statut, p.firstname, p.zip, p.town, p.poste, p.email, p.no_email,";
$sql .= " p.rowid, p.lastname as lastname, p.statut, p.firstname, p.zip, p.town, p.poste, p.email,";
$sql .= " p.socialnetworks, p.photo,";
$sql .= " p.phone as phone_pro, p.phone_mobile, p.phone_perso, p.fax, p.fk_pays, p.priv, p.datec as date_creation, p.tms as date_update,";
$sql .= " st.libelle as stcomm, st.picto as stcomm_picto, p.fk_stcommcontact as stcomm_id, p.fk_prospectcontactlevel,";
@ -364,6 +370,9 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) {
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
}
}
if (!empty($conf->mailing->enabled)) {
$sql .= ", (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = p.email) as unsubscribed";
}
// Add fields from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
@ -494,8 +503,11 @@ if (strlen($search_town)) {
if (count($search_roles) > 0) {
$sql .= " AND p.rowid IN (SELECT sc.fk_socpeople FROM ".MAIN_DB_PREFIX."societe_contacts as sc WHERE sc.fk_c_type_contact IN (".$db->sanitize(implode(',', $search_roles))."))";
}
if ($search_no_email != '' && $search_no_email >= 0) {
$sql .= " AND p.no_email = ".((int) $search_no_email);
if ($search_no_email != -1 && $search_no_email > 0) {
$sql .= " AND (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = p.email) > 0";
}
if ($search_no_email != -1 && $search_no_email == 0) {
$sql .= " AND (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = p.email) = 0 AND p.email IS NOT NULL AND p.email <> ''";
}
if ($search_status != '' && $search_status >= 0) {
$sql .= " AND p.statut = ".((int) $search_status);
@ -830,7 +842,7 @@ if (!empty($arrayfields['p.email']['checked'])) {
print '<input class="flat" type="text" name="search_email" size="6" value="'.dol_escape_htmltag($search_email).'">';
print '</td>';
}
if (!empty($arrayfields['p.no_email']['checked'])) {
if (!empty($arrayfields['unsubscribed']['checked'])) {
print '<td class="liste_titre center">';
print $form->selectarray('search_no_email', array('-1'=>'', '0'=>$langs->trans('No'), '1'=>$langs->trans('Yes')), $search_no_email);
print '</td>';
@ -949,8 +961,8 @@ if (!empty($arrayfields['p.fax']['checked'])) {
if (!empty($arrayfields['p.email']['checked'])) {
print_liste_field_titre($arrayfields['p.email']['label'], $_SERVER["PHP_SELF"], "p.email", $begin, $param, '', $sortfield, $sortorder);
}
if (!empty($arrayfields['p.no_email']['checked'])) {
print_liste_field_titre($arrayfields['p.no_email']['label'], $_SERVER["PHP_SELF"], "p.no_email", $begin, $param, '', $sortfield, $sortorder, 'center ');
if (!empty($arrayfields['unsubscribed']['checked'])) {
print_liste_field_titre($arrayfields['unsubscribed']['label'], $_SERVER["PHP_SELF"], "unsubscribed", $begin, $param, '', $sortfield, $sortorder, 'center ');
}
if (!empty($conf->socialnetworks->enabled)) {
foreach ($socialnetworks as $key => $value) {
@ -1131,8 +1143,14 @@ while ($i < min($num, $limit)) {
}
}
// No EMail
if (!empty($arrayfields['p.no_email']['checked'])) {
print '<td class="center">'.yn($obj->no_email).'</td>';
if (!empty($arrayfields['unsubscribed']['checked'])) {
print '<td class="center">';
if (empty($obj->email)) {
//print '<span class="opacitymedium">'.$langs->trans("NoEmail").'</span>';
} else {
print yn(($obj->unsubscribed > 0) ? 1 : 0);
}
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}

View File

@ -689,9 +689,9 @@ class FormMail extends Form
$out .= '<tr><td class="minwidth200">';
$out .= $langs->trans("GroupEmails");
$out .= '</td><td>';
$out .= ' <input type="checkbox" name="oneemailperrecipient"'.($this->withoptiononeemailperrecipient > 0 ? ' checked="checked"' : '').'> ';
$out .= $langs->trans("OneEmailPerRecipient");
$out .= '<span class="hideonsmartphone">';
$out .= ' <input type="checkbox" id="oneemailperrecipient" name="oneemailperrecipient"'.($this->withoptiononeemailperrecipient > 0 ? ' checked="checked"' : '').'> ';
$out .= '<label for="oneemailperrecipient">'.$langs->trans("OneEmailPerRecipient").'</label>';
$out .= '<span class="hideonsmartphone opacitymedium">';
$out .= ' - ';
$out .= $langs->trans("WarningIfYouCheckOneRecipientPerEmail");
$out .= '</span>';
@ -771,12 +771,11 @@ class FormMail extends Form
if (!empty($this->withmaindocfile)) {
if ($this->withmaindocfile == 1) {
$out .= '<input type="checkbox" name="addmaindocfile" value="1" />';
$out .= '<input type="checkbox" id="addmaindocfile" name="addmaindocfile" value="1" />';
} elseif ($this->withmaindocfile == -1) {
$out .= '<input type="checkbox" id="addmaindocfile" name="addmaindocfile" value="1" checked="checked" />';
}
if ($this->withmaindocfile == -1) {
$out .= '<input type="checkbox" name="addmaindocfile" value="1" checked="checked" />';
}
$out .= ' '.$langs->trans("JoinMainDoc").'.<br>';
$out .= ' <label for="addmaindocfile">'.$langs->trans("JoinMainDoc").'.</label><br>';
}
if (is_numeric($this->withfile)) {

View File

@ -79,8 +79,8 @@ class mailing_contacts1 extends MailingTargets
$statssql[0] .= " count(distinct(c.email)) as nb";
$statssql[0] .= " FROM ".MAIN_DB_PREFIX."socpeople as c";
$statssql[0] .= " WHERE c.entity IN (".getEntity('socpeople').")";
$statssql[0] .= " AND c.email != ''"; // Note that null != '' is false
$statssql[0] .= " AND c.no_email = 0";
$statssql[0] .= " AND c.email <> ''"; // Note that null != '' is false
$statssql[0] .= " AND (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = c.email) = 0";
$statssql[0] .= " AND c.statut = 1";
return $statssql;
@ -103,8 +103,7 @@ class mailing_contacts1 extends MailingTargets
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as c";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = c.fk_soc";
$sql .= " WHERE c.entity IN (".getEntity('socpeople').")";
$sql .= " AND c.email != ''"; // Note that null != '' is false
$sql .= " AND c.no_email = 0";
$sql .= " AND c.email <> ''"; // Note that null != '' is false
$sql .= " AND (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = c.email) = 0";
// exclude unsubscribed users
$sql .= " AND c.statut = 1";
@ -132,10 +131,9 @@ class mailing_contacts1 extends MailingTargets
$sql = "SELECT sp.poste, count(distinct(sp.email)) AS nb";
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as sp";
$sql .= " WHERE sp.entity IN (".getEntity('socpeople').")";
/*$sql.= " AND sp.email != ''"; // Note that null != '' is false
$sql.= " AND sp.no_email = 0";
$sql.= " AND sp.statut = 1";*/
$sql .= " AND (sp.poste IS NOT NULL AND sp.poste != '')";
$sql .= " AND sp.email <> ''"; // Note that null != '' is false
$sql .= " AND sp.statut = 1";
$sql .= " AND (sp.poste IS NOT NULL AND sp.poste <> '')";
$sql .= " GROUP BY sp.poste";
$sql .= " ORDER BY sp.poste";
$resql = $this->db->query($sql);
@ -169,10 +167,9 @@ class mailing_contacts1 extends MailingTargets
$sql .= " ".MAIN_DB_PREFIX."socpeople as sp,";
$sql .= " ".MAIN_DB_PREFIX."categorie as c,";
$sql .= " ".MAIN_DB_PREFIX."categorie_contact as cs";
$sql .= " WHERE sp.statut = 1"; // Note that null != '' is false
//$sql.= " AND sp.no_email = 0";
//$sql.= " AND sp.email != ''";
//$sql.= " AND sp.entity IN (".getEntity('socpeople').")";
$sql .= " WHERE sp.entity IN (".getEntity('socpeople').")";
$sql .= " AND sp.email <> ''"; // Note that null != '' is false
$sql .= " AND sp.statut = 1";
$sql .= " AND cs.fk_categorie = c.rowid";
$sql .= " AND cs.fk_socpeople = sp.rowid";
$sql .= " GROUP BY c.label";
@ -244,10 +241,9 @@ class mailing_contacts1 extends MailingTargets
$sql .= " ".MAIN_DB_PREFIX."socpeople as sp,";
$sql .= " ".MAIN_DB_PREFIX."categorie as c,";
$sql .= " ".MAIN_DB_PREFIX."categorie_societe as cs";
$sql .= " WHERE sp.statut = 1"; // Note that null != '' is false
//$sql.= " AND sp.no_email = 0";
//$sql.= " AND sp.email != ''";
//$sql.= " AND sp.entity IN (".getEntity('socpeople').")";
$sql .= " WHERE sp.entity IN (".getEntity('socpeople').")";
$sql .= " AND sp.email <> ''"; // Note that null != '' is false
$sql .= " AND sp.statut = 1";
$sql .= " AND cs.fk_categorie = c.rowid";
$sql .= " AND cs.fk_soc = sp.fk_soc";
$sql .= " GROUP BY c.label";
@ -282,10 +278,9 @@ class mailing_contacts1 extends MailingTargets
$sql .= " ".MAIN_DB_PREFIX."socpeople as sp,";
$sql .= " ".MAIN_DB_PREFIX."categorie as c,";
$sql .= " ".MAIN_DB_PREFIX."categorie_fournisseur as cs";
$sql .= " WHERE sp.statut = 1"; // Note that null != '' is false
//$sql.= " AND sp.no_email = 0";
//$sql.= " AND sp.email != ''";
//$sql.= " AND sp.entity IN (".getEntity('socpeople').")";
$sql .= " WHERE sp.entity IN (".getEntity('socpeople').")";
$sql .= " AND sp.email <> ''"; // Note that null != '' is false
$sql .= " AND sp.statut = 1";
$sql .= " AND cs.fk_categorie = c.rowid";
$sql .= " AND cs.fk_soc = sp.fk_soc";
$sql .= " GROUP BY c.label";
@ -391,7 +386,6 @@ class mailing_contacts1 extends MailingTargets
}
$sql .= " WHERE sp.entity IN (".getEntity('socpeople').")";
$sql .= " AND sp.email <> ''";
$sql .= " AND sp.no_email = 0";
$sql .= " AND (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = sp.email) = 0";
// Exclude unsubscribed email adresses
$sql .= " AND sp.statut = 1";

View File

@ -208,7 +208,7 @@ class MailingTargets // This can't be abstract as it is used for some method
//Update the status to show thirdparty mail that don't want to be contacted anymore'
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
$sql .= " SET statut=3";
$sql .= " WHERE fk_mailing=".$mailing_id." AND email in (SELECT email FROM ".MAIN_DB_PREFIX."societe where fk_stcomm=-1)";
$sql .= " WHERE fk_mailing=".((int) $mailing_id)." AND email in (SELECT email FROM ".MAIN_DB_PREFIX."societe where fk_stcomm=-1)";
$sql .= " AND source_type='thirdparty'";
dol_syslog(__METHOD__.": mailing update status to display thirdparty mail that do not want to be contacted");
$result=$this->db->query($sql);
@ -216,7 +216,7 @@ class MailingTargets // This can't be abstract as it is used for some method
//Update the status to show contact mail that don't want to be contacted anymore'
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
$sql .= " SET statut=3";
$sql .= " WHERE fk_mailing=".$mailing_id." AND source_type='contact' AND (email in (SELECT sc.email FROM ".MAIN_DB_PREFIX."socpeople AS sc ";
$sql .= " WHERE fk_mailing=".((int) $mailing_id)." AND source_type='contact' AND (email in (SELECT sc.email FROM ".MAIN_DB_PREFIX."socpeople AS sc ";
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe s ON s.rowid=sc.fk_soc WHERE s.fk_stcomm=-1 OR no_email=1))";
dol_syslog(__METHOD__.": mailing update status to display contact mail that do not want to be contacted",LOG_DEBUG);
$result=$this->db->query($sql);
@ -224,7 +224,7 @@ class MailingTargets // This can't be abstract as it is used for some method
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
$sql .= " SET statut=3";
$sql .= " WHERE fk_mailing=".$mailing_id." AND email IN (SELECT mu.email FROM ".MAIN_DB_PREFIX."mailing_unsubscribe AS mu WHERE mu.entity IN ('".getEntity('mailing')."'))";
$sql .= " WHERE fk_mailing=".((int) $mailing_id)." AND email IN (SELECT mu.email FROM ".MAIN_DB_PREFIX."mailing_unsubscribe AS mu WHERE mu.entity IN ('".getEntity('mailing')."'))";
dol_syslog(__METHOD__.":mailing update status to display emails that do not want to be contacted anymore", LOG_DEBUG);
$result = $this->db->query($sql);

View File

@ -286,7 +286,7 @@ class modAdherent extends DolibarrModules
$this->export_label[$r] = 'MembersAndSubscriptions';
$this->export_permission[$r] = array(array("adherent", "export"));
$this->export_fields_array[$r] = array(
'a.rowid'=>'Id', 'a.civility'=>"UserTitle", 'a.lastname'=>"Lastname", 'a.firstname'=>"Firstname", 'a.login'=>"Login", 'a.gender'=>"Gender", 'a.morphy'=>'Nature',
'a.rowid'=>'Id', 'a.civility'=>"UserTitle", 'a.lastname'=>"Lastname", 'a.firstname'=>"Firstname", 'a.login'=>"Login", 'a.gender'=>"Gender", 'a.morphy'=>'MemberNature',
'a.societe'=>'Company', 'a.address'=>"Address", 'a.zip'=>"Zip", 'a.town'=>"Town", 'd.nom'=>"State", 'co.code'=>"CountryCode", 'co.label'=>"Country",
'a.phone'=>"PhonePro", 'a.phone_perso'=>"PhonePerso", 'a.phone_mobile'=>"PhoneMobile", 'a.email'=>"Email", 'a.birth'=>"Birthday", 'a.statut'=>"Status",
'a.photo'=>"Photo", 'a.note_public'=>"NotePublic", 'a.note_private'=>"NotePrivate", 'a.datec'=>'DateCreation', 'a.datevalid'=>'DateValidation',
@ -339,7 +339,7 @@ class modAdherent extends DolibarrModules
$this->import_tables_creator_array[$r] = array('a'=>'fk_user_author'); // Fields to store import user id
$this->import_fields_array[$r] = array(
'a.civility'=>"UserTitle", 'a.lastname'=>"Lastname*", 'a.firstname'=>"Firstname", 'a.gender'=>"Gender", 'a.login'=>"Login*", "a.pass"=>"Password",
"a.fk_adherent_type"=>"MemberType*", 'a.morphy'=>'Nature*', 'a.societe'=>'Company', 'a.address'=>"Address", 'a.zip'=>"Zip", 'a.town'=>"Town",
"a.fk_adherent_type"=>"MemberType*", 'a.morphy'=>'MemberNature*', 'a.societe'=>'Company', 'a.address'=>"Address", 'a.zip'=>"Zip", 'a.town'=>"Town",
'a.state_id'=>'StateId', 'a.country'=>"CountryId", 'a.phone'=>"PhonePro", 'a.phone_perso'=>"PhonePerso", 'a.phone_mobile'=>"PhoneMobile",
'a.email'=>"Email", 'a.birth'=>"Birthday", 'a.statut'=>"Status*", 'a.photo'=>"Photo", 'a.note_public'=>"NotePublic", 'a.note_private'=>"NotePrivate",
'a.datec'=>'DateCreation', 'a.datefin'=>'DateEndSubscription'

View File

@ -151,7 +151,7 @@ if ($massaction == 'presend') {
// $formmail->withfile = 2; Not yet supported in mass action
$formmail->withmaindocfile = 1; // Add a checkbox "Attach also main document"
if ($objecttmp->element != 'societe') {
$formmail->withfile = '<span class="hideonsmartphone">'.$langs->trans("OnlyPDFattachmentSupported").'</span>';
$formmail->withfile = '<span class="hideonsmartphone opacitymedium">'.$langs->trans("OnlyPDFattachmentSupported").'</span>';
$formmail->withmaindocfile = - 1; // Add a checkbox "Attach also main document" but not checked by default
}
$formmail->withbody = 1;

View File

@ -706,12 +706,12 @@ if ($step == 3 && $datatoimport) {
print $out;
print '</div>';
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '<table class="noborder centpercent" width="100%" cellpadding="4">';
// Search available imports
$filearray = dol_dir_list($conf->import->dir_temp, 'files', 0, '', '', 'name', SORT_DESC);
if (count($filearray) > 0) {
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '<table class="noborder centpercent" width="100%" cellpadding="4">';
$dir = $conf->import->dir_temp;
// Search available files to import
@ -752,10 +752,10 @@ if ($step == 3 && $datatoimport) {
print '</td>';
print '</tr>';
}
}
print '</table>';
print '</div>';
print '</table>';
print '</div>';
}
print '</form>';
}

View File

@ -1440,6 +1440,10 @@ class TCPDF_STATIC {
*/
public static function intToRoman($number) {
$roman = '';
if ($number >= 4000) {
// do not represent numbers above 4000 in Roman numerals
return strval($number);
}
while ($number >= 1000) {
$roman .= 'M';
$number -= 1000;

View File

@ -60,6 +60,7 @@ EMailTestSubstitutionReplacedByGenericValues=When using test mode, substitutions
MailingAddFile=Attach this file
NoAttachedFiles=No attached files
BadEMail=Bad value for Email
EMailNotDefined=Email not defined
ConfirmCloneEMailing=Are you sure you want to clone this emailing?
CloneContent=Clone message
CloneReceivers=Cloner recipients

View File

@ -1836,11 +1836,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
print '<tr><td>'.$langs->trans("CountryOrigin").'</td>';
print '<td>';
print img_picto('', 'globe-americas', 'class="paddingrightonly"');
print $form->select_country($object->country_id, 'country_id', '', 0, 'minwidth100 maxwidthonsmartphone');
print $form->select_country(GETPOSTISSET('country_id') ? GETPOST('country_id', 'int') : $object->country_id, 'country_id', '', 0, 'minwidth100 maxwidthonsmartphone');
if ($user->admin) {
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
}
print '</td></tr>';
// State
if (empty($conf->global->PRODUCT_DISABLE_STATE)) {
print '<tr>';
@ -1851,7 +1852,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
print img_picto('', 'state', 'class="pictofixedwidth"');
print $formcompany->select_state($object->state_id, $object->country_code);
print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOST('state_id', 'int') : $object->state_id, $object->country_code);
print '</td>';
print '</tr>';
}

View File

@ -1001,12 +1001,12 @@ print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" :
// Fields title search
print '<tr class="liste_titre_filter">';
if (!empty($arrayfields['s.rowid']['checked'])) {
print '<td class="liste_titre">';
print '<td class="liste_titre" data-key="id">';
print '<input class="flat searchstring" type="text" name="search_id" size="1" value="'.dol_escape_htmltag($search_id).'">';
print '</td>';
}
if (!empty($arrayfields['s.nom']['checked'])) {
print '<td class="liste_titre">';
print '<td class="liste_titre" data-key="ref">';
if (!empty($search_nom_only) && empty($search_nom)) {
$search_nom = $search_nom_only;
}
@ -1237,10 +1237,10 @@ print '</td>';
print "</tr>\n";
print '<tr class="liste_titre">';
if (!empty($arrayfields['s.rowid']['checked'])) {
print_liste_field_titre($arrayfields['s.rowid']['label'], $_SERVER["PHP_SELF"], "s.rowid", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre($arrayfields['s.rowid']['label'], $_SERVER["PHP_SELF"], "s.rowid", "", $param, ' data-key="id"', $sortfield, $sortorder);
}
if (!empty($arrayfields['s.nom']['checked'])) {
print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, ' data-key="ref"', $sortfield, $sortorder);
}
if (!empty($arrayfields['s.name_alias']['checked'])) {
print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER["PHP_SELF"], "s.name_alias", "", $param, "", $sortfield, $sortorder);
@ -1387,7 +1387,7 @@ while ($i < min($num, $limit)) {
}
print '>';
if (!empty($arrayfields['s.rowid']['checked'])) {
print '<td class="tdoverflowmax50">';
print '<td class="tdoverflowmax50" data-key="id">';
print $obj->rowid;
print "</td>\n";
if (!$i) {
@ -1399,7 +1399,7 @@ while ($i < min($num, $limit)) {
if (!empty($arrayfields['s.name_alias']['checked'])) {
$companystatic->name_alias = '';
}
print '<td'.(empty($conf->global->MAIN_SOCIETE_SHOW_COMPLETE_NAME) ? ' class="tdoverflowmax200"' : '').'>';
print '<td'.(empty($conf->global->MAIN_SOCIETE_SHOW_COMPLETE_NAME) ? ' class="tdoverflowmax200"' : '').' data-key="ref">';
if ($contextpage == 'poslist') {
print $obj->name;
} else {