Skip to content
Snippets Groups Projects
Commit ae6b0975 authored by Laurent Destailleur's avatar Laurent Destailleur Committed by GitHub
Browse files

Merge pull request #7057 from atm-john/FIX_linked_element_facture_rec

FIX delete linked element on facture rec
parents 3a6314b1 93477c10
Branches
Tags
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.
Please register or to comment