diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index 2ca1337736e..6d8787b1677 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -557,6 +557,7 @@ if ($id == 25)
if ($conf->fournisseur->enabled) $elementList['order_supplier_send']=$langs->trans('MailToSendSupplierOrder');
if ($conf->fournisseur->enabled) $elementList['invoice_supplier_send']=$langs->trans('MailToSendSupplierInvoice');
if ($conf->societe->enabled) $elementList['thirdparty']=$langs->trans('MailToThirdparty');
+ if ($conf->contrat->enabled) $elementList['contract']=$langs->trans('MailToSendContract');
$parameters=array('elementList'=>$elementList);
$reshook=$hookmanager->executeHooks('emailElementlist',$parameters); // Note that $action and $object may have been modified by some hooks
diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index 3128a7612f5..daae2aa8c36 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -2111,13 +2111,13 @@ else
dol_print_error($db, $object->error, $object->errors);
exit();
}
- $fileparams = dol_most_recent_file($conf->commande->dir_output . '/' . $ref, preg_quote($ref, '/').'[^\-]+');
+ $fileparams = dol_most_recent_file($conf->contrat->dir_output . '/' . $ref, preg_quote($ref, '/').'[^\-]+');
$file = $fileparams['fullname'];
}
print '
';
print '
';
- print load_fiche_titre($langs->trans('SendOrderByMail'));
+ print load_fiche_titre($langs->trans('SendContractByMail'));
dol_fiche_head('');
@@ -2145,9 +2145,9 @@ else
$formmail->withtocc = $liste;
$formmail->withtoccc = $conf->global->MAIN_EMAIL_USECCC;
if (empty($object->ref_client)) {
- $formmail->withtopic = $outputlangs->trans('SendOrderRef', '__ORDERREF__');
+ $formmail->withtopic = $outputlangs->trans('SendContractRef', '__CONTRACTREF__');
} else if (! empty($object->ref_client)) {
- $formmail->withtopic = $outputlangs->trans('SendOrderRef', '__ORDERREF__ (__REFCLIENT__)');
+ $formmail->withtopic = $outputlangs->trans('SendContractRef', '__CONTRACTREF__ (__REFCLIENT__)');
}
$formmail->withfile = 2;
$formmail->withbody = 1;
@@ -2155,7 +2155,7 @@ else
$formmail->withcancel = 1;
// Tableau des substitutions
$formmail->setSubstitFromObject($object);
- $formmail->substit ['__ORDERREF__'] = $object->ref;
+ $formmail->substit ['__CONTRACTREF__'] = $object->ref;
$custcontact = '';
$contactarr = array();
@@ -2165,7 +2165,7 @@ else
{
foreach ($contactarr as $contact)
{
- if ($contact['libelle'] == $langs->trans('TypeContact_commande_external_CUSTOMER')) { // TODO Use code and not label
+ if ($contact['libelle'] == $langs->trans('TypeContact_contract_external_CUSTOMER')) { // TODO Use code and not label
$contactstatic = new Contact($db);
$contactstatic->fetch($contact ['id']);
$custcontact = $contactstatic->getFullName($langs, 1);
@@ -2179,9 +2179,9 @@ else
// Tableau des parametres complementaires
$formmail->param['action'] = 'send';
- $formmail->param['models'] = 'order_send';
+ $formmail->param['models'] = 'contract_send';
$formmail->param['models_id']=GETPOST('modelmailselected','int');
- $formmail->param['orderid'] = $object->id;
+ $formmail->param['contractid'] = $object->id;
$formmail->param['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id;
// Init list of files