From cb86cd403ca9493cb0fa7e265fa9e9ebdce98784 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Tue, 3 Sep 2013 20:01:10 +0200 Subject: [PATCH] Fix: Delete linked element to supplier invoice when deleted (as done for all other object into dolibarr) --- ChangeLog | 1 + htdocs/fourn/class/fournisseur.facture.class.php | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index efdc41b902a..80eabc9a8fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,7 @@ Fix: Mailing module : if an email is already in destinaires list all other email Fix: Localtaxes balance not showing Fix: Intervention box links to contracts id Fix: Compatiblity with multicompany module +Fix: Delete linked element to supplier invoice when deleted ***** ChangeLog for 3.4 compared to 3.3.* ***** For users: diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 19912e3f58f..be2ce721356 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -629,6 +629,13 @@ class FactureFournisseur extends CommonInvoice // Fin appel triggers } + if (! $error) + { + // Delete linked object + $res = $this->deleteObjectLinked(); + if ($res < 0) $error++; + } + if (! $error) { // We remove directory