Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur
2025-11-08 12:15:04 +01:00
11 changed files with 234 additions and 303 deletions

View File

@@ -11490,36 +11490,6 @@ parameters:
count: 1
path: ../../../htdocs/mrp/index.php
-
message: '#^Variable \$badgeStatus0 might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/mrp/index.php
-
message: '#^Variable \$badgeStatus1 might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/mrp/index.php
-
message: '#^Variable \$badgeStatus4 might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/mrp/index.php
-
message: '#^Variable \$badgeStatus6 might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/mrp/index.php
-
message: '#^Variable \$badgeStatus9 might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/mrp/index.php
-
message: '#^Variable \$contextpage in empty\(\) always exists and is not falsy\.$#'
identifier: empty.variable
@@ -14658,54 +14628,6 @@ parameters:
count: 1
path: ../../../htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php
-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
count: 1
path: ../../../htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php
-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
count: 2
path: ../../../htdocs/recruitment/index.php
-
message: '#^Variable \$badgeStatus0 might not be defined\.$#'
identifier: variable.undefined
count: 2
path: ../../../htdocs/recruitment/index.php
-
message: '#^Variable \$badgeStatus1 might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/recruitment/index.php
-
message: '#^Variable \$badgeStatus4 might not be defined\.$#'
identifier: variable.undefined
count: 2
path: ../../../htdocs/recruitment/index.php
-
message: '#^Variable \$badgeStatus5 might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/recruitment/index.php
-
message: '#^Variable \$badgeStatus6 might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/recruitment/index.php
-
message: '#^Variable \$badgeStatus9 might not be defined\.$#'
identifier: variable.undefined
count: 3
path: ../../../htdocs/recruitment/index.php
-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
@@ -15426,36 +15348,6 @@ parameters:
count: 1
path: ../../../htdocs/supplier_proposal/class/supplier_proposal.class.php
-
message: '#^Variable \$badgeStatus0 might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/supplier_proposal/index.php
-
message: '#^Variable \$badgeStatus1 might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/supplier_proposal/index.php
-
message: '#^Variable \$badgeStatus4 might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/supplier_proposal/index.php
-
message: '#^Variable \$badgeStatus6 might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/supplier_proposal/index.php
-
message: '#^Variable \$badgeStatus9 might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/supplier_proposal/index.php
-
message: '#^If condition is always false\.$#'
identifier: if.alwaysFalse
@@ -15870,48 +15762,6 @@ parameters:
count: 2
path: ../../../htdocs/ticket/class/ticket.class.php
-
message: '#^Variable \$badgeStatus0 might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/ticket/index.php
-
message: '#^Variable \$badgeStatus1 might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/ticket/index.php
-
message: '#^Variable \$badgeStatus3 might not be defined\.$#'
identifier: variable.undefined
count: 2
path: ../../../htdocs/ticket/index.php
-
message: '#^Variable \$badgeStatus4 might not be defined\.$#'
identifier: variable.undefined
count: 2
path: ../../../htdocs/ticket/index.php
-
message: '#^Variable \$badgeStatus6 might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/ticket/index.php
-
message: '#^Variable \$badgeStatus9 might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/ticket/index.php
-
message: '#^Variable \$shownb might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../../htdocs/ticket/index.php
-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue

View File

