Merge pull request #24381 from frederic34/expedition_tooltip
fix shipping ajax tooltip
This commit is contained in:
commit
b7b85d185f
@ -79,7 +79,7 @@ top_httphead();
|
|||||||
$html = '';
|
$html = '';
|
||||||
|
|
||||||
if (is_object($object)) {
|
if (is_object($object)) {
|
||||||
if ($object->id > 0) {
|
if ($object->id > 0 || !empty($object->ref)) {
|
||||||
$html = $object->getTooltipContent($params);
|
$html = $object->getTooltipContent($params);
|
||||||
} elseif ($res == 0) {
|
} elseif ($res == 0) {
|
||||||
$html = $langs->trans('Deleted');
|
$html = $langs->trans('Deleted');
|
||||||
|
|||||||
@ -11285,6 +11285,11 @@ function getElementProperties($element_type)
|
|||||||
$subelement = 'commande';
|
$subelement = 'commande';
|
||||||
} elseif ($element_type == 'propal') {
|
} elseif ($element_type == 'propal') {
|
||||||
$classpath = 'comm/propal/class';
|
$classpath = 'comm/propal/class';
|
||||||
|
} elseif ($element_type == 'shipping') {
|
||||||
|
$classpath = 'expedition/class';
|
||||||
|
$classfile = 'expedition';
|
||||||
|
$classname = 'Expedition';
|
||||||
|
$module = 'expedition';
|
||||||
} elseif ($element_type == 'supplier_proposal') {
|
} elseif ($element_type == 'supplier_proposal') {
|
||||||
$classpath = 'supplier_proposal/class';
|
$classpath = 'supplier_proposal/class';
|
||||||
$module = 'supplier_proposal';
|
$module = 'supplier_proposal';
|
||||||
@ -11323,6 +11328,10 @@ function getElementProperties($element_type)
|
|||||||
$classpath = 'comm/propal/class';
|
$classpath = 'comm/propal/class';
|
||||||
$module = 'propal';
|
$module = 'propal';
|
||||||
$subelement = 'propaleligne';
|
$subelement = 'propaleligne';
|
||||||
|
} elseif ($element_type == 'opensurvey_sondage') {
|
||||||
|
$classpath = 'opensurvey/class';
|
||||||
|
$module = 'opensurvey';
|
||||||
|
$subelement = 'opensurveysondage';
|
||||||
} elseif ($element_type == 'order_supplier') {
|
} elseif ($element_type == 'order_supplier') {
|
||||||
$classpath = 'fourn/class';
|
$classpath = 'fourn/class';
|
||||||
$module = 'fournisseur';
|
$module = 'fournisseur';
|
||||||
@ -11340,7 +11349,7 @@ function getElementProperties($element_type)
|
|||||||
} elseif ($element_type == "service") {
|
} elseif ($element_type == "service") {
|
||||||
$classpath = 'product/class';
|
$classpath = 'product/class';
|
||||||
$subelement = 'product';
|
$subelement = 'product';
|
||||||
} elseif ($objecttype == 'salary') {
|
} elseif ($element_type == 'salary') {
|
||||||
$classpath = 'salaries/class';
|
$classpath = 'salaries/class';
|
||||||
$module = 'salaries';
|
$module = 'salaries';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1834,7 +1834,8 @@ class Expedition extends CommonObject
|
|||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
$langs->load('shipping');
|
$langs->load('sendings');
|
||||||
|
|
||||||
$nofetch = !empty($params['nofetch']);
|
$nofetch = !empty($params['nofetch']);
|
||||||
|
|
||||||
$datas = array();
|
$datas = array();
|
||||||
@ -1844,6 +1845,13 @@ class Expedition extends CommonObject
|
|||||||
}
|
}
|
||||||
$datas['ref'] = '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
$datas['ref'] = '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||||
$datas['refcustomer'] = '<br><b>'.$langs->trans('RefCustomer').':</b> '.($this->ref_customer ? $this->ref_customer : $this->ref_client);
|
$datas['refcustomer'] = '<br><b>'.$langs->trans('RefCustomer').':</b> '.($this->ref_customer ? $this->ref_customer : $this->ref_client);
|
||||||
|
if (!$nofetch) {
|
||||||
|
$langs->load('companies');
|
||||||
|
if (empty($this->thirdparty)) {
|
||||||
|
$this->fetch_thirdparty();
|
||||||
|
}
|
||||||
|
$datas['customer'] = '<br><b>'.$langs->trans('Customer').':</b> '.$this->thirdparty->getNomUrl(1, '', 0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
return $datas;
|
return $datas;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user