Merge pull request #11174 from fappels/clean_10_beta
Clean code and fix phpcs
This commit is contained in:
commit
d10d5554cc
@ -499,7 +499,7 @@ class Commande extends CommonOrder
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::set_draft", LOG_DEBUG);
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
|
|||||||
@ -2532,7 +2532,6 @@ class Facture extends CommonInvoice
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
|
||||||
/**
|
/**
|
||||||
* Set draft status
|
* Set draft status
|
||||||
*
|
*
|
||||||
@ -2549,11 +2548,11 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
if ($this->statut == self::STATUS_DRAFT)
|
if ($this->statut == self::STATUS_DRAFT)
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::set_draft already draft status", LOG_WARNING);
|
dol_syslog(__METHOD__." already draft status", LOG_WARNING);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::set_draft", LOG_DEBUG);
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
|
|||||||
@ -3649,7 +3649,8 @@ abstract class CommonObject
|
|||||||
{
|
{
|
||||||
if (empty($totalToShip)) $totalToShip=0; // Avoid warning because $totalToShip is ''
|
if (empty($totalToShip)) $totalToShip=0; // Avoid warning because $totalToShip is ''
|
||||||
$totalToShip+=$line->qty_shipped; // defined for shipment only
|
$totalToShip+=$line->qty_shipped; // defined for shipment only
|
||||||
}elseif ($line->element == 'commandefournisseurdispatch' && isset($line->qty))
|
}
|
||||||
|
elseif ($line->element == 'commandefournisseurdispatch' && isset($line->qty))
|
||||||
{
|
{
|
||||||
if (empty($totalToShip)) $totalToShip=0;
|
if (empty($totalToShip)) $totalToShip=0;
|
||||||
$totalToShip+=$line->qty; // defined for reception only
|
$totalToShip+=$line->qty; // defined for reception only
|
||||||
|
|||||||
@ -1474,8 +1474,6 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
|
||||||
/**
|
/**
|
||||||
* Set draft status
|
* Set draft status
|
||||||
*
|
*
|
||||||
@ -1492,11 +1490,11 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
|
|
||||||
if ($this->statut == self::STATUS_DRAFT)
|
if ($this->statut == self::STATUS_DRAFT)
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::set_draft already draft status", LOG_WARNING);
|
dol_syslog(__METHOD__." already draft status", LOG_WARNING);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::set_draft", LOG_DEBUG);
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
|
|||||||
@ -1765,8 +1765,6 @@ class Reception extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
|
||||||
/**
|
/**
|
||||||
* Set draft status
|
* Set draft status
|
||||||
*
|
*
|
||||||
@ -1799,7 +1797,7 @@ class Reception extends CommonObject
|
|||||||
$sql.= " SET fk_statut = ".self::STATUS_DRAFT;
|
$sql.= " SET fk_statut = ".self::STATUS_DRAFT;
|
||||||
$sql.= " WHERE rowid = ".$this->id;
|
$sql.= " WHERE rowid = ".$this->id;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::set_draft", LOG_DEBUG);
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
if ($this->db->query($sql))
|
if ($this->db->query($sql))
|
||||||
{
|
{
|
||||||
// If stock increment is done on closing
|
// If stock increment is done on closing
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user