diff --git a/COPYRIGHT b/COPYRIGHT
index e4bd78e7bbf..3c7cb5bf1cf 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -18,6 +18,7 @@ CKEditor 4.3.3 LGPL-2.1+ Yes
FPDI 1.5.2 Apache Software License 2.0 Yes PDF templates management
GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package)
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
+PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
odtPHP 1.0.1 GPL-2+ b Yes Library to build/edit ODT files
PHPExcel 1.8.0 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
php-iban 1.4.6 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
diff --git a/htdocs/comm/askpricesupplier/card.php b/htdocs/comm/askpricesupplier/card.php
index 3a3b283f8e9..3e6abe98b2d 100644
--- a/htdocs/comm/askpricesupplier/card.php
+++ b/htdocs/comm/askpricesupplier/card.php
@@ -1730,6 +1730,9 @@ if ($action == 'create')
/*
* Action presend
*/
+ if (!empty(GETPOST('modelselected'))) {
+ $action = 'presend';
+ }
if ($action == 'presend')
{
$object->fetch_projet();
@@ -1802,6 +1805,7 @@ if ($action == 'create')
// Tableau des parametres complementaires
$formmail->param['action'] = 'send';
$formmail->param['models'] = 'askpricesupplier_send';
+ $formmail->param['models_id']=GETPOST('modelmailselected','int');
$formmail->param['id'] = $object->id;
$formmail->param['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id;
// Init list of files
diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index f0a4b6f1f79..e6876637dcf 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -2307,6 +2307,10 @@ if ($action == 'create')
/*
* Action presend
*/
+ //Select mail models is same action as presend
+ if (!empty(GETPOST('modelselected'))) {
+ $action = 'presend';
+ }
if ($action == 'presend')
{
$object->fetch_projet();
@@ -2401,6 +2405,7 @@ if ($action == 'create')
// Tableau des parametres complementaires
$formmail->param['action'] = 'send';
$formmail->param['models'] = 'propal_send';
+ $formmail->param['models_id']=GETPOST('modelmailselected','int');
$formmail->param['id'] = $object->id;
$formmail->param['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id;
// Init list of files
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 294445705ed..0ffb3807467 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -2396,6 +2396,7 @@ if ($action == 'create' && $user->rights->commande->creer)
// Tableau des parametres complementaires
$formmail->param['action'] = 'send';
$formmail->param['models'] = 'order_send';
+ $formmail->param['models_id']=GETPOST('modelmailselected','int');
$formmail->param['orderid'] = $object->id;
$formmail->param['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id;
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 4d8ed6007e3..169e499b619 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -3733,6 +3733,10 @@ if ($action == 'create')
}
print '
';
+ //Select mail models is same action as presend
+ if (!empty(GETPOST('modelselected'))) {
+ $action = 'presend';
+ }
if ($action != 'prerelance' && $action != 'presend')
{
print '