forked from Dolibarr/dolibarr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Qual: Fix phan notices Fix phan notices up to htdocs\core\ajax\selectsearchbox.php.
- Loading branch information
Showing
23 changed files
with
93 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
* Copyright (C) 2015-2017 Ferran Marcet <[email protected]> | ||
* Copyright (C) 2024 Alexandre Spangaro <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -212,7 +213,13 @@ | |
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'?id='.$id.'">'; | ||
print '<input type="hidden" name="token" value="'.newToken().'">'; | ||
|
||
$documentstatic = null; | ||
$documentstaticline = null; | ||
$sql_select = ''; | ||
$doc_number = ''; | ||
$dateprint = ''; | ||
$tables_from = ''; | ||
$where = ''; | ||
if ($type_element == 'fichinter') { // Customer : show products from invoices | ||
require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; | ||
$documentstatic = new Fichinter($db); | ||
|
@@ -318,6 +325,8 @@ | |
} | ||
|
||
$parameters = array(); | ||
$totalnboflines = 0; | ||
$sql = ''; | ||
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook | ||
|
||
if (!empty($sql_select)) { | ||
|
@@ -343,7 +352,7 @@ | |
// if ($type_element != 'fichinter') $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON d.fk_product = p.rowid '; | ||
$sql .= $where; | ||
$sql .= dolSqlDateFilter($dateprint, 0, $month, $year); | ||
if ($sref) { | ||
if ($sref && !empty($doc_number)) { | ||
$sql .= " AND ".$doc_number." LIKE '%".$db->escape($sref)."%'"; | ||
} | ||
if ($sprod_fulldescr) { | ||
|
@@ -386,7 +395,7 @@ | |
|
||
$total_qty = 0; | ||
$num = 0; | ||
if ($sql_select) { | ||
if ($sql_select && $documentstatic !== null) { | ||
$resql = $db->query($sql); | ||
if (!$resql) { | ||
dol_print_error($db); | ||
|
@@ -584,7 +593,7 @@ | |
} | ||
} else { | ||
if ($objp->fk_product > 0) { | ||
echo $form->textwithtooltip($text, $description, 3, '', '', $i, 0, ''); | ||
echo $form->textwithtooltip($text, $description, 3, 0, '', $i, 0, ''); | ||
|
||
// Show range | ||
echo get_date_range($objp->date_start, $objp->date_end); | ||
|
@@ -603,7 +612,7 @@ | |
|
||
if (!empty($objp->label)) { | ||
$text .= ' <strong>'.$objp->label.'</strong>'; | ||
echo $form->textwithtooltip($text, dol_htmlentitiesbr($objp->description), 3, '', '', $i, 0, ''); | ||
echo $form->textwithtooltip($text, dol_htmlentitiesbr($objp->description), 3, 0, '', $i, 0, ''); | ||
} else { | ||
echo $text.' '.dol_htmlentitiesbr($objp->description); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
* Copyright (C) 2017 Ferran Marcet <[email protected]> | ||
* Copyright (C) 2024 Alexandre Spangaro <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -181,7 +182,7 @@ | |
$morehtmlref .= $object->ref; | ||
} else { | ||
$morehtmlref .= $form->editfieldkey("", 'ref', $object->ref, $object, $user->hasRight('contrat', 'creer'), 'string', '', 0, 3); | ||
$morehtmlref .= $form->editfieldval("", 'ref', $object->ref, $object, $user->hasRight('contrat', 'creer'), 'string', '', 0, 2); | ||
$morehtmlref .= $form->editfieldval("", 'ref', $object->ref, $object, $user->hasRight('contrat', 'creer'), 'string', null, 0, 2); | ||
} | ||
|
||
$permtoedit = 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
* Copyright (C) 2015 Marcos García <[email protected]> | ||
* Copyright (C) 2024 Alexandre Spangaro <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -177,7 +178,7 @@ | |
$morehtmlref .= $object->ref; | ||
} else { | ||
$morehtmlref .= $form->editfieldkey("", 'ref', $object->ref, $object, $user->hasRight('contrat', 'creer'), 'string', '', 0, 3); | ||
$morehtmlref .= $form->editfieldval("", 'ref', $object->ref, $object, $user->hasRight('contrat', 'creer'), 'string', '', 0, 2); | ||
$morehtmlref .= $form->editfieldval("", 'ref', $object->ref, $object, $user->hasRight('contrat', 'creer'), 'string', '', null, 2); | ||
} | ||
|
||
$permtoedit = 0; | ||
|
Oops, something went wrong.