mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Merge pull request #15256 from frederic34/patch-8
Update fichinter.class.php
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015-2020 Charlene Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -635,10 +635,6 @@ class Fichinter extends CommonObject
|
||||
$this->statut = 1;
|
||||
$this->brouillon = 0;
|
||||
$this->date_validation = $now;
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
} else {
|
||||
@@ -970,14 +966,13 @@ class Fichinter extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
$main = MAIN_DB_PREFIX.'fichinterdet';
|
||||
$ef = $main."_extrafields";
|
||||
$sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_fichinter = ".$this->id.")";
|
||||
if (!$error) {
|
||||
$main = MAIN_DB_PREFIX.'fichinterdet';
|
||||
$ef = $main."_extrafields";
|
||||
$sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_fichinter = ".$this->id.")";
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) $error++;
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) $error++;
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
|
||||
Reference in New Issue
Block a user