Update fournisseur.facture.class.php
This commit is contained in:
parent
d4a8718e6c
commit
ae519a1009
@ -3128,7 +3128,7 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
*/
|
*/
|
||||||
public function delete($notrigger = 0)
|
public function delete($notrigger = 0)
|
||||||
{
|
{
|
||||||
global $user;
|
global $user, $conf;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::deleteline rowid=".$this->id, LOG_DEBUG);
|
dol_syslog(get_class($this)."::deleteline rowid=".$this->id, LOG_DEBUG);
|
||||||
|
|
||||||
@ -3144,6 +3144,17 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
|
|
||||||
$this->deleteObjectLinked();
|
$this->deleteObjectLinked();
|
||||||
|
|
||||||
|
// Remove extrafields
|
||||||
|
if ((! $error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) // For avoid conflicts if trigger used
|
||||||
|
{
|
||||||
|
$result=$this->deleteExtraFields();
|
||||||
|
if ($result < 0)
|
||||||
|
{
|
||||||
|
$error++;
|
||||||
|
dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
// Supprime ligne
|
// Supprime ligne
|
||||||
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn_det ';
|
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn_det ';
|
||||||
@ -3156,17 +3167,6 @@ class SupplierInvoiceLine extends CommonObjectLine
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove extrafields
|
|
||||||
if ((! $error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) // For avoid conflicts if trigger used
|
|
||||||
{
|
|
||||||
$result=$this->deleteExtraFields();
|
|
||||||
if ($result < 0)
|
|
||||||
{
|
|
||||||
$error++;
|
|
||||||
dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$error)
|
if (!$error)
|
||||||
{
|
{
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user