';
- $moreforfilter .= $langs->trans('ThirdPartiesOfSaleRepresentative').': ';
- $moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200');
- $moreforfilter .= '
';
- }
// If the user can view prospects other than his'
if ($user->rights->societe->client->voir || $socid)
{
- $moreforfilter .= '';
@@ -574,31 +573,31 @@ if ($resql)
{
print '
';
print '';
- print ' | ';
+ print '';
}
if (!empty($arrayfields['p.ref_client']['checked']))
{
print '
';
print '';
- print ' | ';
+ print '';
}
if (!empty($arrayfields['pr.ref']['checked']))
{
- print '
';
- print '';
- print ' | ';
+ print '
';
+ print '';
+ print ' | ';
}
if (!empty($arrayfields['pr.title']['checked']))
{
- print '
';
- print '';
- print ' | ';
+ print '
';
+ print '';
+ print ' | ';
}
if (!empty($arrayfields['s.nom']['checked']))
{
print '
';
print '';
- print ' | ';
+ print '';
}
if (!empty($arrayfields['s.town']['checked'])) print '
| ';
if (!empty($arrayfields['s.zip']['checked'])) print '
| ';
@@ -766,7 +765,6 @@ if ($resql)
print '
| ';
}
// Extra fields
-////////////
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
// Fields from hook
@@ -785,7 +783,7 @@ if ($resql)
print '
';
print ' | ';
}
- // Date cloture
+ // Date cloture
if (!empty($arrayfields['p.date_cloture']['checked']))
{
print '
';
@@ -941,24 +939,24 @@ if ($resql)
if (!empty($arrayfields['pr.ref']['checked']))
{
- // Project ref
- print ' | ';
- if ($obj->project_id > 0) {
+ // Project ref
+ print ' | ';
+ if ($obj->project_id > 0) {
print $projectstatic->getNomUrl(1);
}
- print ' | ';
- if (!$i) $totalarray['nbfield']++;
+ print '';
+ if (!$i) $totalarray['nbfield']++;
}
if (!empty($arrayfields['pr.title']['checked']))
{
- // Project label
- print '
';
- if ($obj->project_id > 0) {
- print $projectstatic->title;
- }
- print ' | ';
- if (!$i) $totalarray['nbfield']++;
+ // Project label
+ print '
';
+ if ($obj->project_id > 0) {
+ print $projectstatic->title;
+ }
+ print ' | ';
+ if (!$i) $totalarray['nbfield']++;
}
// Thirdparty
@@ -1061,10 +1059,10 @@ if ($resql)
// Amount HT
if (!empty($arrayfields['p.total_ht']['checked']))
{
- print '
'.price($obj->total_ht)." | \n";
- if (!$i) $totalarray['nbfield']++;
- if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht';
- $totalarray['val']['p.total_ht'] += $obj->total_ht;
+ print '
'.price($obj->total_ht)." | \n";
+ if (!$i) $totalarray['nbfield']++;
+ if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht';
+ $totalarray['val']['p.total_ht'] += $obj->total_ht;
}
// Amount VAT
if (!empty($arrayfields['p.total_vat']['checked']))
@@ -1083,42 +1081,42 @@ if ($resql)
$totalarray['val']['p.total_ttc'] += $obj->total_ttc;
}
// Amount invoiced
- if (!empty($arrayfields['p.total_ht_invoiced']['checked']))
- {
- print '
'.price($totalInvoicedHT)." | \n";
- if (!$i) $totalarray['nbfield']++;
- if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht_invoiced';
- $totalarray['val']['p.total_ht_invoiced'] += $totalInvoicedHT;
- }
- // Amount invoiced
- if (!empty($arrayfields['p.total_invoiced']['checked']))
- {
- print '
'.price($totalInvoicedTTC)." | \n";
- if (!$i) $totalarray['nbfield']++;
- if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_invoiced';
- $totalarray['val']['p.total_invoiced'] += $totalInvoicedTTC;
- }
+ if (!empty($arrayfields['p.total_ht_invoiced']['checked']))
+ {
+ print '
'.price($totalInvoicedHT)." | \n";
+ if (!$i) $totalarray['nbfield']++;
+ if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht_invoiced';
+ $totalarray['val']['p.total_ht_invoiced'] += $totalInvoicedHT;
+ }
+ // Amount invoiced
+ if (!empty($arrayfields['p.total_invoiced']['checked']))
+ {
+ print '
'.price($totalInvoicedTTC)." | \n";
+ if (!$i) $totalarray['nbfield']++;
+ if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'p.total_invoiced';
+ $totalarray['val']['p.total_invoiced'] += $totalInvoicedTTC;
+ }
// Currency
if (!empty($arrayfields['p.multicurrency_code']['checked']))
{
- print '
'.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)." | \n";
- if (!$i) $totalarray['nbfield']++;
+ print '
'.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)." | \n";
+ if (!$i) $totalarray['nbfield']++;
}
// Currency rate
if (!empty($arrayfields['p.multicurrency_tx']['checked']))
{
- print '
';
- $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code);
- print " | \n";
- if (!$i) $totalarray['nbfield']++;
+ print '
';
+ $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code);
+ print " | \n";
+ if (!$i) $totalarray['nbfield']++;
}
// Amount HT
if (!empty($arrayfields['p.multicurrency_total_ht']['checked']))
{
- print '
'.price($obj->multicurrency_total_ht)." | \n";
- if (!$i) $totalarray['nbfield']++;
+ print '
'.price($obj->multicurrency_total_ht)." | \n";
+ if (!$i) $totalarray['nbfield']++;
}
// Amount VAT
if (!empty($arrayfields['p.multicurrency_total_vat']['checked']))
@@ -1133,17 +1131,17 @@ if ($resql)
if (!$i) $totalarray['nbfield']++;
}
// Amount invoiced
- if (!empty($arrayfields['p.multicurrency_total_ht_invoiced']['checked']))
- {
- print '
'.price($multicurrency_totalInvoicedHT)." | \n";
- if (!$i) $totalarray['nbfield']++;
- }
- // Amount invoiced
- if (!empty($arrayfields['p.multicurrency_total_invoiced']['checked']))
- {
- print '
'.price($multicurrency_totalInvoicedTTC)." | \n";
- if (!$i) $totalarray['nbfield']++;
- }
+ if (!empty($arrayfields['p.multicurrency_total_ht_invoiced']['checked']))
+ {
+ print '
'.price($multicurrency_totalInvoicedHT)." | \n";
+ if (!$i) $totalarray['nbfield']++;
+ }
+ // Amount invoiced
+ if (!empty($arrayfields['p.multicurrency_total_invoiced']['checked']))
+ {
+ print '
'.price($multicurrency_totalInvoicedTTC)." | \n";
+ if (!$i) $totalarray['nbfield']++;
+ }
$userstatic->id = $obj->fk_user_author;
$userstatic->login = $obj->login;
@@ -1223,7 +1221,7 @@ if ($resql)
print '';
if (!$i) $totalarray['nbfield']++;
}
- // Date cloture
+ // Date cloture
if (!empty($arrayfields['p.date_cloture']['checked']))
{
print '
';
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index ee2ae092420..9a8ade00367 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -52,19 +52,19 @@
class Form
{
/**
- * @var DoliDB Database handler.
- */
- public $db;
+ * @var DoliDB Database handler.
+ */
+ public $db;
/**
* @var string Error code (or message)
*/
public $error = '';
- /**
- * @var string[] Array of error strings
- */
- public $errors = array();
+ /**
+ * @var string[] Array of error strings
+ */
+ public $errors = array();
public $num;
@@ -103,8 +103,8 @@ class Form
* @param string $help Tooltip help
* @return string HTML edit field
*/
- public function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata = 'string', $moreparam = '', $fieldrequired = 0, $notabletag = 0, $paramid = 'id', $help = '')
- {
+ public function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata = 'string', $moreparam = '', $fieldrequired = 0, $notabletag = 0, $paramid = 'id', $help = '')
+ {
global $conf, $langs;
$ret = '';
@@ -157,7 +157,7 @@ class Form
}
return $ret;
- }
+ }
/**
* Output value of a field for an editable field
@@ -177,7 +177,7 @@ class Form
* @param string $paramid Key of parameter for id ('id', 'socid')
* @return string HTML edit field
*/
- public function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata = 'string', $editvalue = '', $extObject = null, $custommsg = null, $moreparam = '', $notabletag = 0, $formatfunc = '', $paramid = 'id')
+ public function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata = 'string', $editvalue = '', $extObject = null, $custommsg = null, $moreparam = '', $notabletag = 0, $formatfunc = '', $paramid = 'id')
{
global $conf, $langs, $db;
@@ -243,7 +243,7 @@ class Form
elseif (preg_match('/^select;/', $typeofdata))
{
$arraydata = explode(',', preg_replace('/^select;/', '', $typeofdata));
- $arraylist = array();
+ $arraylist = array();
foreach ($arraydata as $val)
{
$tmp = explode(':', $val);
@@ -254,7 +254,7 @@ class Form
}
elseif (preg_match('/^ckeditor/', $typeofdata))
{
- $tmp = explode(':', $typeofdata); // Example: ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols:uselocalbrowser
+ $tmp = explode(':', $typeofdata); // Example: ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols:uselocalbrowser
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor($htmlname, ($editvalue ? $editvalue : $value), ($tmp[2] ? $tmp[2] : ''), ($tmp[3] ? $tmp[3] : '100'), ($tmp[1] ? $tmp[1] : 'dolibarr_notes'), 'In', ($tmp[5] ? $tmp[5] : 0), (isset($tmp[8]) ? ($tmp[8] ?true:false) : true), true, ($tmp[6] ? $tmp[6] : '20'), ($tmp[7] ? $tmp[7] : '100'));
$ret .= $doleditor->Create(1);
@@ -263,12 +263,12 @@ class Form
if (empty($notabletag)) $ret .= ' | ';
//else $ret.='';
- $ret .= '';
- if (preg_match('/ckeditor|textarea/', $typeofdata) && empty($notabletag)) $ret .= ' '."\n";
- $ret .= '';
- if (empty($notabletag)) $ret .= ' | ';
+ $ret .= '
';
+ if (preg_match('/ckeditor|textarea/', $typeofdata) && empty($notabletag)) $ret .= '
'."\n";
+ $ret .= '
';
+ if (empty($notabletag)) $ret .= '';
- if (empty($notabletag)) $ret .= ''."\n";
+ if (empty($notabletag)) $ret .= ''."\n";
$ret .= ''."\n";
}
else
@@ -282,7 +282,7 @@ class Form
elseif (preg_match('/^select;/', $typeofdata))
{
$arraydata = explode(',', preg_replace('/^select;/', '', $typeofdata));
- $arraylist = array();
+ $arraylist = array();
foreach ($arraydata as $val)
{
$tmp = explode(':', $val);
@@ -492,8 +492,8 @@ class Form
{
if (!empty($custommsg['success']))
$out .= '
'."\n";
- if (!empty($custommsg['error']))
- $out .= '
'."\n";
+ if (!empty($custommsg['error']))
+ $out .= '
'."\n";
}
else
$out .= '
'."\n";
@@ -532,7 +532,7 @@ class Form
* @see textwithpicto() Use thisfunction if you can.
* TODO Move this as static as soon as everybody use textwithpicto or @Form::textwithtooltip
*/
- public function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 3, $incbefore = '', $noencodehtmltext = 0, $tooltiptrigger = '', $forcenowrap = 0)
+ public function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 3, $incbefore = '', $noencodehtmltext = 0, $tooltiptrigger = '', $forcenowrap = 0)
{
if ($incbefore) $text = $incbefore.$text;
if (!$htmltext) return $text;
@@ -613,7 +613,7 @@ class Form
* @param int $forcenowrap Force no wrap between text and picto (works with notabs=2 only)
* @return string HTML code of text, picto, tooltip
*/
- public function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 3, $tooltiptrigger = '', $forcenowrap = 0)
+ public function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 3, $tooltiptrigger = '', $forcenowrap = 0)
{
global $conf, $langs;
@@ -643,7 +643,7 @@ class Form
// If info or help with smartphone, show only text (tooltip on click does not works with dialog on smaprtphone)
//if (! empty($conf->dol_no_mouse_hover) && ! empty($tooltiptrigger))
//{
- //if ($type == 'info' || $type == 'help') return '
'.$text.''';
+ //if ($type == 'info' || $type == 'help') return '
'.$text.''';
//}
$img = '';
@@ -666,7 +666,7 @@ class Form
* @param int $alwaysvisible 1=select button always visible
* @return string|void Select list
*/
- public function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0)
+ public function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0)
{
global $conf, $langs, $hookmanager;
@@ -760,7 +760,7 @@ class Form
return $ret;
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return combo list of activated countries, into language of user
*
@@ -776,9 +776,9 @@ class Form
* @param array $exclude_country_code Array of country code (iso2) to exclude
* @return string HTML string with select
*/
- public function select_country($selected = '', $htmlname = 'country_id', $htmloption = '', $maxlength = 0, $morecss = 'minwidth300', $usecodeaskey = '', $showempty = 1, $disablefavorites = 0, $addspecialentries = 0, $exclude_country_code = array())
+ public function select_country($selected = '', $htmlname = 'country_id', $htmloption = '', $maxlength = 0, $morecss = 'minwidth300', $usecodeaskey = '', $showempty = 1, $disablefavorites = 0, $addspecialentries = 0, $exclude_country_code = array())
{
- // phpcs:enable
+ // phpcs:enable
global $conf, $langs, $mysoc;
$langs->load("dict");
@@ -878,7 +878,7 @@ class Form
return $out;
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return select list of incoterms
*
@@ -891,9 +891,9 @@ class Form
* @param array $events Event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
* @return string HTML string with select and input
*/
- public function select_incoterms($selected = '', $location_incoterms = '', $page = '', $htmlname = 'incoterm_id', $htmloption = '', $forcecombo = 1, $events = array())
+ public function select_incoterms($selected = '', $location_incoterms = '', $page = '', $htmlname = 'incoterm_id', $htmloption = '', $forcecombo = 1, $events = array())
{
- // phpcs:enable
+ // phpcs:enable
global $conf, $langs;
$langs->load("dict");
@@ -972,7 +972,7 @@ class Form
return $out;
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of types of lines (product or service)
* Example: 0=product, 1=service, 9=other (for external module)
@@ -984,14 +984,14 @@ class Form
* @param integer $forceall 1=Force to show products and services in combo list, whatever are activated modules, 0=No force, 2=Force to show only Products, 3=Force to show only services, -1=Force none (and set hidden field to 'service')
* @return void
*/
- public function select_type_of_lines($selected = '', $htmlname = 'type', $showempty = 0, $hidetext = 0, $forceall = 0)
+ public function select_type_of_lines($selected = '', $htmlname = 'type', $showempty = 0, $hidetext = 0, $forceall = 0)
{
- // phpcs:enable
+ // phpcs:enable
global $db, $langs, $user, $conf;
// If product & services are enabled or both disabled.
if ($forceall == 1 || (empty($forceall) && !empty($conf->product->enabled) && !empty($conf->service->enabled))
- || (empty($forceall) && empty($conf->product->enabled) && empty($conf->service->enabled)))
+ || (empty($forceall) && empty($conf->product->enabled) && empty($conf->service->enabled)))
{
if (empty($hidetext)) print $langs->trans("Type").': ';
print '