diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 6a3d7918ac3..8fe381d35c0 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1408,6 +1408,16 @@ class CommandeFournisseur extends CommonOrder dol_syslog(get_class($this)."::deleteline sql=".$sql); if ($resql) { + // Appel des triggers + include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; + $result = 0; + $interface=new Interfaces($this->db); + $result = $interface->run_triggers('LINEORDER_SUPPLIER_DELETE',$this,$user,$langs,$conf); + if ($result < 0) { + $error++; $this->errors=$interface->errors; + } + // Fin appel triggers + $result=$this->update_price(); return 0; } diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 060d2d51a83..42f3f3cf7e0 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1259,18 +1259,6 @@ class FactureFournisseur extends CommonInvoice $error=0; $this->db->begin(); - if (! $error && ! $notrigger) - { - // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); - $interface=new Interfaces($this->db); - $result=$interface->run_triggers('LINEBILL_SUPPLIER_DELETE',$this,$user,$langs,$conf); - if ($result < 0) { - $error++; $this->errors=$interface->errors; - } - // Fin appel triggers - } - if (! $error) { // Supprime ligne @@ -1285,6 +1273,19 @@ class FactureFournisseur extends CommonInvoice dol_syslog(get_class($this)."::delete ".$this->error, LOG_ERR); } } + + if (! $error && ! $notrigger) + { + // Appel des triggers + include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + $interface=new Interfaces($this->db); + $result=$interface->run_triggers('LINEBILL_SUPPLIER_DELETE',$this,$user,$langs,$conf); + if ($result < 0) { + $error++; $this->errors=$interface->errors; + } + // Fin appel triggers + } + if (! $error) { diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 214fc41770b..ffa72ecf9ac 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -1583,7 +1583,7 @@ elseif (! empty($object->id)) // Edit line if ($action != 'edit_line' || $_GET['rowid'] != $line->id) { - print ''; + print ''; // Show product and description print ''; @@ -1634,6 +1634,13 @@ elseif (! empty($object->id)) } print ''.price($line->total_ht).''; + + if (is_object($hookmanager)) + { + $parameters=array('line'=>$line,'num'=>$num,'i'=>$i); + $reshook=$hookmanager->executeHooks('printObjectLine',$parameters,$object,$action); + } + if ($object->statut == 0 && $user->rights->fournisseur->commande->creer) { print 'id.'#'.$line->id.'">'; diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 073ea94b40e..3722ceaac51 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -1941,7 +1941,7 @@ else } else // Affichage simple de la ligne { - print ''; + print ''; // Show product and description print ''; @@ -1996,7 +1996,13 @@ else print ''.price($object->lines[$i]->total_ht).''; print ''.price($object->lines[$i]->total_ttc).''; - + + if (is_object($hookmanager)) + { + $parameters=array('line'=>$object->lines[$i],'num'=>$num,'i'=>$i); + $reshook=$hookmanager->executeHooks('printObjectLine',$parameters,$object,$action); + } + print ''; if ($object->statut == 0) print 'lines[$i]->rowid.'">'.img_edit().''; else print ' '; diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index b0ad7dd35c6..a4d7ad03c06 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -522,6 +522,12 @@ if ($id || $ref) print $productfourn->fourn_unitcharges?price($productfourn->fourn_unitcharges) : ($productfourn->fourn_qty?price($productfourn->fourn_charges/$productfourn->fourn_qty):" "); print ''; } + + if (is_object($hookmanager)) + { + $parameters=array('id_pfp'=>$productfourn->product_fourn_price_id,'id_fourn'=>$id_fourn,'prod_id'=>$product->id); + $reshook=$hookmanager->executeHooks('printObjectLine',$parameters,$object,$action); + } // Modify-Remove print '';