diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 37afb5f9621..e998f909d06 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1041,7 +1041,7 @@ if (empty($reshook)) if (!$error) { - $result = $object->insertExtraFields('SUPPLIER_PROPOSAL_MODIFY'); + $result = $object->insertExtraFields('PROPOSAL_SUPPLIER_MODIFY'); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -1433,7 +1433,7 @@ if ($action == 'create') require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; $notify = new Notify($db); $text .= '
'; - $text .= $notify->confirmMessage('SUPPLIER_PROPOSAL_VALIDATE', $object->socid, $object); + $text .= $notify->confirmMessage('PROPOSAL_SUPPLIER_VALIDATE', $object->socid, $object); } if (!$error) diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 97e3b12b92f..6f41426ee80 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -1481,7 +1481,7 @@ class SupplierProposal extends CommonObject if (! $error && ! $notrigger) { // Call trigger - $result=$this->call_trigger('SUPPLIER_PROPOSAL_VALIDATE', $user); + $result = $this->call_trigger('PROPOSAL_SUPPLIER_VALIDATE', $user); if ($result < 0) { $error++; } // End call triggers } @@ -1683,7 +1683,7 @@ class SupplierProposal extends CommonObject if (! $notrigger) { // Call trigger - $result=$this->call_trigger('SUPPLIER_PROPOSAL_REOPEN', $user); + $result = $this->call_trigger('PROPOSAL_SUPPLIER_REOPEN', $user); if ($result < 0) { $error++; } // End call triggers } @@ -1736,13 +1736,13 @@ class SupplierProposal extends CommonObject $resql=$this->db->query($sql); if ($resql) { - $modelpdf=$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED?$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED:$this->modelpdf; - $triggerName = 'SUPPLIER_PROPOSAL_CLOSE_REFUSED'; + $modelpdf = $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED ? $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED : $this->modelpdf; + $triggerName = 'PROPOSAL_SUPPLIER_CLOSE_REFUSED'; if ($status == 2) { - $triggerName='SUPPLIER_PROPOSAL_CLOSE_SIGNED'; - $modelpdf=$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL?$conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL:$this->modelpdf; + $triggerName = 'PROPOSAL_SUPPLIER_CLOSE_SIGNED'; + $modelpdf = $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL ? $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL : $this->modelpdf; if (! empty($conf->global->SUPPLIER_PROPOSAL_UPDATE_PRICE_ON_SUPPlIER_PROPOSAL)) // TODO This option was not tested correctly. Error if product ref does not exists { @@ -1751,7 +1751,7 @@ class SupplierProposal extends CommonObject } if ($status == 4) { - $triggerName='SUPPLIER_PROPOSAL_CLASSIFY_BILLED'; + $triggerName = 'PROPOSAL_SUPPLIER_CLASSIFY_BILLED'; } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) @@ -1916,7 +1916,7 @@ class SupplierProposal extends CommonObject if (!$error) { // Call trigger - $result=$this->call_trigger('SUPPLIER_PROPOSAL_UNVALIDATE', $user); + $result = $this->call_trigger('PROPOSAL_SUPPLIER_UNVALIDATE', $user); if ($result < 0) $error++; } @@ -2034,7 +2034,7 @@ class SupplierProposal extends CommonObject if (! $notrigger) { // Call trigger - $result=$this->call_trigger('SUPPLIER_PROPOSAL_DELETE', $user); + $result = $this->call_trigger('PROPOSAL_SUPPLIER_DELETE', $user); if ($result < 0) { $error++; } // End call triggers }