diff --git a/.travis.yml b/.travis.yml
index 5d7eb7a1678..44d784ea091 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -50,7 +50,7 @@ jobs:
env: DB=postgresql
- stage: PHP 5.6-7.4
if: type = pull_request OR type = push
- php: '7.4'
+ php: '7.4.22'
env: DB=mysql
- stage: PHP Dev
if: type = push AND branch = develop
@@ -106,7 +106,7 @@ install:
php-parallel-lint/php-console-highlighter ^0 \
squizlabs/php_codesniffer ^3
fi
- if [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ]; then
+ if [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = '7.4.22' ]; then
composer -n require phpunit/phpunit ^7 \
php-parallel-lint/php-parallel-lint ^1.2 \
php-parallel-lint/php-console-highlighter ^0 \
@@ -241,7 +241,7 @@ before_script:
# enable php-fpm
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- |
- if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
+ if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = '7.4.22' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
# Copy the included pool
sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
fi
@@ -276,7 +276,7 @@ script:
set -e
#parallel-lint --exclude htdocs/includes --blame .
# Exclusions are defined in the ruleset.xml file
- if [ "$TRAVIS_PHP_VERSION" = "7.4" ]; then
+ if [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
@@ -291,7 +291,7 @@ script:
# Ensure we catch errors
set -e
# Exclusions are defined in the ruleset.xml file
- if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4" ]; then
+ if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
fi
set +e
diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php
index 0d0d013a69f..3c30200c130 100644
--- a/htdocs/accountancy/class/accountancyexport.class.php
+++ b/htdocs/accountancy/class/accountancyexport.class.php
@@ -64,6 +64,10 @@ class AccountancyExport
public static $EXPORT_TYPE_FEC = 1000;
public static $EXPORT_TYPE_FEC2 = 1010;
+ /**
+ * @var DoliDB Database handler
+ */
+ public $db;
/**
* @var string[] Error codes (or messages)
diff --git a/htdocs/accountancy/class/accountancyimport.class.php b/htdocs/accountancy/class/accountancyimport.class.php
index a79484b2a83..bd771742f26 100644
--- a/htdocs/accountancy/class/accountancyimport.class.php
+++ b/htdocs/accountancy/class/accountancyimport.class.php
@@ -33,11 +33,30 @@
*/
+
/**
* Manage the different format accountancy import
*/
class AccountancyImport
{
+ /**
+ * @var DoliDB Database handler
+ */
+ public $db;
+
+
+ /**
+ * Constructor
+ *
+ * @param DoliDb $db Database handler
+ */
+ public function __construct(DoliDB $db)
+ {
+ global $conf;
+
+ $this->db = $db;
+ }
+
/**
* Clean amount
*
@@ -105,6 +124,7 @@ class AccountancyImport
return 1;
}
+
/**
* Compute sens
*
diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php
index 931b5e6420c..96a7ae50dfd 100644
--- a/htdocs/accountancy/customer/lines.php
+++ b/htdocs/accountancy/customer/lines.php
@@ -497,7 +497,7 @@ if ($result) {
print '';
print '
';
- $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description));
+ $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description, 1));
$trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
print $form->textwithtooltip(dol_trunc($text, $trunclength), $objp->description);
print ' | ';
diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php
index 80b7bdf2217..bc6713f0846 100644
--- a/htdocs/accountancy/customer/list.php
+++ b/htdocs/accountancy/customer/list.php
@@ -637,7 +637,7 @@ if ($result) {
// Description
print '';
- $text = dolGetFirstLineOfText(dol_string_nohtmltag($facture_static_det->desc));
+ $text = dolGetFirstLineOfText(dol_string_nohtmltag($facture_static_det->desc, 1));
$trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
print $form->textwithtooltip(dol_trunc($text, $trunclength), $facture_static_det->desc);
print ' | ';
diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php
index ff7b9295693..005783ed7a8 100644
--- a/htdocs/accountancy/expensereport/lines.php
+++ b/htdocs/accountancy/expensereport/lines.php
@@ -405,7 +405,7 @@ if ($result) {
// Fees description -- Can be null
print '';
- $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->comments));
+ $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->comments, 1));
$trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
print $form->textwithtooltip(dol_trunc($text, $trunclength), $objp->comments);
print ' | ';
diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php
index d95f4ff67b9..033f1164dc7 100644
--- a/htdocs/accountancy/expensereport/list.php
+++ b/htdocs/accountancy/expensereport/list.php
@@ -481,7 +481,7 @@ if ($result) {
// Fees description -- Can be null
print '';
- $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->comments));
+ $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->comments, 1));
$trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
print $form->textwithtooltip(dol_trunc($text, $trunclength), $objp->comments);
print ' | ';
diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php
index 9f769ae13b4..7d1960459bc 100644
--- a/htdocs/accountancy/supplier/lines.php
+++ b/htdocs/accountancy/supplier/lines.php
@@ -502,7 +502,7 @@ if ($result) {
print '';
print '';
- $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description));
+ $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description, 1));
$trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
print $form->textwithtooltip(dol_trunc($text, $trunclength), $objp->description);
print ' | ';
diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php
index 24d0ed08a0a..0af840e3599 100644
--- a/htdocs/accountancy/supplier/list.php
+++ b/htdocs/accountancy/supplier/list.php
@@ -644,7 +644,7 @@ if ($result) {
// Description
print '';
- $text = dolGetFirstLineOfText(dol_string_nohtmltag($facturefourn_static_det->desc));
+ $text = dolGetFirstLineOfText(dol_string_nohtmltag($facturefourn_static_det->desc, 1));
$trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
print $form->textwithtooltip(dol_trunc($text, $trunclength), $facturefourn_static_det->desc);
print ' | ';
diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index 74d26e29da5..05699347806 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -669,8 +669,8 @@ if ($id == 11) {
asort($elementList);
$sourceList = array(
- 'internal' => $langs->trans('Internal'),
- 'external' => $langs->trans('External')
+ 'internal' => $langs->trans('Internal'),
+ 'external' => $langs->trans('External')
);
}
@@ -737,12 +737,12 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) {
}
if ((!GETPOSTISSET($value) || GETPOST($value) == '')
&& (!in_array($value, array('decalage', 'module', 'accountancy_code', 'accountancy_code_sell', 'accountancy_code_buy', 'tracking', 'picto')) // Fields that are not mandatory
- && ($id != 10 || ($value != 'code' && $value != 'note')) // Field code and note is not mandatory for dictionary table 10
- )
- ) {
- $ok = 0;
- $fieldnamekey = $value;
- // We take translate key of field
+ && ($id != 10 || ($value != 'code' && $value != 'note')) // Field code and note is not mandatory for dictionary table 10
+ )
+ ) {
+ $ok = 0;
+ $fieldnamekey = $value;
+ // We take translate key of field
if ($fieldnamekey == 'libelle' || ($fieldnamekey == 'label')) {
$fieldnamekey = 'Label';
}
@@ -792,7 +792,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) {
$fieldnamekey = 'UseByDefault';
}
- setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors');
+ setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors');
}
}
// Other checks
@@ -2411,10 +2411,10 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
} elseif ($value == 'unit') {
print '';
$units = array(
- 'mm' => $langs->trans('SizeUnitmm'),
- 'cm' => $langs->trans('SizeUnitcm'),
- 'point' => $langs->trans('SizeUnitpoint'),
- 'inch' => $langs->trans('SizeUnitinch')
+ 'mm' => $langs->trans('SizeUnitmm'),
+ 'cm' => $langs->trans('SizeUnitcm'),
+ 'point' => $langs->trans('SizeUnitpoint'),
+ 'inch' => $langs->trans('SizeUnitinch')
);
print $form->selectarray('unit', $units, (!empty($obj->{$value}) ? $obj->{$value}:''), 0, 0, 0);
print ' | ';
diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php
index dcf7fe18d6f..cb3b16fcc0e 100644
--- a/htdocs/admin/mails_templates.php
+++ b/htdocs/admin/mails_templates.php
@@ -205,7 +205,7 @@ if (!empty($conf->expedition->enabled)) {
$elementList['shipping_send'] = img_picto('', 'dolly', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendShipment'));
}
if (!empty($conf->reception->enabled)) {
- $elementList['reception_send'] = img_picto('', 'dolly', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendReception'));
+ $elementList['reception_send'] = img_picto('', 'dollyrevert', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendReception'));
}
if (!empty($conf->ficheinter->enabled)) {
$elementList['fichinter_send'] = img_picto('', 'intervention', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendIntervention'));
diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php
index db79a1503c9..f6d71fe6817 100644
--- a/htdocs/admin/notification.php
+++ b/htdocs/admin/notification.php
@@ -267,6 +267,7 @@ $constantes = array();
foreach ($listofnotifiedevents as $notifiedevent) {
$label = $langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label'];
$elementLabel = $langs->trans(ucfirst($notifiedevent['elementtype']));
+ $model = $notifiedevent['elementtype'].'_send';
if ($notifiedevent['elementtype'] == 'order_supplier') {
$elementLabel = $langs->trans('SupplierOrder');
diff --git a/htdocs/cache.manifest b/htdocs/cache.manifest
deleted file mode 100644
index 5e514a32a47..00000000000
--- a/htdocs/cache.manifest
+++ /dev/null
@@ -1,36 +0,0 @@
-CACHE MANIFEST
-# version 2013-05-21 13:30:21
-# Note: If this file is dynamic, it must return MIME text/cache-manifest
-# Note: Order of CACHE, NETWORK and FALLBACK section does not change behaviour
-" Note:
-
-
-# Files listed under CACHE will be ALWAYS cached after they are loaded.
-# And they will be always used from Cache after (even after refresh).
-CACHE:
-theme/dolibarr_logo.svg
-support/
-support/index.php
-
-support/default.css
-support/helpcenter.png
-support/internet.png
-support/mail.png
-support/pagemaster.png
-support/redstar.png
-support/star.png
-support/who.png
-
-
-# The NETWORK section contains the path to a folder to ensure that requests
-# to load resources will use internet.
-# CACHE has priority on NETWORK, so usage is useless
-NETWORK:
-/
-
-# The FALLBACK section contains entries that provide a backup strategy.
-# If the browser is unable to retrieve the original content, the fallback resource will be used.
-# In the example above, we display a static image in case the dynamic one is unavailable.
-FALLBACK:
-#/ public/notice.php
-#theme/eldy/img/* theme/md/img/*
diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php
index 04f2288ae08..f4456ed79bf 100644
--- a/htdocs/categories/index.php
+++ b/htdocs/categories/index.php
@@ -133,7 +133,9 @@ if (empty($nosearch)) {
print '';
print "\n";
print "\t\t";
- print dolGetFirstLineOfText($cat->description);
+ $text = dolGetFirstLineOfText(dol_string_nohtmltag($cat->description, 1));
+ $trunclength = 48;
+ print $form->textwithtooltip(dol_trunc($text, $trunclength), $cat->description);
print " | \n";
print "\t\n";
}
diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php
index e2b412e15db..f6932cc4bef 100644
--- a/htdocs/comm/action/list.php
+++ b/htdocs/comm/action/list.php
@@ -943,8 +943,8 @@ while ($i < min($num, $limit)) {
// Description
if (!empty($arrayfields['a.note']['checked'])) {
print '';
- $text = dolGetFirstLineOfText(dol_string_nohtmltag($actionstatic->note_private, 0));
- print $form->textwithtooltip(dol_trunc($text, 40), $actionstatic->note_private);
+ $text = dolGetFirstLineOfText(dol_string_nohtmltag($actionstatic->note_private, 1));
+ print $form->textwithtooltip(dol_trunc($text, 48), $actionstatic->note_private);
print ' | ';
}
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index 0c43cc4ad2d..234f2fba627 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -3723,7 +3723,7 @@ class Commande extends CommonOrder
$label .= '
'.$langs->trans('AmountTTC').': '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
}
if (!empty($this->date)) {
- $label .= '
'.$langs->trans('Date').': '.dol_print_date($this->date, 'dayhour');
+ $label .= '
'.$langs->trans('Date').': '.dol_print_date($this->date, 'day');
}
if (!empty($this->delivery_date)) {
$label .= '
'.$langs->trans('DeliveryDate').': '.dol_print_date($this->delivery_date, 'dayhour');
diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index 87d6b98475b..7265a69d1af 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -2027,62 +2027,73 @@ if ($action == 'create') {
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if (empty($reshook)) {
+ $params = array(
+ 'attr' => array(
+ 'title' => '',
+ 'class' => 'classfortooltip'
+ )
+ );
+
// Send
if (empty($user->socid)) {
if ($object->statut == 1) {
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->contrat->creer)) {
- print '';
+ print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&token='.newToken().'&mode=init#formmailbeforetitle', '', true, $params);
} else {
- print '';
+ print dolGetButtonAction($langs->trans('SendMail'), '', 'default', '#', '', false, $params);
}
}
}
if ($object->statut == 0 && $nbofservices) {
if ($user->rights->contrat->creer) {
- print '';
+ print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=valid&token='.newToken(), '', true, $params);
} else {
- print '';
+ $params['attr']['title'] = $langs->trans("NotEnoughPermissions");
+ print dolGetButtonAction($langs->trans('Validate'), '', 'default', '#', '', false, $params);
}
}
if ($object->statut == 1) {
if ($user->rights->contrat->creer) {
- print '';
+ print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken(), '', true, $params);
} else {
- print '';
+ $params['attr']['title'] = $langs->trans("NotEnoughPermissions");
+ print dolGetButtonAction($langs->trans('Modify'), '', 'default', '#', '', false, $params);
}
}
if (!empty($conf->commande->enabled) && $object->statut > 0 && $object->nbofservicesclosed < $nbofservices) {
$langs->load("orders");
if ($user->rights->commande->creer) {
- print '';
+ print dolGetButtonAction($langs->trans('CreateOrder'), '', 'default', DOL_URL_ROOT.'/commande/card.php?action=create&token='.newToken().'&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->thirdparty->id, '', true, $params);
} else {
- print '';
+ $params['attr']['title'] = $langs->trans("NotEnoughPermissions");
+ print dolGetButtonAction($langs->trans('CreateOrder'), '', 'default', '#', '', false, $params);
}
}
if (!empty($conf->facture->enabled) && $object->statut > 0) {
$langs->load("bills");
if ($user->rights->facture->creer) {
- print '';
+ print dolGetButtonAction($langs->trans('CreateBill'), '', 'default', DOL_URL_ROOT.'/compta/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->thirdparty->id, '', true, $params);
} else {
- print '';
+ $params['attr']['title'] = $langs->trans("NotEnoughPermissions");
+ print dolGetButtonAction($langs->trans('CreateBill'), '', 'default', '#', '', false, $params);
}
}
if ($object->nbofservicesclosed > 0 || $object->nbofserviceswait > 0) {
if ($user->rights->contrat->activer) {
- print '';
+ print dolGetButtonAction($langs->trans('ActivateAllContracts'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=activate&token='.newToken(), '', true, $params);
} else {
- print '';
+ print dolGetButtonAction($langs->trans('ActivateAllContracts'), '', 'default', '#', '', false, $params);
}
}
if ($object->nbofservicesclosed < $nbofservices) {
if ($user->rights->contrat->desactiver) {
- print '';
+ print dolGetButtonAction($langs->trans('CloseAllContracts'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=close&token='.newToken(), '', true, $params);
} else {
- print '';
+ print dolGetButtonAction($langs->trans('CloseAllContracts'), '', 'default', '#', '', false, $params);
}
//if (! $numactive)
@@ -2104,16 +2115,17 @@ if ($action == 'create') {
// Clone
if ($user->rights->contrat->creer) {
- print '';
+ print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&token='.newToken(), '', true, $params);
}
// On peut supprimer entite si
// - Droit de creer + mode brouillon (erreur creation)
// - Droit de supprimer
if (($user->rights->contrat->creer && $object->statut == $object::STATUS_DRAFT) || $user->rights->contrat->supprimer) {
- print '';
+ print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), '', true, $params);
} else {
- print '';
+ $params['attr']['title'] = $langs->trans("NotAllowed");
+ print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), '', false, $params);
}
}
diff --git a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php
index 9a40c3f9aec..403c6c9fc6d 100644
--- a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php
+++ b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php
@@ -162,7 +162,7 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes
$this->info_box_contents[$line][] = array(
'td' => 'class="right"',
- 'text' => $delayIcon.' '.($delivery_date ? dol_print_date($delivery_date, 'day', 'tzuserrel') : '').'',
+ 'text' => $delayIcon.' '.($delivery_date ? dol_print_date($delivery_date, 'day', 'tzuserrel') : '').'',
'asis' => 1
);
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 5e67d293e3d..51bfc09d44d 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -7067,6 +7067,8 @@ abstract class CommonObject
$paramforthenewlink = '';
$paramforthenewlink .= (GETPOSTISSET('action') ? '&action='.GETPOST('action', 'aZ09') : '');
$paramforthenewlink .= (GETPOSTISSET('id') ? '&id='.GETPOST('id', 'int') : '');
+ $paramforthenewlink .= (GETPOSTISSET('origin') ? '&origin='.GETPOST('origin', 'aZ09') : '');
+ $paramforthenewlink .= (GETPOSTISSET('originid') ? '&originid='.GETPOST('originid', 'int') : '');
$paramforthenewlink .= '&fk_'.strtolower($class).'=--IDFORBACKTOPAGE--';
// TODO Add Javascript code to add input fields already filled into $paramforthenewlink so we won't loose them when going back to main page
$out .= '';
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 428de442786..f8d87b5dd5b 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -16,7 +16,7 @@
* Copyright (C) 2012 Cedric Salvador
* Copyright (C) 2012-2015 Raphaël Doursenaud
* Copyright (C) 2014-2020 Alexandre Spangaro
- * Copyright (C) 2018-2021 Ferran Marcet
+ * Copyright (C) 2018-2022 Ferran Marcet
* Copyright (C) 2018-2021 Frédéric France
* Copyright (C) 2018 Nicolas ZABOURI
* Copyright (C) 2018 Christophe Battarel
@@ -8587,6 +8587,7 @@ class Form
print '