Fix warnings
This commit is contained in:
parent
7ad5a89a16
commit
6e403e6ce0
@ -1099,7 +1099,7 @@ class Propal extends CommonObject
|
|||||||
if ($this->id)
|
if ($this->id)
|
||||||
{
|
{
|
||||||
$this->ref = '(PROV'.$this->id.')';
|
$this->ref = '(PROV'.$this->id.')';
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX."propal SET ref='".$this->db->escape($this->ref)."' WHERE rowid=".$this->id;
|
$sql = 'UPDATE '.MAIN_DB_PREFIX."propal SET ref='".$this->db->escape($this->ref)."' WHERE rowid=".((int) $this->id);
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
@ -1111,7 +1111,7 @@ class Propal extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add object linked
|
// Add object linked
|
||||||
if (!$error && $this->id && is_array($this->linked_objects) && !empty($this->linked_objects))
|
if (!$error && $this->id && !empty($this->linked_objects) && is_array($this->linked_objects))
|
||||||
{
|
{
|
||||||
foreach ($this->linked_objects as $origin => $tmp_origin_id)
|
foreach ($this->linked_objects as $origin => $tmp_origin_id)
|
||||||
{
|
{
|
||||||
@ -3753,7 +3753,10 @@ class PropaleLigne extends CommonObjectLine
|
|||||||
public $product_type = Product::TYPE_PRODUCT;
|
public $product_type = Product::TYPE_PRODUCT;
|
||||||
|
|
||||||
public $qty;
|
public $qty;
|
||||||
|
|
||||||
public $tva_tx;
|
public $tva_tx;
|
||||||
|
public $vat_src_code;
|
||||||
|
|
||||||
public $subprice;
|
public $subprice;
|
||||||
public $remise_percent;
|
public $remise_percent;
|
||||||
public $fk_remise_except;
|
public $fk_remise_except;
|
||||||
@ -3805,6 +3808,11 @@ class PropaleLigne extends CommonObjectLine
|
|||||||
* @see $product_label
|
* @see $product_label
|
||||||
*/
|
*/
|
||||||
public $libelle;
|
public $libelle;
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
* @see $product_label
|
||||||
|
*/
|
||||||
|
public $label;
|
||||||
/**
|
/**
|
||||||
* Product label
|
* Product label
|
||||||
* @var string
|
* @var string
|
||||||
|
|||||||
@ -3161,7 +3161,7 @@ abstract class CommonObject
|
|||||||
$this->multicurrency_total_ttc += isset($this->revenuestamp) ? ($this->revenuestamp * $multicurrency_tx) : 0;
|
$this->multicurrency_total_ttc += isset($this->revenuestamp) ? ($this->revenuestamp * $multicurrency_tx) : 0;
|
||||||
|
|
||||||
// Situations totals
|
// Situations totals
|
||||||
if ($this->situation_cycle_ref && $this->situation_counter > 1 && method_exists($this, 'get_prev_sits') && $this->type != $this::TYPE_CREDIT_NOTE)
|
if (!empty($this->situation_cycle_ref) && $this->situation_counter > 1 && method_exists($this, 'get_prev_sits') && $this->type != $this::TYPE_CREDIT_NOTE)
|
||||||
{
|
{
|
||||||
$prev_sits = $this->get_prev_sits();
|
$prev_sits = $this->get_prev_sits();
|
||||||
|
|
||||||
|
|||||||
@ -190,11 +190,11 @@ class PropalTest extends PHPUnit\Framework\TestCase
|
|||||||
$langs=$this->savlangs;
|
$langs=$this->savlangs;
|
||||||
$db=$this->savdb;
|
$db=$this->savdb;
|
||||||
|
|
||||||
$localobject->note_private='New note private after update';
|
$localobject->note_private = 'New note private after update';
|
||||||
$result=$localobject->update($user);
|
$result = $localobject->update($user);
|
||||||
|
|
||||||
$this->assertLessThan($result, 0);
|
$this->assertLessThan($result, 0);
|
||||||
print __METHOD__." id=".$id." result=".$result."\n";
|
print __METHOD__." id=".$localobject->id." result=".$result."\n";
|
||||||
return $localobject;
|
return $localobject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user