Skip to content
Snippets Groups Projects
Commit 93477c10 authored by John's avatar John
Browse files

FIX delete linked element on facture rec

parent 3a6314b1
No related branches found
No related tags found
No related merge requests found
......@@ -475,7 +475,13 @@ class FactureRec extends CommonInvoice
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."facture_rec WHERE rowid = ".$rowid;
dol_syslog($sql);
if (! $this->db->query($sql))
if ($this->db->query($sql))
{
// Delete linked object
$res = $this->deleteObjectLinked();
if ($res < 0) $error=-3;
}
else
{
$this->error=$this->db->lasterror();
$error=-1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment