';
+ // TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript
+ $out .= ''."\n";
+ $out .= ''."\n";
+
+ if (count($listofpaths)) {
+ foreach ($listofpaths as $key => $val) {
+ $out .= '
';
+ }
+
$out .= "\n";
$out .= "\n";
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 869ad6da96a..ea16737792f 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -10660,7 +10660,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
}
$class = 'btnTitle';
- if (in_array($iconClass, array('fa fa-plus-circle', 'fa fa-plus-circle size15x', 'fa fa-comment-dots'))) {
+ if (in_array($iconClass, array('fa fa-plus-circle', 'fa fa-plus-circle size15x', 'fa fa-comment-dots', 'fa fa-paper-plane'))) {
$class .= ' btnTitlePlus';
}
$useclassfortooltip = 1;
diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php
index 79cc5980c16..9223c1c4dd8 100644
--- a/htdocs/core/lib/ticket.lib.php
+++ b/htdocs/core/lib/ticket.lib.php
@@ -86,7 +86,7 @@ function ticket_prepare_head($object)
$h = 0;
$head = array();
- $head[$h][0] = DOL_URL_ROOT.'/ticket/card.php?action=view&track_id='.$object->track_id;
+ $head[$h][0] = DOL_URL_ROOT.'/ticket/card.php?track_id='.$object->track_id;
$head[$h][1] = $langs->trans("Ticket");
$head[$h][2] = 'tabTicket';
$h++;
@@ -664,6 +664,7 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no
$actualCycleDate = false;
+ // Loop on each event to show it
foreach ($histo as $key => $value) {
$actionstatic->fetch($histo[$key]['id']); // TODO Do we need this, we already have a lot of data of line into $histo
@@ -702,14 +703,9 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no
$out .= $actionstatic->getNomUrl(1, -1, 'valignmiddle').' ';
}
- //if ($user->rights->agenda->allactions->read || $actionstatic->authorid == $user->id)
- //{
- // $out.=''.$langs->trans('Show').'';
- //}
-
if (!empty($user->rights->agenda->allactions->create) ||
(($actionstatic->authorid == $user->id || $actionstatic->userownerid == $user->id) && !empty($user->rights->agenda->myactions->create))) {
- $out .= '';
+ $out .= '';
}
$out .= '';
@@ -880,7 +876,12 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no
$i++;
}
+
$out .= "\n";
+
+ if (empty($histo)) {
+ $out .= ''.$langs->trans("NoRecordFound").'';
+ }
}
if ($noprint) {
diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php
index b5dc6e71ab8..70729f5c9dc 100644
--- a/htdocs/core/modules/modSociete.class.php
+++ b/htdocs/core/modules/modSociete.class.php
@@ -464,7 +464,7 @@ class modSociete extends DolibarrModules
'extra' => MAIN_DB_PREFIX.'societe_extrafields'
); // List of tables to insert into (insert done in same order)
$this->import_fields_array[$r] = array(//field order as per structure of table llx_societe
- 's.nom' => "Name*",
+ 's.nom' => "ThirdPartyName*",
's.name_alias' => "AliasNameShort",
's.parent' => "ParentCompany",
's.status' => "Status*",
@@ -685,7 +685,7 @@ class modSociete extends DolibarrModules
's.accountancy_code_buy' => '607',
);
$this->import_updatekeys_array[$r] = array(
- 's.nom' => 'Name',
+ 's.nom' => 'ThirdPartyName',
's.zip' => 'Zip',
's.email' => 'Email',
's.code_client' => 'CustomerCode',
@@ -724,7 +724,7 @@ class modSociete extends DolibarrModules
$i++;
}
- // Import list of contacts/additional addresses and attributes
+ // Import list of contacts/addresses of thirparties and attributes
$r++;
$this->import_code[$r] = $this->rights_class.'_'.$r;
$this->import_label[$r] = 'ImportDataset_company_2';
@@ -767,7 +767,7 @@ class modSociete extends DolibarrModules
}
}
// Add extra fields
- $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type != 'separate' AND elementtype = 'socpeople' AND entity IN (0, ".$conf->entity.")";
+ $sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'socpeople' AND entity IN (0, ".$conf->entity.")";
$resql = $this->db->query($sql);
if ($resql) { // This can fail when class is used on an old database (during a migration for example)
while ($obj = $this->db->fetch_object($resql)) {
@@ -794,7 +794,7 @@ class modSociete extends DolibarrModules
'classfile' => '/core/class/cstate.class.php',
'class' => 'Cstate',
'method' => 'fetch',
- 'dict' => 'DictionaryStateCode'
+ 'dict' => 'DictionaryCanton'
),
's.fk_pays' => array(
'rule' => 'fetchidfromcodeid',
diff --git a/htdocs/core/modules/modTicket.class.php b/htdocs/core/modules/modTicket.class.php
index f0de03c311a..f34398abc4b 100644
--- a/htdocs/core/modules/modTicket.class.php
+++ b/htdocs/core/modules/modTicket.class.php
@@ -104,7 +104,7 @@ class modTicket extends DolibarrModules
// List of particular constants to add when module is enabled
// (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive)
// Example:
- $default_signature = $langs->trans('TicketMessageMailSignatureText', getDolGlobalString('MAIN_INFO_SOCIETE_NOM'));
+ $default_footer = $langs->trans('TicketMessageMailFooterText', getDolGlobalString('MAIN_INFO_SOCIETE_NOM'));
$this->const = array(
1 => array('TICKET_ENABLE_PUBLIC_INTERFACE', 'chaine', '0', 'Enable ticket public interface', 0),
2 => array('TICKET_ADDON', 'chaine', 'mod_ticket_simple', 'Ticket ref module', 0),
@@ -116,8 +116,9 @@ class modTicket extends DolibarrModules
8 => array('TICKET_PRODUCT_CATEGORY', 'chaine', 0, 'The category of product that is being used for ticket accounting', 0),
9 => array('TICKET_NOTIFICATION_EMAIL_FROM', 'chaine', getDolGlobalString('MAIN_MAIL_EMAIL_FROM'), 'Email to use by default as sender for messages sent from Dolibarr', 0),
10 => array('TICKET_MESSAGE_MAIL_INTRO', 'chaine', $langs->trans('TicketMessageMailIntroText'), 'Introduction text of ticket replies sent from Dolibarr', 0),
- 11 => array('TICKET_MESSAGE_MAIL_SIGNATURE', 'chaine', $default_signature, 'Signature to use by default for messages sent from Dolibarr', 0),
- 12 => array('MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER', 'chaine', "1", 'Disable the rendering of headers in tickets', 0)
+ 11 => array('TICKET_MESSAGE_MAIL_SIGNATURE', 'chaine', $default_footer, 'Signature to use by default for messages sent from Dolibarr', 0),
+ 12 => array('MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER', 'chaine', "1", 'Disable the rendering of headers in tickets', 0),
+ 13 => array('MAIN_SECURITY_ENABLECAPTCHA_TICKET', 'chaine', getDolGlobalInt('MAIN_SECURITY_ENABLECAPTCHA_TICKET'), 'Enable captcha code by default', 0)
);
diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php
index 2cb10e3d932..98c9803d55c 100644
--- a/htdocs/core/modules/propale/mod_propale_saphir.php
+++ b/htdocs/core/modules/propale/mod_propale_saphir.php
@@ -145,7 +145,7 @@ class mod_propale_saphir extends ModeleNumRefPropales
// Get entities
$entity = getEntity('proposalnumber', 1, $propal);
- $date = $propal->date;
+ $date = empty($propal->date) ? dol_now() : $propal->date;
$numFinal = get_next_value($db, $mask, 'propal', 'ref', '', $objsoc, $date, 'next', false, null, $entity);
diff --git a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php
index 267232a4a6b..119a0122cb6 100644
--- a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php
+++ b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php
@@ -2,6 +2,7 @@
/* Copyright (C) 2010 Regis Houssin
* Copyright (C) 2011-2017 Laurent Destailleur
* Copyright (C) 2014 Marcos García
+ * Copyright (C) 2022 Ferran Marcet
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -445,8 +446,9 @@ class InterfaceWorkflowManager extends DolibarrTriggers
if (is_array($list) && !empty($list)) {
$number_contracts_found = count($list);
if ($number_contracts_found == 1) {
- $contractid = $list[0]->id;
- $object->setContract($contractid);
+ foreach ($list as $linked_contract) {
+ $object->setContract($linked_contract->id);
+ }
break;
} elseif ($number_contracts_found > 1) {
foreach ($list as $linked_contract) {
diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php
index 79013dbb051..1a8834941c9 100644
--- a/htdocs/fourn/commande/dispatch.php
+++ b/htdocs/fourn/commande/dispatch.php
@@ -996,7 +996,7 @@ if ($id > 0 || !empty($ref)) {
if (!isModEnabled("multicurrency") && empty($conf->dynamicprices->enabled)) {
// Price
print '
';
- print '';
+ print '';
print '
';
// Discount
diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php
index 15e1ea41c2b..c5dbf6b0eac 100644
--- a/htdocs/imports/import.php
+++ b/htdocs/imports/import.php
@@ -1110,7 +1110,7 @@ if ($step == 4 && $datatoimport) {
$height = '32px'; //needs px for css height attribute below
$i = 0;
$mandatoryfieldshavesource = true;
- $more = "";
+
//var_dump($fieldstarget);
//var_dump($optionsall);
//exit;
@@ -1176,10 +1176,10 @@ if ($step == 4 && $datatoimport) {
$filecolumntoshow = num2Alpha($i);
} else {
if ($objimport->array_import_convertvalue[0][$tmpcode]['rule'] == 'fetchidfromref') {
- $htmltext .= $langs->trans("DataComeFromIdFoundFromRef", $filecolumn, $langs->transnoentitiesnoconv($entitylang)).' ';
+ $htmltext .= $langs->trans("DataComeFromIdFoundFromRef", $langs->transnoentitiesnoconv($entitylang)).' ';
}
if ($objimport->array_import_convertvalue[0][$tmpcode]['rule'] == 'fetchidfromcodeid') {
- $htmltext .= $langs->trans("DataComeFromIdFoundFromCodeId", $filecolumn, $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$code]['dict'])).' ';
+ $htmltext .= $langs->trans("DataComeFromIdFoundFromCodeId", $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$tmpcode]['dict'])).' ';
}
}
// Source required
@@ -1191,9 +1191,9 @@ if ($step == 4 && $datatoimport) {
}
} else {
if ($objimport->array_import_convertvalue[0][$tmpcode]['rule'] == 'fetchidfromref') {
- $htmltext .= $langs->trans("SourceExample").': '.$langs->transnoentitiesnoconv("ExampleAnyRefFoundIntoElement", $entitylang).($example ? ' ('.$langs->transnoentitiesnoconv("Example").': '.$example.')' : '').' ';
+ $htmltext .= $langs->trans("SourceExample").': '.$langs->transnoentitiesnoconv("ExampleAnyRefFoundIntoElement", $entitylang).($example ? ' ('.$langs->transnoentitiesnoconv("Example").': '.str_replace('"', '', $example).')' : '').' ';
} elseif ($objimport->array_import_convertvalue[0][$tmpcode]['rule'] == 'fetchidfromcodeid') {
- $htmltext .= $langs->trans("SourceExample").': '.$langs->trans("ExampleAnyCodeOrIdFoundIntoDictionary", $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$code]['dict'])).($example ? ' ('.$langs->transnoentitiesnoconv("Example").': '.$example.')' : '').' ';
+ $htmltext .= $langs->trans("SourceExample").': '.$langs->trans("ExampleAnyCodeOrIdFoundIntoDictionary", $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$tmpcode]['dict'])).($example ? ' ('.$langs->transnoentitiesnoconv("Example").': '.str_replace('"', '', $example).')' : '').' ';
} elseif ($example) {
$htmltext .= $langs->trans("SourceExample").': '.str_replace('"', '', $example).' ';
}
@@ -1203,7 +1203,8 @@ if ($step == 4 && $datatoimport) {
$htmltext .= $langs->trans("FormatControlRule").': '.str_replace('"', '', $objimport->array_import_regex[0][$tmpcode]).' ';
}
- $htmltext .= $langs->trans("Table")."->".$langs->trans("Field").': '.$tablename."->".preg_replace('/^.*\./', '', $tmpcode)."";
+ //var_dump($htmltext);
+ $htmltext .= $langs->trans("InformationOnTargetTables").': '.$tablename."->".preg_replace('/^.*\./', '', $tmpcode)."";
$labelhtml = $label.' '.$form->textwithpicto('', $htmltext, 1, 'help', '', 1);
diff --git a/htdocs/install/mysql/migration/16.0.0-17.0.0.sql b/htdocs/install/mysql/migration/16.0.0-17.0.0.sql
index 874dcb66f1b..9f76a4229bc 100644
--- a/htdocs/install/mysql/migration/16.0.0-17.0.0.sql
+++ b/htdocs/install/mysql/migration/16.0.0-17.0.0.sql
@@ -183,3 +183,4 @@ ALTER TABLE llx_socpeople ADD INDEX idx_socpeople_lastname (lastname);
ALTER TABLE llx_societe ADD INDEX idx_societe_nom(nom);
+ALTER TABLE llx_extrafields MODIFY COLUMN fielddefault text;
diff --git a/htdocs/install/mysql/tables/llx_extrafields.sql b/htdocs/install/mysql/tables/llx_extrafields.sql
index 33a317d4abd..37deb0a227a 100644
--- a/htdocs/install/mysql/tables/llx_extrafields.sql
+++ b/htdocs/install/mysql/tables/llx_extrafields.sql
@@ -27,7 +27,7 @@ create table llx_extrafields
type varchar(8),
size varchar(8) DEFAULT NULL,
fieldcomputed text,
- fielddefault varchar(255),
+ fielddefault text,
fieldunique integer DEFAULT 0,
fieldrequired integer DEFAULT 0,
perms varchar(255), -- not used yet
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index d0e32e480d9..2560f248a9b 100644
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -76,7 +76,7 @@ ErrorNoValueForCheckBoxType=Please fill value for checkbox list
ErrorNoValueForRadioType=Please fill value for radio list
ErrorBadFormatValueList=The list value cannot have more than one comma: %s, but need at least one: key,value
ErrorFieldCanNotContainSpecialCharacters=The field %s must not contains special characters.
-ErrorFieldCanNotContainSpecialNorUpperCharacters=The field %s must not contain special characters, nor upper case characters and cannot contain only numbers.
+ErrorFieldCanNotContainSpecialNorUpperCharacters=The field %s must not contain special characters, nor upper case characters, and must start with an alphabetical character (a-z)
ErrorFieldMustHaveXChar=The field %s must have at least %s characters.
ErrorNoAccountancyModuleLoaded=No accountancy module activated
ErrorExportDuplicateProfil=This profile name already exists for this export set.
@@ -331,6 +331,7 @@ WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So y
WarningPaypalPaymentNotCompatibleWithStrict=The value 'Strict' makes the online payment features not working correctly. Use 'Lax' instead.
WarningThemeForcedTo=Warning, theme has been forced to %s by hidden constant MAIN_FORCETHEME
WarningPagesWillBeDeleted=Warning, this will also delete all existing pages/containers of the website. You should export your website before, so you have a backup to re-import it later.
+WarningAutoValNotPossibleWhenStockIsDecreasedOnInvoiceVal=Automatic validation is disabled when option to decrease stock is set on "Invoice validation".
# Validate
RequireValidValue = Value not valid
diff --git a/htdocs/langs/en_US/exports.lang b/htdocs/langs/en_US/exports.lang
index 668b5dd7c9d..eb0c03fd56f 100644
--- a/htdocs/langs/en_US/exports.lang
+++ b/htdocs/langs/en_US/exports.lang
@@ -95,8 +95,8 @@ NbOfLinesOK=Number of lines with no errors and no warnings: %s.
NbOfLinesImported=Number of lines successfully imported: %s.
DataComeFromNoWhere=Value to insert comes from nowhere in source file.
DataComeFromFileFieldNb=Value to insert comes from column %s in source file.
-DataComeFromIdFoundFromRef=Value that comes from column %s of source file will be used to find the id of the parent object to use (so the object %s that has the ref. from source file must exist in the database).
-DataComeFromIdFoundFromCodeId=Code that comes from column %s of source file will be used to find the id of the parent object to use (so the code from source file must exist in the dictionary %s). Note that if you know the id, you can also use it in the source file instead of the code. Import should work in both cases.
+DataComeFromIdFoundFromRef=The value that comes from the source file will be used to find the id of the parent object to use (so the object %s that has the ref. from source file must exist in the database).
+DataComeFromIdFoundFromCodeId=The value of code that comes from source file will be used to find the id of the parent object to use (so the code from source file must exist in the dictionary %s). Note that if you know the id, you can also use it in the source file instead of the code. Import should work in both cases.
DataIsInsertedInto=Data coming from source file will be inserted into the following field:
DataIDSourceIsInsertedInto=The id of the parent object, that was found using the data in the source file, will be inserted into the following field:
DataCodeIDSourceIsInsertedInto=The id of the parent line, that was found from code, will be inserted into the following field:
diff --git a/htdocs/langs/en_US/languages.lang b/htdocs/langs/en_US/languages.lang
index 9350efef602..4e4b2cfafe7 100644
--- a/htdocs/langs/en_US/languages.lang
+++ b/htdocs/langs/en_US/languages.lang
@@ -111,6 +111,7 @@ Language_sv_SE=Swedish
Language_sq_AL=Albanian
Language_sk_SK=Slovakian
Language_sr_RS=Serbian
+Language_sw_KE=Swahili
Language_sw_SW=Kiswahili
Language_th_TH=Thai
Language_uk_UA=Ukrainian
diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang
index 3e252e407e4..3e917cc460d 100644
--- a/htdocs/langs/en_US/ticket.lang
+++ b/htdocs/langs/en_US/ticket.lang
@@ -149,6 +149,8 @@ TicketsAutoNotifyCloseHelp=When closing a ticket, you will be proposed to send a
TicketWrongContact=Provided contact is not part of current ticket contacts. Email not sent.
TicketChooseProductCategory=Product category for ticket support
TicketChooseProductCategoryHelp=Select the product category of ticket support. This will be used to automatically link a contract to a ticket.
+TicketUseCaptchaCode=Use graphical code (CAPTCHA) when creating a ticket
+TicketUseCaptchaCodeHelp=Adds CAPTCHA verification when creating a new ticket.
#
# Index & list page
@@ -219,18 +221,17 @@ SendMessageByEmail=Send message by email
TicketNewMessage=New message
ErrorMailRecipientIsEmptyForSendTicketMessage=Recipient is empty. No email send
TicketGoIntoContactTab=Please go into "Contacts" tab to select them
-TicketMessageMailIntro=Introduction
+TicketMessageMailIntro=Message header
TicketMessageMailIntroHelp=This text is added only at the beginning of the email and will not be saved.
-TicketMessageMailIntroLabelAdmin=Introduction text to all ticket answers
TicketMessageMailIntroText=Hello, A new answer has been added to a ticket that you follow. Here is the message:
TicketMessageMailIntroHelpAdmin=This text will be inserted before the answer when replying to a ticket from Dolibarr
-TicketMessageMailSignature=Signature
-TicketMessageMailSignatureHelp=This text is added only at the end of the email and will not be saved.
-TicketMessageMailSignatureText=Message sent by %s via Dolibarr
-TicketMessageMailSignatureLabelAdmin=Signature of response email
-TicketMessageMailSignatureHelpAdmin=This text will be inserted after the response message.
+TicketMessageMailFooter=Message footer
+TicketMessageMailFooterHelp=This text is added only at the end of the message sent by email and will not be saved.
+TicketMessageMailFooterText=Message sent by %s via Dolibarr
+TicketMessageMailFooterHelpAdmin=This text will be inserted after the response message.
TicketMessageHelp=Only this text will be saved in the message list on ticket card.
TicketMessageSubstitutionReplacedByGenericValues=Substitutions variables are replaced by generic values.
+ForEmailMessageWillBeCompletedWith=For email messages sent to external users, the message will be completed with
TimeElapsedSince=Time elapsed since
TicketTimeToRead=Time elapsed before read
TicketTimeElapsedBeforeSince=Time elapsed before / since
diff --git a/htdocs/langs/fr_FR/exports.lang b/htdocs/langs/fr_FR/exports.lang
index 6460fa7e5b1..665173fd58e 100644
--- a/htdocs/langs/fr_FR/exports.lang
+++ b/htdocs/langs/fr_FR/exports.lang
@@ -95,8 +95,8 @@ NbOfLinesOK=Nombre de lignes sans erreur ni avertissement : %s.
NbOfLinesImported=Nombre de lignes importées avec succès : %s.
DataComeFromNoWhere=La valeur à insérer n'est issue d'aucun champ du fichier source.
DataComeFromFileFieldNb=La valeur à insérer provient de la colonne %s dans le fichier source.
-DataComeFromIdFoundFromRef=La valeur provenant de la colonne %s du fichier source sera utilisée pour trouver l'identifiant de l'objet parent à utiliser (donc l'objet %s qui a la référence du fichier source doit exister dans la base de données).
-DataComeFromIdFoundFromCodeId=Le code provenant de la colonne %s du fichier source sera utilisé pour trouver l'id de l'objet parent à utiliser (donc le code du fichier source doit exister dans le dictionnaire %s ). Notez que si vous connaissez l'identifiant, vous pouvez également l'utiliser dans le fichier source à la place du code. L'importation devrait fonctionner dans les deux cas.
+DataComeFromIdFoundFromRef=La valeur provenant du fichier source sera utilisée pour trouver l'identifiant de l'objet parent à utiliser (donc l'objet %s qui a la référence du fichier source doit exister dans la base de données).
+DataComeFromIdFoundFromCodeId=Le valeur du code provenant du fichier source sera utilisé pour trouver l'id de l'objet parent à utiliser (donc le code du fichier source doit exister dans le dictionnaire %s ). Notez que si vous connaissez l'identifiant, vous pouvez également l'utiliser dans le fichier source à la place du code. L'importation devrait fonctionner dans les deux cas.
DataIsInsertedInto=La donnée issue du fichier source sera insérée dans le champ suivant:
DataIDSourceIsInsertedInto=L'identifiant de l'objet père, retrouvé à partir de la donnée dans le fichier source, sera inséré dans le champ suivant :
DataCodeIDSourceIsInsertedInto=L'identifiant de la ligne père, retrouvé à partir du code, sera inséré dans le champ suivant :
diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php
index 76b26b09a3b..fe1b71423ce 100644
--- a/htdocs/public/onlinesign/newonlinesign.php
+++ b/htdocs/public/onlinesign/newonlinesign.php
@@ -166,7 +166,7 @@ if ($action == 'confirm_refusepropal' && $confirm == 'yes') {
$message = 'refused';
setEventMessages("PropalRefused", null, 'warnings');
if (method_exists($object, 'call_trigger')) {
- //customer is not a user !?! so could we use same user as validation ?
+ // Online customer is not a user, so we use the use that validates the documents
$user = new User($db);
$user->fetch($object->user_valid_id);
$result = $object->call_trigger('PROPAL_CLOSE_REFUSED', $user);
diff --git a/htdocs/public/ticket/create_ticket.php b/htdocs/public/ticket/create_ticket.php
index fa18f855170..50f5a8776c2 100644
--- a/htdocs/public/ticket/create_ticket.php
+++ b/htdocs/public/ticket/create_ticket.php
@@ -221,7 +221,7 @@ if (empty($reshook)) {
}
// Check Captcha code if is enabled
- if (!empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA) || !empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA_TICKET)) {
+ if (!empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA_TICKET)) {
$sessionkey = 'dol_antispam_value';
$ok = (array_key_exists($sessionkey, $_SESSION) === true && (strtolower($_SESSION[$sessionkey]) === strtolower(GETPOST('code', 'restricthtml'))));
if (!$ok) {
diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php
index 3670aca416b..3e757fd82f3 100644
--- a/htdocs/societe/card.php
+++ b/htdocs/societe/card.php
@@ -3285,7 +3285,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
// Subsidiaries list
- if (!empty($conf->global->SOCIETE_DISABLE_PARENTCOMPANY) && empty($conf->global->SOCIETE_DISABLE_SHOW_SUBSIDIARIES)) {
+ if (empty($conf->global->SOCIETE_DISABLE_PARENTCOMPANY) && empty($conf->global->SOCIETE_DISABLE_SHOW_SUBSIDIARIES)) {
$result = show_subsidiaries($conf, $langs, $db, $object);
}
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index 007c98f1840..586f955c1e0 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -196,7 +196,7 @@ class Societe extends CommonObject
'fk_stcomm' =>array('type'=>'integer', 'label'=>'CommercialStatus', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>220),
'note_public' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>225),
'note_private' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>230),
- 'prefix_comm' =>array('type'=>'varchar(5)', 'label'=>'Prefix comm', 'enabled'=>'$conf->global->SOCIETE_USEPREFIX', 'visible'=>-1, 'position'=>235),
+ 'prefix_comm' =>array('type'=>'varchar(5)', 'label'=>'Prefix comm', 'enabled'=>"getDolGlobalInt('SOCIETE_USEPREFIX')", 'visible'=>-1, 'position'=>235),
'client' =>array('type'=>'tinyint(4)', 'label'=>'Client', 'enabled'=>1, 'visible'=>-1, 'position'=>240),
'fournisseur' =>array('type'=>'tinyint(4)', 'label'=>'Fournisseur', 'enabled'=>1, 'visible'=>-1, 'position'=>245),
'supplier_account' =>array('type'=>'varchar(32)', 'label'=>'Supplier account', 'enabled'=>1, 'visible'=>-1, 'position'=>250),
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index 1fe1989b865..717638fcbcb 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -2517,6 +2517,11 @@ a.tmenudisabled:link, a.tmenudisabled:visited, a.tmenudisabled:hover, a.tmenudis
text-decoration: none;
cursor: not-allowed;
}
+span.mainmenuaspan.tmenudisabled {
+ color: var(--colortextbackhmenu);
+ opacity: 0.5;
+ cursor: not-allowed;
+}
a.tmenu:link, a.tmenu:visited, a.tmenu:hover, a.tmenu:active {
padding: 0px 2px 0px 2px;
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index be4ffccd83d..9141a0d3f3c 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -2565,6 +2565,11 @@ a.tmenudisabled:link, a.tmenudisabled:visited, a.tmenudisabled:hover, a.tmenudis
text-decoration: none;
cursor: not-allowed;
}
+span.mainmenuaspan.tmenudisabled {
+ color: var(--colortextbackhmenu);
+ opacity: 0.5;
+ cursor: not-allowed;
+}
a.tmenu:link, a.tmenu:visited, a.tmenu:hover, a.tmenu:active {
font-weight: normal;
diff --git a/htdocs/ticket/agenda.php b/htdocs/ticket/agenda.php
index 6f1fa43b472..9adffdfd720 100644
--- a/htdocs/ticket/agenda.php
+++ b/htdocs/ticket/agenda.php
@@ -247,9 +247,14 @@ if (!empty($object->id)) {
$messagingUrl = DOL_URL_ROOT.'/ticket/agenda.php?track_id='.$object->track_id;
$morehtmlright .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 1, array('morecss'=>'btnTitleSelected'));
+ // Show link to send an email (if read and not closed)
+ $btnstatus = $object->status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage";
+ $url = 'card.php?track_id='.$object->track_id.'&action=presend_addmessage&mode=init&private_message=0&send_email=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?track_id='.$object->track_id).'#formmailbeforetitle';
+ $morehtmlright .= dolGetButtonTitle($langs->trans('SendMail'), '', 'fa fa-paper-plane', $url, 'email-title-button', $btnstatus);
+
// Show link to add a message (if read and not closed)
$btnstatus = $object->status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage";
- $url = 'card.php?track_id='.$object->track_id.'&action=presend_addmessage&mode=init';
+ $url = 'card.php?track_id='.$object->track_id.'&action=presend_addmessage&mode=init&backtopage='.urlencode($_SERVER["PHP_SELF"].'?track_id='.$object->track_id).'#formmailbeforetitle';
$morehtmlright .= dolGetButtonTitle($langs->trans('TicketAddMessage'), '', 'fa fa-comment-dots', $url, 'add-new-ticket-title-button', $btnstatus);
// Show link to add event (if read and not closed)
diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php
index d12d84d00f1..647bf2cec54 100755
--- a/htdocs/ticket/card.php
+++ b/htdocs/ticket/card.php
@@ -371,7 +371,7 @@ if (empty($reshook)) {
if ($object->markAsRead($user) > 0) {
setEventMessages($langs->trans('TicketMarkedAsRead'), null, 'mesgs');
- header("Location: card.php?track_id=".$object->track_id."&action=view");
+ header("Location: card.php?track_id=".$object->track_id);
exit;
} else {
setEventMessages($object->error, $object->errors, 'errors');
@@ -429,7 +429,7 @@ if (empty($reshook)) {
setEventMessages($langs->trans('TicketAssigned'), null, 'mesgs');
- header("Location: card.php?track_id=".$object->track_id."&action=view");
+ header("Location: card.php?track_id=".$object->track_id);
exit;
} else {
array_push($object->errors, $object->error);
@@ -437,7 +437,8 @@ if (empty($reshook)) {
$action = 'view';
}
- // Action to add an action (not a message)
+ // Action to add an action (not a message).
+ // This may also send an email (concatenated with email_intro and email footer if checkbox was selected)
if ($action == 'add_message' && GETPOSTISSET('btn_add_message') && $user->rights->ticket->read) {
$ret = $object->newMessage($user, $action, (GETPOST('private_message', 'alpha') == "on" ? 1 : 0));
@@ -449,7 +450,7 @@ if (empty($reshook)) {
$url = 'card.php?track_id='.urlencode($object->track_id);
}
} else {
- $url = 'card.php?action=view&track_id='.urlencode($object->track_id);
+ $url = 'card.php?track_id='.urlencode($object->track_id);
}
header("Location: ".$url);
@@ -466,7 +467,7 @@ if (empty($reshook)) {
if ($object->close($user, ($action == "confirm_abandon" ? 1 : 0))) {
setEventMessages($langs->trans('TicketMarkedAsClosed'), null, 'mesgs');
- $url = 'card.php?action=view&track_id='.GETPOST('track_id', 'alpha');
+ $url = 'card.php?track_id='.GETPOST('track_id', 'alpha');
header("Location: ".$url);
} else {
$action = '';
@@ -484,7 +485,7 @@ if (empty($reshook)) {
setEventMessages('