@@ -11054,6 +11054,7 @@ abstract class CommonObject
if (!$error) {
$dir = getMultidirOutput($this)."/".dol_sanitizeFileName($this->ref);
// For remove dir
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
if (dol_is_dir($dir)) {
if (!dol_delete_dir_recursive($dir)) {
$this->errors[] = 'ErrorFailToDeleteDir';

View File

@@ -22,12 +22,12 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/* Inspire de PDF_Label
/* Inspired by PDF_Label
* PDF_Label - PDF label editing
* @package PDF_Label
* @author Laurent PASSEBECQ <lpasseb@numericable.fr>
* @copyright 2003 Laurent PASSEBECQ
* disponible ici : http://www.fpdf.org/fr/script/script29.php
* available here : http://www.fpdf.org/fr/script/script29.php
*/
//-------------------------------------------------------------------
@@ -60,7 +60,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
/**
* Class to generate stick sheet with format Avery or other personalised
* Class to generate stick sheet with format Avery or other personalised format
*/
abstract class CommonStickerGenerator extends CommonDocGenerator
{
@@ -70,50 +70,104 @@ abstract class CommonStickerGenerator extends CommonDocGenerator
public $db;
/**
* @var string
* @var string Code of format
*/
public $code; // Code of format
public $code;
// phpcs:disable PEAR.NamingConventions.ValidVariableName.PublicUnderscore
// protected
// Name of stick
protected $_Avery_Name = '';
// Code of stick
protected $_Avery_Code = '';
// Marge de gauche de l'etiquette
protected $_Margin_Left = 0;
// marge en haut de la page avant la premiere etiquette
protected $_Margin_Top = 0;
// Espace horizontal entre 2 bandes d'etiquettes
protected $_X_Space = 0;
// Espace vertical entre 2 bandes d'etiquettes
protected $_Y_Space = 0;
// NX Nombre d'etiquettes sur la largeur de la page
protected $_X_Number = 0;
// NY Number of labels on the height of a page
protected $_Y_Number = 0;
// width of label
protected $_Width = 0;
// Height of label
protected $_Height = 0;
// Height of characters
protected $_Char_Size = 10;
// Height by default of a line
protected $_Line_Height = 10;
// Type of metric.. Will help to calculate good values
protected $_Metric = 'mm';
// Type of metric for the doc..
protected $_Metric_Doc = 'mm';
protected $_COUNTX = 1;
protected $_COUNTY = 1;
protected $_First = 1;
/**
* @var ?array{name:string,paper-size:'custom'|array{0:float,1:float},orientation:string,metric:string,marginLeft:float,marginTop:float,NX:int,NY:int,SpaceX:float,SpaceY:float,width:float,height:float,font-size:int,custom_x:float,custom_y:float}
* @var string Name of the label sheet
*/
protected $_Avery_Name = '';
/**
* @var string Code of the labal sheet
*/
protected $_Avery_Code = '';
/**
* @var float Left margin of the label
*/
protected $_Margin_Left = 0;
/**
* @var float top margin of the page before the first label
*/
protected $_Margin_Top = 0;
/**
* @var float Horizontal space between 2 columns of labels
*/
protected $_X_Space = 0;
/**
* @var float Vertical space between 2 rows of labels
*/
protected $_Y_Space = 0;
/**
* @var int<0,max> NX Number of labels on the width of the page
*/
protected $_X_Number = 0;
/**
* @var int<0,max> NY Number of labels on the height of a page
*/
protected $_Y_Number = 0;
/**
* @var float Label Width
*/
protected $_Width = 0;
/**
* @var float Label Height
*/
protected $_Height = 0;
/**
* @var float Character Height
*/
protected $_Char_Size = 10;
/**
* @var float Default Height of a line
*/
protected $_Line_Height = 10;
/**
* @var 'in'|'mm' Type of metric.. Will help to calculate good values
*/
protected $_Metric = 'mm';
/**
* @var 'in'|'mm' Type of metric for the doc..
*/
protected $_Metric_Doc = 'mm';
/**
* @var int<0,max>
*/
protected $_COUNTX = 1;
/**
* @var int<0,max>
*/
protected $_COUNTY = 1;
/**
* @var int<0,max>
*/
protected $_First = 1;
/**
* @var ?array{name:string,paper-size:'custom'|array{0:float,1:float},orientation:string,metric:'in'|'mm',marginLeft:float,marginTop:float,NX:int<0,max>,NY:int<0,max>,SpaceX:float,SpaceY:float,width:float,height:float,font-size:int,custom_x:float,custom_y:float}
*/
public $Tformat;
/**
* @var ?array<string,array{name:string,paper-size:'custom'|array{0:float,1:float},orientation:string,metric:string,marginLeft:float,marginTop:float,NX:int,NY:int,SpaceX:float,SpaceY:float,width:float,height:float,font-size:int,custom_x:float,custom_y:float}>
* @var ?array<string,array{name:string,paper-size:'custom'|array{0:float,1:float},orientation:string,metric:'in'|'mm',marginLeft:float,marginTop:float,NX:int<0,max>,NY:int<0,max>,SpaceX:float,SpaceY:float,width:float,height:float,font-size:int,custom_x:float,custom_y:float}>
*/
public $_Avery_Labels;
// phpcs:enable
@@ -181,8 +235,8 @@ abstract class CommonStickerGenerator extends CommonDocGenerator
* @param int $y1 Y1
* @param int $x2 X2
* @param int $y2 Y2
* @param int $epaisseur Epaisseur
* @param int $nbPointilles Nb pointilles
* @param int $epaisseur Thickness
* @param int $nbPointilles Nb of dots
* @return void
*/
protected function _Pointille(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $nbPointilles = 15)
@@ -192,7 +246,7 @@ abstract class CommonStickerGenerator extends CommonDocGenerator
$length = abs($x1 - $x2);
$hauteur = abs($y1 - $y2);
if ($length > $hauteur) {
$Pointilles = ($length / $nbPointilles) / 2; // taille des pointilles
$Pointilles = ($length / $nbPointilles) / 2; // size of the dots
} else {
$Pointilles = ($hauteur / $nbPointilles) / 2;
}
@@ -200,9 +254,9 @@ abstract class CommonStickerGenerator extends CommonDocGenerator
for ($j = $i; $j <= ($i + $Pointilles); $j++) {
if ($j <= ($x2 - 1)) {
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
$pdf->Line($j, $y1, $j + 1, $y1); // on trace le pointill? du haut, point par point
$pdf->Line($j, $y1, $j + 1, $y1); // we trace the top dot, point by point
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
$pdf->Line($j, $y2, $j + 1, $y2); // on trace le pointill? du bas, point par point
$pdf->Line($j, $y2, $j + 1, $y2); // we trace the bottom dot, point by point
}
}
}
@@ -210,9 +264,9 @@ abstract class CommonStickerGenerator extends CommonDocGenerator
for ($j = $i; $j <= ($i + $Pointilles); $j++) {
if ($j <= ($y2 - 1)) {
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
$pdf->Line($x1, $j, $x1, $j + 1); // on trace le pointill? du haut, point par point
$pdf->Line($x1, $j, $x1, $j + 1); // we trace the top dot, point by point
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
$pdf->Line($x2, $j, $x2, $j + 1); // on trace le pointill? du bas, point par point
$pdf->Line($x2, $j, $x2, $j + 1); // we trace the bottom dot, point by point
}
}
}
@@ -221,14 +275,14 @@ abstract class CommonStickerGenerator extends CommonDocGenerator
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
/**
* protected Function realisant une croix aux 4 coins des cartes
* protected Function making a cross at the 4 corners of the labels
*
* @param TCPDF $pdf PDF reference
* @param int $x1 X1
* @param int $y1 Y1
* @param int $x2 X2
* @param int $y2 Y2
* @param float $epaisseur Epaisseur
* @param float $x1 X1
* @param float $y1 Y1
* @param float $x2 X2
* @param float $y2 Y2
* @param float $epaisseur Thickness
* @param int $taille Size
* @return void
*
@@ -241,16 +295,16 @@ abstract class CommonStickerGenerator extends CommonDocGenerator
$pdf->SetLineWidth($epaisseur);
$lg = $taille / 2;
// croix haut gauche
// top left cross
$pdf->Line($x1, $y1 - $lg, $x1, $y1 + $lg);
$pdf->Line($x1 - $lg, $y1, $x1 + $lg, $y1);
// croix bas gauche
// bottom left cross
$pdf->Line($x1, $y2 - $lg, $x1, $y2 + $lg);
$pdf->Line($x1 - $lg, $y2, $x1 + $lg, $y2);
// croix haut droit
// top right cross
$pdf->Line($x2, $y1 - $lg, $x2, $y1 + $lg);
$pdf->Line($x2 - $lg, $y1, $x2 + $lg, $y1);
// croix bas droit
// bottom right cross
$pdf->Line($x2, $y2 - $lg, $x2, $y2 + $lg);
$pdf->Line($x2 - $lg, $y2, $x2 + $lg, $y2);
@@ -262,8 +316,8 @@ abstract class CommonStickerGenerator extends CommonDocGenerator
* $src and $dest must be 'in' or 'mm'
*
* @param float $value value
* @param string $src from ('in' or 'mm')
* @param string $dest to ('in' or 'mm')
* @param 'in'|'mm' $src from ('in' or 'mm')
* @param 'in'|'mm' $dest to ('in' or 'mm')
* @return float value value after conversion
*/
private function convertMetric($value, $src, $dest)
@@ -305,7 +359,7 @@ abstract class CommonStickerGenerator extends CommonDocGenerator
* protected Set format
*
* @param TCPDF $pdf PDF reference
* @param array{metric:string,name:string,code?:string,marginLeft:float,marginTop:float,SpaceX:float,SpaceY:float,NX:int,NY:int,width:float,height:float,font-size:int} $format Format
* @param array{metric:'in'|'mm',name:string,code?:string,marginLeft:float,marginTop:float,SpaceX:float,SpaceY:float,NX:int<0,max>,NY:int<0,max>,width:float,height:float,font-size:int} $format Format
* @return void
*/
protected function _Set_Format(&$pdf, $format)

View File

@@ -158,6 +158,9 @@ function getMultidirOutput($object, $module = '', $forobject = 0, $mode = 'outpu
} elseif ($module == 'recruitmentcandidature') {
$module = 'recruitment';
$subdirectory = '/recruitmentcandidature';
} elseif ($module == 'knowledgerecord') {
$module = 'knowledgemanagement';
$subdirectory = '/knowledgerecord';
}
// Get the relative path of directory

View File

@@ -151,26 +151,24 @@ if (empty($reshook)) {
if ($result >= 0) {
// Define output language
if (!getDolGlobalString('MAIN_DISABLE_PDF_AUTOUPDATE')) {
if (method_exists($object, 'generateDocument')) {
$outputlangs = $langs;
$newlang = '';
if (getDolGlobalInt('MAIN_MULTILANGS') && GETPOST('lang_id', 'aZ09')) {
$newlang = GETPOST('lang_id', 'aZ09');
}
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) {
$newlang = $object->thirdparty->default_lang;
}
if (!empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
$model = $object->model_pdf;
$ret = $object->fetch($id); // Reload to get new records
$hidedetails = 0;
$hidedesc = 0;
$hideref = 0;
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
$outputlangs = $langs;
$newlang = '';
if (getDolGlobalInt('MAIN_MULTILANGS') && GETPOST('lang_id', 'aZ09')) {
$newlang = GETPOST('lang_id', 'aZ09');
}
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) {
$newlang = $object->thirdparty->default_lang;
}
if (!empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
$model = $object->model_pdf;
$ret = $object->fetch($id); // Reload to get new records
$hidedetails = 0;
$hidedesc = 0;
$hideref = 0;
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
}
header("Location: ".$_SERVER["PHP_SELF"].'?id='.$object->id);

View File

@@ -4,7 +4,7 @@
* Copyright (C) 2004-2019 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
*
@@ -95,6 +95,15 @@ if (isModEnabled('mrp') && $conf->use_javascript_ajax) {
$colorseries = array();
$vals = array();
/**
* @var string $badgeStatus0
* @var string $badgeStatus1
* @var string $badgeStatus4
* @var string $badgeStatus5
* @var string $badgeStatus6
* @var string $badgeStatus8
* @var string $badgeStatus9
*/
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
while ($i < $num) {

View File

@@ -151,28 +151,26 @@ if (empty($reshook)) {
if ($result >= 0) {
// Define output language
if (!getDolGlobalString('MAIN_DISABLE_PDF_AUTOUPDATE')) {
if (method_exists($object, 'generateDocument')) {
$outputlangs = $langs;
$newlang = '';
if (getDolGlobalInt('MAIN_MULTILANGS') /* && empty($newlang) */ && GETPOST('lang_id', 'aZ09')) {
$newlang = GETPOST('lang_id', 'aZ09');
}
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) {
$newlang = $object->thirdparty->default_lang;
}
if (!empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
$outputlangs = $langs;
$newlang = '';
if (getDolGlobalInt('MAIN_MULTILANGS') /* && empty($newlang) */ && GETPOST('lang_id', 'aZ09')) {
$newlang = GETPOST('lang_id', 'aZ09');
}
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) {
$newlang = $object->thirdparty->default_lang;
}
if (!empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
$ret = $object->fetch($id); // Reload to get new records
$ret = $object->fetch($id); // Reload to get new records
$model = $object->model_pdf;
$model = $object->model_pdf;
$retgen = $object->generateDocument($model, $outputlangs, 0, 0, 0);
if ($retgen < 0) {
setEventMessages($object->error, $object->errors, 'warnings');
}
$retgen = $object->generateDocument($model, $outputlangs, 0, 0, 0);
if ($retgen < 0) {
setEventMessages($object->error, $object->errors, 'warnings');
}
}
} else {
@@ -183,28 +181,26 @@ if (empty($reshook)) {
if ($result >= 0) {
// Define output language
if (!getDolGlobalString('MAIN_DISABLE_PDF_AUTOUPDATE')) {
if (method_exists($object, 'generateDocument')) {
$outputlangs = $langs;
$newlang = '';
if (getDolGlobalInt('MAIN_MULTILANGS') /* && empty($newlang) */ && GETPOST('lang_id', 'aZ09')) {
$newlang = GETPOST('lang_id', 'aZ09');
}
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) {
$newlang = $object->thirdparty->default_lang;
}
if (!empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
$outputlangs = $langs;
$newlang = '';
if (getDolGlobalInt('MAIN_MULTILANGS') /* && empty($newlang) */ && GETPOST('lang_id', 'aZ09')) {
$newlang = GETPOST('lang_id', 'aZ09');
}
if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) {
$newlang = $object->thirdparty->default_lang;
}
if (!empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
$ret = $object->fetch($id); // Reload to get new records
$ret = $object->fetch($id); // Reload to get new records
$model = $object->model_pdf;
$model = $object->model_pdf;
$retgen = $object->generateDocument($model, $outputlangs, 0, 0, 0);
if ($retgen < 0) {
setEventMessages($object->error, $object->errors, 'warnings');
}
$retgen = $object->generateDocument($model, $outputlangs, 0, 0, 0);
if ($retgen < 0) {
setEventMessages($object->error, $object->errors, 'warnings');
}
}
} else {

View File

@@ -97,6 +97,16 @@ if ($conf->use_javascript_ajax) {
$sql .= " ORDER BY t.status ASC";
$resql = $db->query($sql);
/**
* @var string $badgeStatus0
* @var string $badgeStatus1
* @var string $badgeStatus4
* @var string $badgeStatus5
* @var string $badgeStatus6
* @var string $badgeStatus8
* @var string $badgeStatus9
*/
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
@@ -106,7 +116,6 @@ if ($conf->use_javascript_ajax) {
$colorseries = array();
$vals = array();
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
while ($i < $num) {
$obj = $db->fetch_object($resql);
@@ -145,22 +154,20 @@ if ($conf->use_javascript_ajax) {
print "</tr>\n";
}
}
if ($conf->use_javascript_ajax) {
print '<tr><td class="center" colspan="2">';
print '<tr><td class="center" colspan="2">';
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
$dolgraph = new DolGraph();
$dolgraph->SetData($dataseries);
$dolgraph->SetDataColor(array_values($colorseries));
$dolgraph->setShowLegend(2);
$dolgraph->setShowPercent(1);
$dolgraph->SetType(array('pie'));
$dolgraph->SetHeight('200');
$dolgraph->draw('idgraphstatus');
print $dolgraph->show($totalnb ? 0 : 1);
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
$dolgraph = new DolGraph();
$dolgraph->SetData($dataseries);
$dolgraph->SetDataColor(array_values($colorseries));
$dolgraph->setShowLegend(2);
$dolgraph->setShowPercent(1);
$dolgraph->SetType(array('pie'));
$dolgraph->SetHeight('200');
$dolgraph->draw('idgraphstatus');
print $dolgraph->show($totalnb ? 0 : 1);
print '</td></tr>';
}
print '</td></tr>';
print "</table>";
print "</div>";
@@ -184,8 +191,6 @@ if ($conf->use_javascript_ajax) {
$colorseries = array();
$vals = array();
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
while ($i < $num) {
$obj = $db->fetch_object($resql);
if ($obj) {
@@ -229,22 +234,20 @@ if ($conf->use_javascript_ajax) {
print "</tr>\n";
}
}
if ($conf->use_javascript_ajax) {
print '<tr><td class="center" colspan="2">';
print '<tr><td class="center" colspan="2">';
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
$dolgraph = new DolGraph();
$dolgraph->SetData($dataseries);
$dolgraph->SetDataColor(array_values($colorseries));
$dolgraph->setShowLegend(2);
$dolgraph->setShowPercent(1);
$dolgraph->SetType(array('pie'));
$dolgraph->SetHeight('200');
$dolgraph->draw('idgraphstatuscandidature');
print $dolgraph->show($totalnb ? 0 : 1);
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
$dolgraph = new DolGraph();
$dolgraph->SetData($dataseries);
$dolgraph->SetDataColor(array_values($colorseries));
$dolgraph->setShowLegend(2);
$dolgraph->setShowPercent(1);
$dolgraph->SetType(array('pie'));
$dolgraph->SetHeight('200');
$dolgraph->draw('idgraphstatuscandidature');
print $dolgraph->show($totalnb ? 0 : 1);
print '</td></tr>';
}
print '</td></tr>';
print "</table>";
print "</div>";
@@ -258,8 +261,7 @@ print '<br>';
/* BEGIN MODULEBUILDER DRAFT MYOBJECT
// Draft MyObject
if (isModEnabled('recruitment') && $user->rights->recruitment->read)
{
if (isModEnabled('recruitment') && $user->rights->recruitment->read) {
$langs->load("orders");
$sql = "SELECT c.rowid, c.ref, c.ref_client, c.total_ht, c.total_tva, c.total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas";

View File

@@ -492,9 +492,7 @@ if (empty($reshook)) {
if ($id > 0) {
if (isModEnabled('category')) {
$categories = GETPOST('categories', 'array');
if (method_exists($object, 'setCategories')) {
$object->setCategories($categories);
}
$object->setCategories($categories);
}
if (!$error) {
$db->commit();

View File

@@ -4,7 +4,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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
@@ -115,6 +115,15 @@ if ($resql) {
}
$db->free($resql);
/**
* @var string $badgeStatus0
* @var string $badgeStatus1
* @var string $badgeStatus4
* @var string $badgeStatus5
* @var string $badgeStatus6
* @var string $badgeStatus8
* @var string $badgeStatus9
*/
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
print '<div class="div-table-responsive-no-min">';

View File

@@ -112,6 +112,7 @@ $param_shownb = 'DOLUSERCOOKIE_ticket_by_status_shownb';
$param_showtot = 'DOLUSERCOOKIE_ticket_by_status_showtot';
$autosetarray = preg_split("/[,;:]+/", GETPOST('DOL_AUTOSET_COOKIE'));
$showtot = 0;
$shownb = 0;
if (in_array('DOLUSERCOOKIE_ticket_by_status', $autosetarray)) {
$endyear = GETPOSTINT($param_year);
$shownb = GETPOST($param_shownb, 'alpha');
@@ -218,6 +219,16 @@ if ($result) {
}
}
/**
* @var string $badgeStatus0
* @var string $badgeStatus1
* @var string $badgeStatus3
* @var string $badgeStatus4
* @var string $badgeStatus5
* @var string $badgeStatus6
* @var string $badgeStatus8
* @var string $badgeStatus9
*/
include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; // This define $badgeStatusX
$colorseries = array();