diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php
index f0354cba285..4dc5221cea3 100644
--- a/htdocs/comm/action/card.php
+++ b/htdocs/comm/action/card.php
@@ -2400,6 +2400,20 @@ if ($id > 0) {
print '';
}
+ //mail information
+ if (!empty($object->email_msgid)) {
+ print '
| '.$langs->trans("Description").' | ';
print dol_string_onlythesehtmltags(dol_htmlentitiesbr($object->note_private));
diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index cae98408d44..fa29b8187fb 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -79,6 +79,7 @@ $cancel = GETPOST('cancel', 'alpha');
$origin = GETPOST('origin', 'alpha');
$originid = GETPOST('originid', 'int');
$confirm = GETPOST('confirm', 'alpha');
+$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
$lineid = GETPOST('lineid', 'int');
$contactid = GETPOST('contactid', 'int');
$projectid = GETPOST('projectid', 'int');
@@ -1774,6 +1775,7 @@ if ($action == 'create') {
print '';
@@ -2476,6 +2479,7 @@ if ($action == 'create') {
print '';
@@ -2836,6 +2840,7 @@ if ($action == 'create') {
+
';
diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php
index 47e178292eb..40e8fe385d7 100644
--- a/htdocs/comm/propal/class/propal.class.php
+++ b/htdocs/comm/propal/class/propal.class.php
@@ -3708,6 +3708,7 @@ class Propal extends CommonObject
global $conf, $langs, $user;
$datas = [];
+ $nofetch = !empty($params['nofetch']);
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
return ['optimize' => $langs->trans("Proposal")];
@@ -3720,9 +3721,25 @@ class Propal extends CommonObject
if (!empty($this->ref)) {
$datas['ref'] = ' '.$langs->trans('Ref').': '.$this->ref;
}
+ if (!$nofetch) {
+ $langs->load('companies');
+ if (empty($this->thirdparty)) {
+ $this->fetch_thirdparty();
+ }
+ $datas['customer'] = ' '.$langs->trans('Customer').': '.$this->thirdparty->getNomUrl(1, '', 0, 1);
+ }
if (!empty($this->ref_client)) {
$datas['refcustomer'] = ' '.$langs->trans('RefCustomer').': '.$this->ref_client;
}
+ if (!$nofetch) {
+ $langs->load('project');
+ if (empty($this->project)) {
+ $res = $this->fetch_project();
+ if ($res > 0) {
+ $datas['project'] = ' '.$langs->trans('Project').': '.$this->project->getNomUrl(1, '', 0, 1);
+ }
+ }
+ }
if (!empty($this->total_ht)) {
$datas['amountht'] = ' '.$langs->trans('AmountHT').': '.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency);
}
@@ -3767,6 +3784,7 @@ class Propal extends CommonObject
'id' => $this->id,
'objecttype' => $this->element,
'option' => $option,
+ 'nofetch' => 1,
];
$classfortooltip = 'classfortooltip';
$dataparams = '';
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index b58a74ae67a..318ce32f115 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -84,6 +84,8 @@ $socid = GETPOST('socid', 'int');
$action = GETPOST('action', 'aZ09');
$cancel = GETPOST('cancel', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
+$backtopage = GETPOST('backtopage', 'alpha');
+
$lineid = GETPOST('lineid', 'int');
$contactid = GETPOST('contactid', 'int');
$projectid = GETPOST('projectid', 'int');
@@ -1755,6 +1757,7 @@ if ($action == 'create' && $usercancreate) {
print '';
print '';
print '';
+ print '';
if (!empty($currency_tx)) {
print '';
}
@@ -2449,6 +2452,7 @@ if ($action == 'create' && $usercancreate) {
print '';
@@ -2470,6 +2474,7 @@ if ($action == 'create' && $usercancreate) {
print '';
@@ -2763,7 +2768,9 @@ if ($action == 'create' && $usercancreate) {
- ';
+
+
+ ';
if (!empty($conf->use_javascript_ajax) && $object->statut == Commande::STATUS_DRAFT) {
include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
@@ -2991,7 +2998,7 @@ if ($action == 'create' && $usercancreate) {
// Presend form
$modelmail = 'order_send';
$defaulttopic = 'SendOrderRef';
- $diroutput = $conf->commande->multidir_output[$object->entity];
+ $diroutput = getMultidirOutput($object);
$trackid = 'ord'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index 6348d8e1325..2b11588b854 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -3728,6 +3728,7 @@ class Commande extends CommonOrder
global $conf, $langs, $user;
$datas = [];
+ $nofetch = !empty($params['nofetch']);
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
return ['optimize' => $langs->trans("Order")];
@@ -3739,7 +3740,23 @@ class Commande extends CommonOrder
$datas[] = ' '.$this->getLibStatut(5);
}
$datas['Ref'] = ' '.$langs->trans('Ref').': '.$this->ref;
+ if (!$nofetch) {
+ $langs->load('companies');
+ if (empty($this->thirdparty)) {
+ $this->fetch_thirdparty();
+ }
+ $datas['customer'] = ' '.$langs->trans('Customer').': '.$this->thirdparty->getNomUrl(1, '', 0, 1);
+ }
$datas['RefCustomer'] = ' '.$langs->trans('RefCustomer').': '.(empty($this->ref_customer) ? (empty($this->ref_client) ? '' : $this->ref_client) : $this->ref_customer);
+ if (!$nofetch) {
+ $langs->load('project');
+ if (empty($this->project)) {
+ $res = $this->fetch_project();
+ if ($res > 0) {
+ $datas['project'] = ' '.$langs->trans('Project').': '.$this->project->getNomUrl(1, '', 0, 1);
+ }
+ }
+ }
if (!empty($this->total_ht)) {
$datas['AmountHT'] = ' '.$langs->trans('AmountHT').': '.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency);
}
@@ -3811,6 +3828,7 @@ class Commande extends CommonOrder
'id' => $this->id,
'objecttype' => $this->element,
'option' => $option,
+ 'nofetch' => 1,
];
$classfortooltip = 'classfortooltip';
$dataparams = '';
@@ -3960,6 +3978,7 @@ class Commande extends CommonOrder
$this->id = 0;
$this->ref = 'SPECIMEN';
$this->specimen = 1;
+ $this->entity = $conf->entity;
$this->socid = 1;
$this->date = time();
$this->date_lim_reglement = $this->date + 3600 * 24 * 30;
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index e8e92ebfada..58c7e35724d 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -86,6 +86,8 @@ $socid = GETPOST('socid', 'int');
$action = GETPOST('action', 'aZ09');
$confirm = GETPOST('confirm', 'alpha');
$cancel = GETPOST('cancel', 'alpha');
+$backtopage = GETPOST('backtopage', 'alpha');
+
$lineid = GETPOST('lineid', 'int');
$userid = GETPOST('userid', 'int');
$search_ref = GETPOST('sf_ref', 'alpha') ? GETPOST('sf_ref', 'alpha') : GETPOST('search_ref', 'alpha');
@@ -3153,6 +3155,8 @@ if ($action == 'create') {
if ($soc->id > 0) {
print ''."\n";
}
+ print '';
+ print '';
print '';
print '';
print '';
@@ -4688,6 +4692,7 @@ if ($action == 'create') {
print '';
@@ -4717,6 +4722,7 @@ if ($action == 'create') {
print '';
@@ -4832,6 +4839,7 @@ if ($action == 'create') {
print '';
print '';
print '';
+ print '';
print $formother->select_revenue_stamp('', 'revenuestamp_type', $mysoc->country_code);
print ' → ';
print ' ';
@@ -5371,6 +5379,7 @@ if ($action == 'create') {
print '';
print '';
print '';
+ print '';
print '';
@@ -5409,6 +5418,7 @@ if ($action == 'create') {
+
';
if (!empty($conf->use_javascript_ajax) && $object->statut == 0) {
diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index 2817cfc406a..7e5b4d482d0 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -56,6 +56,7 @@ $langs->loadLangs(array("contracts", "orders", "companies", "bills", "products",
$action = GETPOST('action', 'aZ09');
$confirm = GETPOST('confirm', 'alpha');
$cancel = GETPOST('cancel', 'alpha');
+$backtopage = GETPOST('backtopage', 'alpha');
$socid = GETPOST('socid', 'int');
$id = GETPOST('id', 'int');
@@ -1135,10 +1136,10 @@ if ($action == 'create') {
print ' |