Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0

Conflicts:
	htdocs/contact/class/contact.class.php
	htdocs/societe/card.php
This commit is contained in:
Laurent Destailleur 2018-03-12 19:02:30 +01:00
commit 55d3e72463
4 changed files with 25 additions and 12 deletions

View File

@ -1081,9 +1081,10 @@ class Contact extends CommonObject
* @param int $maxlen Max length of * @param int $maxlen Max length of
* @param string $moreparam Add more param into URL * @param string $moreparam Add more param into URL
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @param int $notooltip 1=Disable tooltip
* @return string String with URL * @return string String with URL
*/ */
function getNomUrl($withpicto=0, $option='', $maxlen=0, $moreparam='', $save_lastsearch_value=-1) function getNomUrl($withpicto=0, $option='', $maxlen=0, $moreparam='', $save_lastsearch_value=-1, $notooltip=0)
{ {
global $conf, $langs, $hookmanager; global $conf, $langs, $hookmanager;
@ -1115,13 +1116,16 @@ class Contact extends CommonObject
$linkstart = '<a href="'.$url.'"'; $linkstart = '<a href="'.$url.'"';
$linkclose=""; $linkclose="";
if (empty($notooltip)) {
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{ {
$label=$langs->trans("ShowContact"); $label=$langs->trans("ShowContact");
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"'; $linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
} }
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
$linkclose.= ' class="classfortooltip">'; $linkclose.= ' class="classfortooltip"';
}
$linkclose.='>';
if (! is_object($hookmanager)) if (! is_object($hookmanager))
{ {

View File

@ -289,11 +289,11 @@ class mailing_advthirdparties extends MailingTargets
if ($type=='thirdparty') { if ($type=='thirdparty') {
$companystatic=new Societe($this->db); $companystatic=new Societe($this->db);
$companystatic->fetch($id); $companystatic->fetch($id);
return $companystatic->getNomUrl(0); return $companystatic->getNomUrl(0, '', 0, 1);
} elseif ($type=='contact') { } elseif ($type=='contact') {
$contactstatic=new Contact($this->db); $contactstatic=new Contact($this->db);
$contactstatic->fetch($id); $contactstatic->fetch($id);
return $contactstatic->getNomUrl(0); return $contactstatic->getNomUrl(0, '', 0, '', -1, 0);
} }
} }

View File

@ -158,6 +158,8 @@ if ($action == 'order' && isset($_POST['valid']))
$line->total_ttc = $line->total_ht + $line->total_tva; $line->total_ttc = $line->total_ht + $line->total_tva;
$line->remise_percent = $obj->remise_percent; $line->remise_percent = $obj->remise_percent;
$line->ref_fourn = $obj->ref_fourn; $line->ref_fourn = $obj->ref_fourn;
$line->type = $product->type;
$line->fk_unit = $product->fk_unit;
$suppliers[$obj->fk_soc]['lines'][] = $line; $suppliers[$obj->fk_soc]['lines'][] = $line;
} }
} }
@ -202,7 +204,13 @@ if ($action == 'order' && isset($_POST['valid']))
$line->remise_percent, $line->remise_percent,
'HT', 'HT',
0, 0,
$line->info_bits $line->type,
0,
false,
null,
null,
0,
$line->fk_unit
); );
} }
if ($result < 0) { if ($result < 0) {

View File

@ -10,6 +10,7 @@
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by