From ca6f22266285866c9479d9394f9e4da101f453ca Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 2 Dec 2021 11:19:44 +0100 Subject: [PATCH] Fix notification (pb static var unknown) --- htdocs/core/class/notify.class.php | 6 +++--- htdocs/theme/eldy/global.inc.php | 22 +++++++++++++++++++++- htdocs/theme/md/style.css.php | 19 +++++++++++++++++++ test/phpunit/NumberingModulesTest.php | 6 ++++-- 4 files changed, 47 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 2df88f51c0d..32ff4444a72 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -83,7 +83,6 @@ class Notify 'ACTION_CREATE' ); - /** * Constructor * @@ -92,6 +91,7 @@ class Notify public function __construct($db) { $this->db = $db; + $this->arrayofnotifsupported = self::$arrayofnotifsupported; } @@ -437,10 +437,10 @@ class Notify $notifcodedefid = $obj->adid; $trackid = ''; if ($obj->type_target == 'tocontactid') { - $trackid = 'con'.$obj->id; + $trackid = 'con'.$obj->cid; } if ($obj->type_target == 'touserid') { - $trackid = 'use'.$obj->id; + $trackid = 'use'.$obj->cid; } if (dol_strlen($obj->email)) { diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 37692f46c1e..bd342be3f65 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -4688,8 +4688,28 @@ div.ui-tooltip.mytooltip { background: var(--tooltipbgcolor) !important; color : var(--tooltipfontcolor); line-height: 1.6em; - min-width: 200px; + min-width: 550px; } +@media only screen and (max-width: 768px) +{ + div.ui-tooltip.mytooltip { + max-width: 400px; + } +} +@media only screen and (max-width: 480px) +{ + div.ui-tooltip.mytooltip { + max-width: 300px; + } +} +@media only screen and (max-width: 320px) +{ + div.ui-tooltip.mytooltip { + max-width: 230px; + } +} + + diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index dccd193454b..5d6cf2d8ead 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -4642,6 +4642,25 @@ div.ui-tooltip.mytooltip { /*background: var(--tooltipbgcolor) !important; color : var(--tooltipfontcolor);*/ line-height: 1.6em; + min-width: 550px; +} +@media only screen and (max-width: 768px) +{ + div.ui-tooltip.mytooltip { + max-width: 400px; + } +} +@media only screen and (max-width: 480px) +{ + div.ui-tooltip.mytooltip { + max-width: 300px; + } +} +@media only screen and (max-width: 320px) +{ + div.ui-tooltip.mytooltip { + max-width: 230px; + } } diff --git a/test/phpunit/NumberingModulesTest.php b/test/phpunit/NumberingModulesTest.php index a34d3b28d1c..ceab1948732 100644 --- a/test/phpunit/NumberingModulesTest.php +++ b/test/phpunit/NumberingModulesTest.php @@ -144,13 +144,15 @@ class NumberingModulesTest extends PHPUnit\Framework\TestCase // First we try with a simple mask, with no reset // and we test counter is still increase second year. $conf->global->FACTURE_ADDON='mercure'; - $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}-{0000}'; $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}-{0000}'; + $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}-{0000}'; + $conf->global->FACTURE_MERCURE_MASK_DEPOSIT='{yyyy}-{0000}'; + $conf->global->FACTURE_MERCURE_MASK_REPLACEMENT='{yyyy}-{0000}'; $conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED=0; $localobject=new Facture($this->savdb); $localobject->initAsSpecimen(); - $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1915); // we use year 1915 to be sure to not have existing invoice for this year + $localobject->date=dol_mktime(12, 0, 0, 1, 1, 1915); // we use year 1915 to be sure to not have existing invoice for this year (usefull only if numbering is {0000@1} $numbering=new mod_facture_mercure(); $result=$numbering->getNextValue($mysoc, $localobject); print __METHOD__." result=".$result."\n";