forked from Wavyzz/dolibarr
Fix warning
This commit is contained in:
@@ -34,6 +34,8 @@
|
||||
* $type, $text, $description, $line
|
||||
*/
|
||||
|
||||
/** var ObjectLine $line */
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php';
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
|
||||
@@ -1035,6 +1035,10 @@ class FactureRec extends CommonInvoice
|
||||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
$this->error = 'Recurring Invoice is suspended. adding lines not allowed.';
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -802,18 +802,17 @@ class Form
|
||||
/**
|
||||
* Generate select HTML to choose massaction
|
||||
*
|
||||
* @param string $selected Value auto selected when at least one record is selected. Not a preselected value. Use '0' by default.
|
||||
* @param array $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action.
|
||||
* @param int $alwaysvisible 1=select button always visible
|
||||
* @param string $name Name for massaction
|
||||
* @param string $cssclass CSS class used to check for select
|
||||
* @return string|void Select list
|
||||
* @param string $selected Value auto selected when at least one record is selected. Not a preselected value. Use '0' by default.
|
||||
* @param array $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action.
|
||||
* @param int $alwaysvisible 1=select button always visible
|
||||
* @param string $name Name for massaction
|
||||
* @param string $cssclass CSS class used to check for select
|
||||
* @return string|void Select list
|
||||
*/
|
||||
public function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0, $name = 'massaction', $cssclass = 'checkforselect')
|
||||
{
|
||||
global $conf, $langs, $hookmanager;
|
||||
|
||||
|
||||
$disabled = 0;
|
||||
$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"' : '') . '>';
|
||||
|
||||
@@ -782,7 +782,7 @@ class FormOther
|
||||
*
|
||||
* @param string $color String with hex (FFFFFF) or comma RGB ('255,255,255')
|
||||
* @param string $textifnotdefined Text to show if color not defined
|
||||
* @return string HTML code for color thumb
|
||||
* @return void
|
||||
* @see selectColor()
|
||||
*/
|
||||
public static function showColor($color, $textifnotdefined = '')
|
||||
@@ -1091,7 +1091,7 @@ class FormOther
|
||||
* @param string $option Option
|
||||
* @param string $morecss More CSS
|
||||
* @param bool $addjscombo Add js combo
|
||||
* @return string
|
||||
* @return void
|
||||
* @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)
|
||||
|
||||
@@ -127,6 +127,7 @@ function SendErrorNode($number, $text)
|
||||
} else {
|
||||
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 $hidedesc Do not show desc
|
||||
* @param int $hideref Do not show ref
|
||||
* @return null
|
||||
* @return void
|
||||
*/
|
||||
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)
|
||||
{
|
||||
// phpcs:enable
|
||||
return 1;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
|
||||
@@ -927,6 +927,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
*/
|
||||
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 $hidedesc Do not show desc
|
||||
* @param int $hideref Do not show ref
|
||||
* @return null
|
||||
* @return void
|
||||
*/
|
||||
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 $hidedesc Do not show desc
|
||||
* @param int $hideref Do not show ref
|
||||
* @return null
|
||||
* @return void
|
||||
*/
|
||||
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 $hidedesc Do not show desc
|
||||
* @param int $hideref Do not show ref
|
||||
* @return null
|
||||
* @return void
|
||||
*/
|
||||
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
|
||||
@@ -78,7 +78,7 @@ class ExportCsvIso extends ExportCsv
|
||||
global $conf;
|
||||
$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
|
||||
@@ -96,6 +96,6 @@ class ExportCsvIso extends ExportCsv
|
||||
global $conf;
|
||||
$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;
|
||||
$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
|
||||
@@ -94,6 +94,6 @@ class ExportCsvUtf8 extends ExportCsv
|
||||
global $conf;
|
||||
|
||||
$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 $hidedesc Do not show desc
|
||||
* @param int $hideref Do not show ref
|
||||
* @return null
|
||||
* @return void
|
||||
*/
|
||||
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
|
||||
@@ -341,6 +341,7 @@ class ImportXlsx extends ModeleImports
|
||||
// phpcs:enable
|
||||
$this->workbook->disconnectWorksheets();
|
||||
unset($this->workbook);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -713,6 +713,7 @@ class pdf_vinci extends ModelePDFMo
|
||||
protected function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
return 1;
|
||||
}
|
||||
|
||||
// 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 $hidedesc Do not show desc
|
||||
* @param int $hideref Do not show ref
|
||||
* @return null
|
||||
* @return void
|
||||
*/
|
||||
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)
|
||||
{
|
||||
// phpcs:enable
|
||||
return 1;
|
||||
}
|
||||
|
||||
// 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 $hidedesc Do not show desc
|
||||
* @param int $hideref Do not show ref
|
||||
* @return null
|
||||
* @return void
|
||||
*/
|
||||
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 $hidedesc Do not show desc
|
||||
* @param int $hideref Do not show ref
|
||||
* @return null
|
||||
* @return void
|
||||
*/
|
||||
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)
|
||||
{
|
||||
// phpcs:enable
|
||||
return 1;
|
||||
}
|
||||
|
||||
// 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 $hidedesc Do not show desc
|
||||
* @param int $hideref Do not show ref
|
||||
* @return null
|
||||
* @return void
|
||||
*/
|
||||
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)
|
||||
{
|
||||
// phpcs:enable
|
||||
return 1;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
|
||||
@@ -739,6 +739,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
protected function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
|
||||
{
|
||||
// phpcs:enable
|
||||
return 1;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
|
||||
@@ -1591,6 +1591,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$result = $this->call_trigger('ORDER_SUPPLIER_CREATE', $user);
|
||||
if ($result < 0) {
|
||||
$this->db->rollback();
|
||||
|
||||
return -1;
|
||||
}
|
||||
// End call triggers
|
||||
@@ -1601,12 +1602,18 @@ class CommandeFournisseur extends CommonOrder
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
$this->db->rollback();
|
||||
|
||||
return -2;
|
||||
}
|
||||
} else {
|
||||
$this->error = 'Failed to get ID of inserted line';
|
||||
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
$this->db->rollback();
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -847,29 +847,29 @@ class FactureFournisseurRec extends CommonInvoice
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a line to recursive supplier invoice
|
||||
* Add a line to recursive supplier invoice
|
||||
*
|
||||
* @param int $fk_product Product/Service ID predefined
|
||||
* @param string $ref Ref
|
||||
* @param string $label Label
|
||||
* @param string $desc Description de la ligne
|
||||
* @param double $pu_ht Unit price
|
||||
* @param double $pu_ttc Unit price with tax
|
||||
* @param double $qty Quantity
|
||||
* @param int $remise_percent Percentage discount of the line
|
||||
* @param double $txtva Taux de tva force, sinon -1
|
||||
* @param int $txlocaltax1 Local tax 1 rate (deprecated)
|
||||
* @param int $txlocaltax2 Local tax 2 rate (deprecated)
|
||||
* @param string $price_base_type HT or TTC
|
||||
* @param int $type Type of line (0=product, 1=service)
|
||||
* @param int $date_start Date start
|
||||
* @param int $date_end Date end
|
||||
* @param int $info_bits VAT npr or not ?
|
||||
* @param int $special_code Special code
|
||||
* @param int $rang Position of line
|
||||
* @param string $fk_unit Unit
|
||||
* @param int $pu_ht_devise Unit price in currency
|
||||
* @return int <0 if KO, Id of line if OK
|
||||
* @param int $fk_product Product/Service ID predefined
|
||||
* @param string $ref Ref
|
||||
* @param string $label Label
|
||||
* @param string $desc Description de la ligne
|
||||
* @param double $pu_ht Unit price
|
||||
* @param double $pu_ttc Unit price with tax
|
||||
* @param double $qty Quantity
|
||||
* @param int $remise_percent Percentage discount of the line
|
||||
* @param double $txtva Taux de tva force, sinon -1
|
||||
* @param int $txlocaltax1 Local tax 1 rate (deprecated)
|
||||
* @param int $txlocaltax2 Local tax 2 rate (deprecated)
|
||||
* @param string $price_base_type HT or TTC
|
||||
* @param int $type Type of line (0=product, 1=service)
|
||||
* @param int $date_start Date start
|
||||
* @param int $date_end Date end
|
||||
* @param int $info_bits VAT npr or not ?
|
||||
* @param int $special_code Special code
|
||||
* @param int $rang Position of line
|
||||
* @param string $fk_unit Unit
|
||||
* @param int $pu_ht_devise Unit price in currency
|
||||
* @return int <0 if KO, Id of line if OK
|
||||
* @throws Exception
|
||||
*/
|
||||
public function addline($fk_product, $ref, $label, $desc, $pu_ht, $pu_ttc, $qty, $remise_percent, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $price_base_type = 'HT', $type = 0, $date_start = 0, $date_end = 0, $info_bits = 0, $special_code = 0, $rang = -1, $fk_unit = null, $pu_ht_devise = 0)
|
||||
@@ -1031,6 +1031,10 @@ class FactureFournisseurRec extends CommonInvoice
|
||||
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
$this->error = 'Recurring Invoice is suspended. adding lines not allowed.';
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3881,6 +3881,8 @@ class User extends CommonObject
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user