diff --git a/ChangeLog b/ChangeLog index 27494cab5fd..15d7856881a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,7 @@ Fix: Localtaxes balance not showing Fix: Intervention box links to contracts id Fix: Compatiblity with multicompany module Fix: Edit propal line was losing product supplier price id +Fix: Delete linked element to supplier invoice when deleted ***** ChangeLog for 3.4 compared to 3.3.* ***** For users: @@ -79,6 +80,7 @@ For users: - Fix: [Bug #958] LocalTax2 for Spain fails on Suppliers - Fix: [ bug #972 ] Auto completion contact field do not take account the min caract number before search - Fix: [ bug #971 ] html.form.class.php select_contact with autocomplete do not exclude id from exclude array +- Fix: Expedition creation, can retreive product from other expedition For translators: - Update language files. diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 888dd6c5eb0..90b1b89d1a5 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -224,6 +224,7 @@ class Expedition extends CommonObject $sql.= ", ".(!empty($this->model_pdf)?"'".$this->db->escape($this->model_pdf)."'":"null"); $sql.= ")"; + dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -323,6 +324,7 @@ class Expedition extends CommonObject $sql.= ", ".$qty; $sql.= ")"; + dol_syslog(get_class($this)."::create_line sql=".$sql, LOG_DEBUG); if (! $this->db->query($sql)) { $error++; diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index d761480a74f..a5ec2e016c6 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -87,6 +87,8 @@ if ($id > 0 || ! empty($ref)) if ($action == 'add') { $error=0; + + $object = new Expedition($db); $db->begin(); 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 diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index 540cbebea12..b15695aa653 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -168,6 +168,8 @@ if (GETPOST("search_montant_ttc")) $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit+1, $offset); + +dol_syslog("fourn/facture/index.php::list sql=".$sql, LOG_DEBUG); $resql = $db->query($sql); if ($resql) {