mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-09 19:18:22 +01:00
Fix warning
This commit is contained in:
@@ -34,6 +34,8 @@
|
|||||||
* $type, $text, $description, $line
|
* $type, $text, $description, $line
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/** var ObjectLine $line */
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php';
|
||||||
|
|
||||||
// Protection to avoid direct call of template
|
// Protection to avoid direct call of template
|
||||||
|
|||||||
@@ -1035,6 +1035,10 @@ class FactureRec extends CommonInvoice
|
|||||||
$this->error = $this->db->lasterror();
|
$this->error = $this->db->lasterror();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$this->error = 'Recurring Invoice is suspended. adding lines not allowed.';
|
||||||
|
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -813,7 +813,6 @@ class Form
|
|||||||
{
|
{
|
||||||
global $conf, $langs, $hookmanager;
|
global $conf, $langs, $hookmanager;
|
||||||
|
|
||||||
|
|
||||||
$disabled = 0;
|
$disabled = 0;
|
||||||
$ret = '<div class="centpercent center">';
|
$ret = '<div class="centpercent center">';
|
||||||
$ret .= '<select class="flat' . (empty($conf->use_javascript_ajax) ? '' : ' hideobject') . ' ' . $name . ' ' . $name . 'select valignmiddle alignstart" id="' . $name . '" name="' . $name . '"' . ($disabled ? ' disabled="disabled"' : '') . '>';
|
$ret .= '<select class="flat' . (empty($conf->use_javascript_ajax) ? '' : ' hideobject') . ' ' . $name . ' ' . $name . 'select valignmiddle alignstart" id="' . $name . '" name="' . $name . '"' . ($disabled ? ' disabled="disabled"' : '') . '>';
|
||||||
|
|||||||
@@ -782,7 +782,7 @@ class FormOther
|
|||||||
*
|
*
|
||||||
* @param string $color String with hex (FFFFFF) or comma RGB ('255,255,255')
|
* @param string $color String with hex (FFFFFF) or comma RGB ('255,255,255')
|
||||||
* @param string $textifnotdefined Text to show if color not defined
|
* @param string $textifnotdefined Text to show if color not defined
|
||||||
* @return string HTML code for color thumb
|
* @return void
|
||||||
* @see selectColor()
|
* @see selectColor()
|
||||||
*/
|
*/
|
||||||
public static function showColor($color, $textifnotdefined = '')
|
public static function showColor($color, $textifnotdefined = '')
|
||||||
@@ -1091,7 +1091,7 @@ class FormOther
|
|||||||
* @param string $option Option
|
* @param string $option Option
|
||||||
* @param string $morecss More CSS
|
* @param string $morecss More CSS
|
||||||
* @param bool $addjscombo Add js combo
|
* @param bool $addjscombo Add js combo
|
||||||
* @return string
|
* @return void
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
public function select_year($selected = '', $htmlname = 'yearid', $useempty = 0, $min_year = 10, $max_year = 5, $offset = 0, $invert = 0, $option = '', $morecss = 'valignmiddle maxwidth75imp', $addjscombo = false)
|
public function select_year($selected = '', $htmlname = 'yearid', $useempty = 0, $min_year = 10, $max_year = 5, $offset = 0, $invert = 0, $option = '', $morecss = 'valignmiddle maxwidth75imp', $addjscombo = false)
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ function SendErrorNode($number, $text)
|
|||||||
} else {
|
} else {
|
||||||
echo '<Error number="'.$number.'" />';
|
echo '<Error number="'.$number.'" />';
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1181,7 +1181,7 @@ class pdf_standard_asset extends ModelePDFAsset
|
|||||||
* @param int $hidedetails Do not show line details
|
* @param int $hidedetails Do not show line details
|
||||||
* @param int $hidedesc Do not show desc
|
* @param int $hidedesc Do not show desc
|
||||||
* @param int $hideref Do not show ref
|
* @param int $hideref Do not show ref
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -706,6 +706,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
protected function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
protected function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||||
|
|||||||
@@ -927,6 +927,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
*/
|
*/
|
||||||
protected function drawPaymentsTable(&$pdf, $object, $posy, $outputlangs)
|
protected function drawPaymentsTable(&$pdf, $object, $posy, $outputlangs)
|
||||||
{
|
{
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1733,7 +1734,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||||||
* @param int $hidedetails Do not show line details
|
* @param int $hidedetails Do not show line details
|
||||||
* @param int $hidedesc Do not show desc
|
* @param int $hidedesc Do not show desc
|
||||||
* @param int $hideref Do not show ref
|
* @param int $hideref Do not show ref
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -933,7 +933,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
|
|||||||
* @param int $hidedetails Do not show line details
|
* @param int $hidedetails Do not show line details
|
||||||
* @param int $hidedesc Do not show desc
|
* @param int $hidedesc Do not show desc
|
||||||
* @param int $hideref Do not show ref
|
* @param int $hideref Do not show ref
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1236,7 +1236,7 @@ class pdf_espadon extends ModelePdfExpedition
|
|||||||
* @param int $hidedetails Do not show line details
|
* @param int $hidedetails Do not show line details
|
||||||
* @param int $hidedesc Do not show desc
|
* @param int $hidedesc Do not show desc
|
||||||
* @param int $hideref Do not show ref
|
* @param int $hideref Do not show ref
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ class ExportCsvIso extends ExportCsv
|
|||||||
global $conf;
|
global $conf;
|
||||||
$conf->global->EXPORT_CSV_FORCE_CHARSET = 'ISO-8859-1';
|
$conf->global->EXPORT_CSV_FORCE_CHARSET = 'ISO-8859-1';
|
||||||
|
|
||||||
parent::write_title($array_export_fields_label, $array_selected_sorted, $outputlangs, $array_types);
|
return parent::write_title($array_export_fields_label, $array_selected_sorted, $outputlangs, $array_types);
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
@@ -96,6 +96,6 @@ class ExportCsvIso extends ExportCsv
|
|||||||
global $conf;
|
global $conf;
|
||||||
$conf->global->EXPORT_CSV_FORCE_CHARSET = 'ISO-8859-1';
|
$conf->global->EXPORT_CSV_FORCE_CHARSET = 'ISO-8859-1';
|
||||||
|
|
||||||
parent::write_record($array_selected_sorted, $objp, $outputlangs, $array_types);
|
return parent::write_record($array_selected_sorted, $objp, $outputlangs, $array_types);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ class ExportCsvUtf8 extends ExportCsv
|
|||||||
global $conf;
|
global $conf;
|
||||||
$conf->global->EXPORT_CSV_FORCE_CHARSET = 'UTF-8';
|
$conf->global->EXPORT_CSV_FORCE_CHARSET = 'UTF-8';
|
||||||
|
|
||||||
parent::write_title($array_export_fields_label, $array_selected_sorted, $outputlangs, $array_types);
|
return parent::write_title($array_export_fields_label, $array_selected_sorted, $outputlangs, $array_types);
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
@@ -94,6 +94,6 @@ class ExportCsvUtf8 extends ExportCsv
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$conf->global->EXPORT_CSV_FORCE_CHARSET = 'UTF-8';
|
$conf->global->EXPORT_CSV_FORCE_CHARSET = 'UTF-8';
|
||||||
parent::write_record($array_selected_sorted, $objp, $outputlangs, $array_types);
|
return parent::write_record($array_selected_sorted, $objp, $outputlangs, $array_types);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2448,7 +2448,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
* @param int $hidedetails Do not show line details
|
* @param int $hidedetails Do not show line details
|
||||||
* @param int $hidedesc Do not show desc
|
* @param int $hidedesc Do not show desc
|
||||||
* @param int $hideref Do not show ref
|
* @param int $hideref Do not show ref
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -341,6 +341,7 @@ class ImportXlsx extends ModeleImports
|
|||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
$this->workbook->disconnectWorksheets();
|
$this->workbook->disconnectWorksheets();
|
||||||
unset($this->workbook);
|
unset($this->workbook);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -713,6 +713,7 @@ class pdf_vinci extends ModelePDFMo
|
|||||||
protected function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
protected function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||||
@@ -1365,7 +1366,7 @@ class pdf_vinci extends ModelePDFMo
|
|||||||
* @param int $hidedetails Do not show line details
|
* @param int $hidedetails Do not show line details
|
||||||
* @param int $hidedesc Do not show desc
|
* @param int $hidedesc Do not show desc
|
||||||
* @param int $hideref Do not show ref
|
* @param int $hideref Do not show ref
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -903,6 +903,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
protected function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
protected function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||||
|
|||||||
@@ -1875,7 +1875,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||||||
* @param int $hidedetails Do not show line details
|
* @param int $hidedetails Do not show line details
|
||||||
* @param int $hidedesc Do not show desc
|
* @param int $hidedesc Do not show desc
|
||||||
* @param int $hideref Do not show ref
|
* @param int $hideref Do not show ref
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1448,7 +1448,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes
|
|||||||
* @param int $hidedetails Do not show line details
|
* @param int $hidedetails Do not show line details
|
||||||
* @param int $hidedesc Do not show desc
|
* @param int $hidedesc Do not show desc
|
||||||
* @param int $hideref Do not show ref
|
* @param int $hideref Do not show ref
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -870,6 +870,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||||||
protected function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
protected function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||||
@@ -1497,7 +1498,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
|||||||
* @param int $hidedetails Do not show line details
|
* @param int $hidedetails Do not show line details
|
||||||
* @param int $hidedesc Do not show desc
|
* @param int $hidedesc Do not show desc
|
||||||
* @param int $hideref Do not show ref
|
* @param int $hideref Do not show ref
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -752,6 +752,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
protected function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
protected function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||||
|
|||||||
@@ -739,6 +739,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
protected function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
protected function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||||
|
|||||||
@@ -1591,6 +1591,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$result = $this->call_trigger('ORDER_SUPPLIER_CREATE', $user);
|
$result = $this->call_trigger('ORDER_SUPPLIER_CREATE', $user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
// End call triggers
|
// End call triggers
|
||||||
@@ -1601,12 +1602,18 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
} else {
|
} else {
|
||||||
$this->error = $this->db->lasterror();
|
$this->error = $this->db->lasterror();
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
|
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$this->error = 'Failed to get ID of inserted line';
|
||||||
|
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->error = $this->db->lasterror();
|
$this->error = $this->db->lasterror();
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1031,6 +1031,10 @@ class FactureFournisseurRec extends CommonInvoice
|
|||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$this->error = 'Recurring Invoice is suspended. adding lines not allowed.';
|
||||||
|
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3881,6 +3881,8 @@ class User extends CommonObject
|
|||||||
} else {
|
} else {
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user