From 692e10ec944b95064c4dd5927c82aae97127f400 Mon Sep 17 00:00:00 2001 From: noec764 <58433943+noec764@users.noreply.github.com> Date: Fri, 23 Feb 2024 17:14:10 +0100 Subject: [PATCH 01/15] FIX: Error When cloning fourn price no default value for tva_tx (#28368) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: NoƩ --- htdocs/product/class/product.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 3ba34b96728..e754148f6d5 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -4723,8 +4723,8 @@ class Product extends CommonObject // les prix de fournisseurs. $sql = "INSERT ".$this->db->prefix()."product_fournisseur_price ("; - $sql .= " datec, fk_product, fk_soc, price, quantity, fk_user)"; - $sql .= " SELECT '".$this->db->idate($now)."', ".((int) $toId).", fk_soc, price, quantity, fk_user"; + $sql .= " datec, fk_product, fk_soc, price, quantity, fk_user, tva_tx)"; + $sql .= " SELECT '".$this->db->idate($now)."', ".((int) $toId).", fk_soc, price, quantity, fk_user, tva_tx"; $sql .= " FROM ".$this->db->prefix()."product_fournisseur_price"; $sql .= " WHERE fk_product = ".((int) $fromId); From 628feb9c341580a03c7b989386f1c552f6ba7a7f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Feb 2024 21:10:35 +0100 Subject: [PATCH 02/15] Fix warning --- htdocs/webservices/server_supplier_invoice.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/webservices/server_supplier_invoice.php b/htdocs/webservices/server_supplier_invoice.php index 5b7a223a1c4..85744ccc24e 100644 --- a/htdocs/webservices/server_supplier_invoice.php +++ b/htdocs/webservices/server_supplier_invoice.php @@ -422,11 +422,11 @@ function getSupplierInvoicesForThirdParty($authentication, $idthirdparty) 'ref'=>$invoice->ref, 'ref_supplier'=>$invoice->ref_supplier, 'ref_ext'=>$invoice->ref_ext, - 'fk_user_author' => $invoice->fk_user_author, - 'fk_user_valid' => $invoice->fk_user_valid, - 'fk_thirdparty' => $invoice->fk_soc, + 'fk_user_author' => $invoice->user_creation_id, + 'fk_user_valid' => $invoice->user_validation_id, + 'fk_thirdparty' => $invoice->socid, 'type'=>$invoice->type, - 'status'=>$invoice->statut, + 'status'=>$invoice->status, 'total_net'=>$invoice->total_ht, 'total_vat'=>$invoice->total_tva, 'total'=>$invoice->total_ttc, From 26a3ca0413e8edf0a77e7311f75304f52ed83649 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Feb 2024 21:29:36 +0100 Subject: [PATCH 03/15] Fix warning php 8.1 --- htdocs/public/demo/index.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index c71f1d86dc7..e8563e4a9d7 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -134,7 +134,6 @@ $filename = array(); $modules = array(); $orders = array(); $categ = array(); -$dirmod = array(); $i = 0; // is a sequencer of modules found $j = 0; // j is module number. Automatically affected if module number not defined. @@ -174,7 +173,6 @@ foreach ($modulesdir as $dir) { $filename[$i] = $modName; $orders[$i] = $objMod->family."_".$j; // Tri par famille puis numero module //print "x".$modName." ".$orders[$i]."\n
"; - $dirmod[$i] = $dirroot; $j++; $i++; } From 0140f5057dbcc07b6cd677ba509a993ec4ebdf0a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Feb 2024 21:37:38 +0100 Subject: [PATCH 04/15] Fix warning --- htdocs/main.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 9aede3af25a..64652fd3dd1 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -713,7 +713,7 @@ if (!defined('NOLOGIN')) { // If in demo mode, we check we go to home page through the public/demo/index.php page if (!empty($dolibarr_main_demo) && $_SERVER['PHP_SELF'] == DOL_URL_ROOT.'/index.php') { // We ask index page if (empty($_SERVER['HTTP_REFERER']) || !preg_match('/public/', $_SERVER['HTTP_REFERER'])) { - dol_syslog("Call index page from another url than demo page (call is done from page ".$_SERVER['HTTP_REFERER'].")"); + dol_syslog("Call index page from another url than demo page (call is done from page ".(empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFER']).")"); $url = ''; $url .= ($url ? '&' : '').($dol_hide_topmenu ? 'dol_hide_topmenu='.$dol_hide_topmenu : ''); $url .= ($url ? '&' : '').($dol_hide_leftmenu ? 'dol_hide_leftmenu='.$dol_hide_leftmenu : ''); From 72d84f546f56238f24499a1b4592a0451a80239a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Feb 2024 22:01:20 +0100 Subject: [PATCH 05/15] Fix can disable port on command line --- dev/initdemo/initdemopassword.sh | 112 ++++++++++++++++--------------- 1 file changed, 59 insertions(+), 53 deletions(-) diff --git a/dev/initdemo/initdemopassword.sh b/dev/initdemo/initdemopassword.sh index bcf2b14887e..b70c97a831e 100755 --- a/dev/initdemo/initdemopassword.sh +++ b/dev/initdemo/initdemopassword.sh @@ -5,15 +5,17 @@ # # Laurent Destailleur - eldy@users.sourceforge.net #------------------------------------------------------ -# Usage: initdemopassword.sh confirm +# Usage: initdemopassword.sh confirm # usage: initdemopassword.sh confirm base port login pass #------------------------------------------------------ +# shellcheck disable=2006,2034,2046,2064,2068,2086,2155,2166,2186,2172,2268 +# shellcheck disable=2012,2016,2154 export mydir=`echo "$0" | sed -e 's/initdemopassword.sh//'`; if [ "x$mydir" = 'x' -o "x$mydir" = 'x./' ] then - export mydir="." + export mydir="." fi export id=`id -u`; @@ -56,103 +58,107 @@ then fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$ trap "rm -f $fichtemp" 0 1 2 5 15 $DIALOG --title "Reset login password" --clear \ - --inputbox "Mysql database name :" 16 55 dolibarrdemo 2> $fichtemp + --inputbox "Mysql database name :" 16 55 dolibarrdemo 2> $fichtemp valret=$? case $valret in - 0) - base=`cat $fichtemp`;; - 1) - exit;; - 255) - exit;; + 0) + base=`cat $fichtemp` ;; + 1) + exit ;; + 255) + exit ;; esac rm $fichtemp - + # ---------------------------- database port DIALOG=${DIALOG=dialog} fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$ trap "rm -f $fichtemp" 0 1 2 5 15 $DIALOG --title "Reset login password" --clear \ - --inputbox "Mysql port (ex: 3306):" 16 55 3306 2> $fichtemp - + --inputbox "Mysql port (ex: 3306):" 16 55 3306 2> $fichtemp + valret=$? - + case $valret in - 0) - port=`cat $fichtemp`;; - 1) - exit;; - 255) - exit;; + 0) + port=`cat $fichtemp` ;; + 1) + exit ;; + 255) + exit ;; esac rm $fichtemp - - + + # ----------------------------- demo login DIALOG=${DIALOG=dialog} DIALOG="$DIALOG --ascii-lines" fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$ trap "rm -f $fichtemp" 0 1 2 5 15 $DIALOG --title "Reset login password" --clear \ - --inputbox "Login to reset :" 16 55 dolibarrdemologin 2> $fichtemp + --inputbox "Login to reset :" 16 55 dolibarrdemologin 2> $fichtemp valret=$? case $valret in - 0) - demologin=`cat $fichtemp`;; - 1) - exit;; - 255) - exit;; + 0) + demologin=`cat $fichtemp` ;; + 1) + exit ;; + 255) + exit ;; esac rm fichtemp - + # ----------------------------- demo pass DIALOG=${DIALOG=dialog} DIALOG="$DIALOG --ascii-lines" fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$ trap "rm -f $fichtemp" 0 1 2 5 15 $DIALOG --title "Reset login password" --clear \ - --inputbox "Pass to set :" 16 55 dolibarrdemopass 2> $fichtemp + --inputbox "Pass to set :" 16 55 dolibarrdemopass 2> $fichtemp valret=$? case $valret in - 0) - demopass=`cat $fichtemp`;; - 1) - exit;; - 255) - exit;; + 0) + demopass=`cat $fichtemp` ;; + 1) + exit ;; + 255) + exit ;; esac rm fichtemp - - + + export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g' ` # ---------------------------- confirmation DIALOG=${DIALOG=dialog} $DIALOG --title "Reset login password" --clear \ - --yesno "Do you confirm ? \n Mysql database : '$base' \n Mysql port : '$port' \n Demo login: '$demologin' \n Demo password : '$demopass'" 15 55 - + --yesno "Do you confirm ? \n Mysql database : '$base' \n Mysql port : '$port' \n Demo login: '$demologin' \n Demo password : '$demopass'" 15 55 + case $? in - 0) echo "Ok, start process...";; - 1) exit;; - 255) exit;; + 0) echo "Ok, start process..." ;; + 1) exit ;; + 255) exit ;; esac fi # ---------------------------- run sql file +if [ "x$port" != "x0" ] +then + export Pport="-P$port" +fi if [ "x$passwd" != "x" ] then export passwd="-p$passwd" fi -#echo "mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile" -#mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile +#echo "mysql $Pport -u$admin $passwd $base < $mydir/$dumpfile" +#mysql $Pport -u$admin $passwd $base < $mydir/$dumpfile if [ "x${demopasshash}" != "xpassword_hash" ] then - echo '' > /tmp/tmp.php + echo '' > /tmp/tmp.php newpass=`php -f /tmp/tmp.php` else echo '' > /tmp/tmp.php @@ -160,22 +166,22 @@ else fi #rm /tmp/tmp.php -echo "echo \"UPDATE llx_user SET pass_crypted = '$newpass' WHERE login = '$demologin';\" | mysql -P$port $base" -echo "UPDATE llx_user SET pass_crypted = '$newpass' WHERE login = '$demologin';" | mysql -P$port $base +echo "echo \"UPDATE llx_user SET pass_crypted = '$newpass' WHERE login = '$demologin';\" | mysql $Pport $base" +echo "UPDATE llx_user SET pass_crypted = '$newpass' WHERE login = '$demologin';" | mysql $Pport $base export res=$? if [ $res -ne 0 ]; then - echo "Error to execute sql with mysql -P$port -u$admin -p***** $base" + echo "Error to execute sql with mysql $Pport -u$admin -p***** $base" exit -fi +fi if [ -s "$mydir/initdemopostsql.sql" ]; then echo A file initdemopostsql.sql was found, we execute it. - echo "mysql -P$port $base < \"$mydir/initdemopostsql.sql\"" - mysql -P$port $base < "$mydir/initdemopostsql.sql" + echo "mysql $Pport $base < \"$mydir/initdemopostsql.sql\"" + mysql $Pport $base < "$mydir/initdemopostsql.sql" else echo No file initdemopostsql.sql found, so no extra sql action done. -fi +fi if [ "x$res" = "x0" ] From 052cdd02596311db368e82746e7a3f13a782bbaf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 26 Feb 2024 16:35:01 +0100 Subject: [PATCH 06/15] FIX #28429 --- htdocs/comm/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index da07b9f9dd6..bc9a1565dc8 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -591,7 +591,7 @@ if (isModEnabled('ficheinter')) { addSummaryTableLine(3, $num, $nbofloop, $total, "NoIntervention"); finishSimpleTable(true); - print ""; + $db->free($resql); } } From 52d1fe8c6744b0e3a88b8522812a6241d1d42bc6 Mon Sep 17 00:00:00 2001 From: sonikf <93765174+sonikf@users.noreply.github.com> Date: Mon, 26 Feb 2024 23:55:42 +0200 Subject: [PATCH 07/15] fix translation for non latin languages (#28437) * fix translation for non latin languages * fix translation for non latin languages --- htdocs/compta/resultat/index.php | 2 +- htdocs/core/class/html.formaccounting.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index c55dec68b4a..871b096e4bd 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -178,7 +178,7 @@ if ($modecompta == 'CREANCES-DETTES') { $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); $periodlink = ($year_start ? "".img_previous()." ".img_next()."" : ""); $description = $langs->trans("RulesAmountOnInOutBookkeepingRecord"); - $description .= ' ('.$langs->trans("SeePageForSetup", DOL_URL_ROOT.'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin', $langs->transnoentitiesnoconv("Accountancy").' / '.$langs->transnoentitiesnoconv("Setup").' / '.$langs->trans("Chartofaccounts")).')'; + $description .= ' ('.$langs->trans("SeePageForSetup", DOL_URL_ROOT.'/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin', $langs->transnoentitiesnoconv("Accountancy").' / '.$langs->transnoentitiesnoconv("Setup").' / '.$langs->transnoentitiesnoconv("Chartofaccounts")).')'; $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); } diff --git a/htdocs/core/class/html.formaccounting.class.php b/htdocs/core/class/html.formaccounting.class.php index 90b17804022..b8b6cabe6c1 100644 --- a/htdocs/core/class/html.formaccounting.class.php +++ b/htdocs/core/class/html.formaccounting.class.php @@ -302,7 +302,7 @@ class FormAccounting extends Form $out .= ''; //if ($user->admin && $help) $out .= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); } else { - $out = $langs->trans("ErrorNoAccountingCategoryForThisCountry", $mysoc->country_code, $langs->trans("Accounting"), $langs->trans("Setup"), $langs->trans("AccountingCategories")); + $out = $langs->trans("ErrorNoAccountingCategoryForThisCountry", $mysoc->country_code, $langs->transnoentitiesnoconv("Accounting"), $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("AccountingCategories")); } } else { dol_print_error($this->db); From 39d873287938d5192b38c861595bf10331ab0fe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 27 Feb 2024 00:14:22 +0100 Subject: [PATCH 08/15] fix missing status if unread (status = 0) (#28443) --- htdocs/ticket/class/ticket.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index d4d498ab18d..186d1ce410f 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1424,8 +1424,8 @@ class Ticket extends CommonObject // phpcs:enable global $langs, $hookmanager; - $labelStatus = !empty($status) ? $this->labelStatus[$status] : ''; - $labelStatusShort = !empty($status) ? $this->labelStatusShort[$status] : ''; + $labelStatus = (isset($status) && !empty($this->labelStatus[$status])) ? $this->labelStatus[$status] : ''; + $labelStatusShort = (isset($status) && !empty($this->labelStatusShort[$status]))? $this->labelStatusShort[$status] : ''; switch ($status) { case self::STATUS_NOT_READ: From 7d28285ac7f41f9e59d03f8af0be50703080653c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Feb 2024 11:29:53 +0100 Subject: [PATCH 09/15] CSS --- htdocs/projet/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index 5fa292da439..6007b639120 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -277,11 +277,11 @@ if ($resql) { // Label print ''; - print $projectstatic->title; + print dol_escape_htmltag($projectstatic->title); print ''; // Thirdparty - print ''; + print ''; if ($companystatic->id > 0) { print $companystatic->getNomUrl(1, 'company', 16); } @@ -344,7 +344,7 @@ if ($resql) { print ''; print ''; print_liste_field_titre("OpenedProjectsByThirdparties", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder); - print_liste_field_titre("NbOfProjects", $_SERVER["PHP_SELF"], "nb", "", "", '', $sortfield, $sortorder, 'right '); + print_liste_field_titre("Number", $_SERVER["PHP_SELF"], "nb", "", "", '', $sortfield, $sortorder, 'right '); print "\n"; } From 0a345e37a0dca8f1293c9bfc0d86bbc3773d3721 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Feb 2024 13:01:42 +0100 Subject: [PATCH 10/15] Fix delete not used table --- .../template/sql/llx_c_action_trigger.sql | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 htdocs/modulebuilder/template/sql/llx_c_action_trigger.sql diff --git a/htdocs/modulebuilder/template/sql/llx_c_action_trigger.sql b/htdocs/modulebuilder/template/sql/llx_c_action_trigger.sql deleted file mode 100644 index 432846d122d..00000000000 --- a/htdocs/modulebuilder/template/sql/llx_c_action_trigger.sql +++ /dev/null @@ -1,17 +0,0 @@ --- --- Uncomment and run the script to declare triggers to be used by the agenda module for automatic logging of events into agenda (table llx_actioncomm). --- --- For example --- INSERT INTO `llx_c_action_trigger` (`rowid`, `elementtype`, `code`, `label`, `description`, `rang`) VALUES (NULL, 'mymodule', 'MYCLASSNAME_DRAFT', 'MYCLASSNAME create', 'A MYCLASSNAME is created', '0000000'); --- INSERT INTO `llx_c_action_trigger` (`rowid`, `elementtype`, `code`, `label`, `description`, `rang`) VALUES (NULL, 'mymodule', 'MYCLASSNAME_CREATE', 'MYCLASSNAME create', 'A MYCLASSNAME is created', '0000000'); --- INSERT INTO `llx_c_action_trigger` (`rowid`, `elementtype`, `code`, `label`, `description`, `rang`) VALUES (NULL, 'mymodule', 'MYCLASSNAME_VALIDATE', 'MYCLASSNAME create', 'A MYCLASSNAME is created', '0000000'); --- INSERT INTO `llx_c_action_trigger` (`rowid`, `elementtype`, `code`, `label`, `description`, `rang`) VALUES (NULL, 'mymodule', 'MYCLASSNAME_MODIFY', 'MYCLASSNAME create', 'A MYCLASSNAME is created', '0000000'); --- INSERT INTO `llx_c_action_trigger` (`rowid`, `elementtype`, `code`, `label`, `description`, `rang`) VALUES (NULL, 'mymodule', 'MYCLASSNAME_ACCEPT', 'MYCLASSNAME create', 'A MYCLASSNAME is created', '0000000'); --- INSERT INTO `llx_c_action_trigger` (`rowid`, `elementtype`, `code`, `label`, `description`, `rang`) VALUES (NULL, 'mymodule', 'MYCLASSNAME_DENIED', 'MYCLASSNAME create', 'A MYCLASSNAME is created', '0000000'); --- INSERT INTO `llx_c_action_trigger` (`rowid`, `elementtype`, `code`, `label`, `description`, `rang`) VALUES (NULL, 'mymodule', 'MYCLASSNAME_REOPEN', 'MYCLASSNAME create', 'A MYCLASSNAME is created', '0000000'); --- INSERT INTO `llx_c_action_trigger` (`rowid`, `elementtype`, `code`, `label`, `description`, `rang`) VALUES (NULL, 'mymodule', 'MYCLASSNAME_UNVALIDATE', 'MYCLASSNAME create', 'A MYCLASSNAME is created', '0000000'); --- INSERT INTO `llx_c_action_trigger` (`rowid`, `elementtype`, `code`, `label`, `description`, `rang`) VALUES (NULL, 'mymodule', 'MYCLASSNAME_SENTBYMAIL', 'MYCLASSNAME create', 'A MYCLASSNAME is created', '0000000'); --- - - ---ADD Call trigger IN TABLE \ No newline at end of file From 2ddfe02e0c1c98106dc6bd5957814b59cc204fe8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 27 Feb 2024 13:08:15 +0100 Subject: [PATCH 11/15] Doc --- htdocs/core/modules/modWebhook.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/modWebhook.class.php b/htdocs/core/modules/modWebhook.class.php index 505b465bfbc..56697702645 100644 --- a/htdocs/core/modules/modWebhook.class.php +++ b/htdocs/core/modules/modWebhook.class.php @@ -62,9 +62,9 @@ class modWebhook extends DolibarrModules $this->name = preg_replace('/^mod/i', '', get_class($this)); // Module description, used if translation string 'ModuleWebhookDesc' not found (Webhook is name of module). - $this->description = "WebhookDescription"; + $this->description = "WebHook"; // Used only if file README.md and README-LL.md not found. - $this->descriptionlong = "WebhookDescription"; + $this->descriptionlong = "Interface to catch dolibarr triggers and send data of the event to an external URL"; // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z' $this->version = 'dolibarr'; From aa37b755e06745752250e55bb8ee51169142dd41 Mon Sep 17 00:00:00 2001 From: PsyCrow <93346975+PsyCrow-code@users.noreply.github.com> Date: Tue, 27 Feb 2024 07:03:53 -0600 Subject: [PATCH 12/15] Update paiement.php (#28449) PHP Warning: Undefined variable $totalrecucreditnote PHP Warning: Undefined variable $totalrecudeposits --- htdocs/fourn/facture/paiement.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index de1e9ae45ae..007dd70dea0 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -602,6 +602,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $total = 0; $total_ttc = 0; $totalrecu = 0; + $totalrecucreditnote = 0; // PHP Warning: Undefined variable $totalrecucreditnote + $totalrecudeposits = 0; // PHP Warning: Undefined variable $totalrecudeposits while ($i < $num) { $objp = $db->fetch_object($resql); From d59e3e5bc8da8252bee5d8102f2e7bca21f51638 Mon Sep 17 00:00:00 2001 From: daraelmin Date: Wed, 28 Feb 2024 18:54:41 +0100 Subject: [PATCH 13/15] FIX subscription must be editable when accounting isn't reconciled (#28469) --- htdocs/adherents/subscription/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index a9446083faf..c258485760b 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -358,7 +358,7 @@ if ($rowid && $action != 'edit') { print '
'; if ($user->hasRight('adherent', 'cotisation', 'creer')) { - if (!empty($bankline->rappro) || empty($bankline)) { + if (empty($bankline->rappro) || empty($bankline)) { print '"; } else { print '"; From 1e11de0624d3dea40c3eaa94cf7b56a93fbc1eb6 Mon Sep 17 00:00:00 2001 From: sonikf <93765174+sonikf@users.noreply.github.com> Date: Thu, 29 Feb 2024 15:27:05 +0200 Subject: [PATCH 14/15] FIX #28491 (#28522) --- htdocs/user/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 3d7460d34d9..521523f5ace 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -2554,7 +2554,7 @@ if ($action == 'create' || $action == 'adduserldap') { print '
'.$form->editfieldkey('State', 'state_id', '', $object, 0).''; if ($caneditfield) { print img_picto('', 'state', 'class="pictofixedwidth"'); - print $formcompany->select_state($object->state_id, $object->country_code, 'state_id'); + print $formcompany->select_state_ajax('country_id', $object->state_id, $object->country_id, 'state_id'); } else { print $object->state; } From 042ef30a9f88e9a80c6d1631f2c06955d1ee8135 Mon Sep 17 00:00:00 2001 From: Hasanuzzaman Sattar Date: Thu, 29 Feb 2024 19:11:59 +0530 Subject: [PATCH 15/15] FIX #28518 (#28520) * #28518 * Update interface_50_modTicket_TicketEmail.class.php --------- Co-authored-by: Laurent Destailleur --- .../triggers/interface_50_modTicket_TicketEmail.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php index f18526a9d19..0afe5a7150b 100644 --- a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php +++ b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php @@ -246,13 +246,15 @@ class InterfaceTicketEmail extends DolibarrTriggers $linked_contacts = array_merge($linked_contacts, $object->listeContact(-1, 'internal')); if (empty($linked_contacts) && !empty($conf->global->TICKET_NOTIFY_AT_CLOSING) && !empty($object->fk_soc)) { $object->fetch_thirdparty(); - $linked_contacts[] = $object->thirdparty->email; + $linked_contacts[]['email'] = $object->thirdparty->email; } $contactid = GETPOST('contactid', 'int'); $res = 0; if ($contactid > 0) { + // TODO This security test has no sens. We must check that $contactid is inside $linked_contacts[]['id'] when $linked_contacts[]['source'] = 'external' or 'thirdparty' + // Refuse email if not $contact = new Contact($this->db); $res = $contact->fetch($contactid); if (! in_array($contact, $linked_contacts)) {