Merge branch 'develop' of github.com:Dolibarr/dolibarr into dev_fix_continue

This commit is contained in:
Florian HENRY 2021-02-08 15:48:32 +01:00
commit 4bdff598be
23 changed files with 153 additions and 119 deletions

View File

@ -436,13 +436,12 @@ if ($search_town) $sql .= natural_search('s.town', $search_town);
if ($search_zip) $sql .= natural_search("s.zip", $search_zip); if ($search_zip) $sql .= natural_search("s.zip", $search_zip);
if ($search_state) $sql .= natural_search("state.nom", $search_state); if ($search_state) $sql .= natural_search("state.nom", $search_state);
if ($search_country) $sql .= " AND s.fk_pays IN (".$db->sanitize($db->escape($search_country)).')'; if ($search_country) $sql .= " AND s.fk_pays IN (".$db->sanitize($db->escape($search_country)).')';
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$db->sanitize($db->escape($search_type_thirdparty)).')'; if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $sql .= " AND s.fk_typent IN (".$db->sanitize($db->escape($search_type_thirdparty)).')';
if ($search_ref) $sql .= natural_search('p.ref', $search_ref); if ($search_ref) $sql .= natural_search('p.ref', $search_ref);
if ($search_refcustomer) $sql .= natural_search('p.ref_client', $search_refcustomer); if ($search_refcustomer) $sql .= natural_search('p.ref_client', $search_refcustomer);
if ($search_refproject) $sql .= natural_search('pr.ref', $search_refproject); if ($search_refproject) $sql .= natural_search('pr.ref', $search_refproject);
if ($search_project) $sql .= natural_search('pr.title', $search_project); if ($search_project) $sql .= natural_search('pr.title', $search_project);
if ($search_availability) $sql .= " AND p.fk_availability IN (".$db->sanitize($db->escape($search_availability)).')'; if ($search_availability) $sql .= " AND p.fk_availability IN (".$db->sanitize($db->escape($search_availability)).')';
if ($search_societe) $sql .= natural_search('s.nom', $search_societe); if ($search_societe) $sql .= natural_search('s.nom', $search_societe);
if ($search_societe_alias) $sql .= natural_search('s.name_alias', $search_societe_alias); if ($search_societe_alias) $sql .= natural_search('s.name_alias', $search_societe_alias);
if ($search_login) $sql .= natural_search("u.login", $search_login); if ($search_login) $sql .= natural_search("u.login", $search_login);
@ -574,6 +573,12 @@ if ($resql)
if ($search_fk_cond_reglement > 0) $param .= '&search_fk_cond_reglement='.$search_fk_cond_reglement; if ($search_fk_cond_reglement > 0) $param .= '&search_fk_cond_reglement='.$search_fk_cond_reglement;
if ($search_fk_shipping_method > 0) $param .= '&search_fk_shipping_method='.$search_fk_shipping_method; if ($search_fk_shipping_method > 0) $param .= '&search_fk_shipping_method='.$search_fk_shipping_method;
if ($search_fk_mode_reglement > 0) $param .= '&search_fk_mode_reglement='.$search_fk_mode_reglement; if ($search_fk_mode_reglement > 0) $param .= '&search_fk_mode_reglement='.$search_fk_mode_reglement;
if ($search_type_thirdparty > 0) $param .= '&search_type_thirdparty='.$search_type_thirdparty;
if ($search_town) $param .= '&search_town='.$search_town;
if ($search_zip) $param .= '&search_zip='.$search_zip;
if ($search_state) $param .= '&search_state='.$search_state;
if ($search_town) $param .= '&search_town='.$search_town;
if ($search_country) $param .= '&search_country='.$search_country;
// Add $param from extra fields // Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
@ -750,7 +755,7 @@ if ($resql)
if (!empty($arrayfields['typent.code']['checked'])) if (!empty($arrayfields['typent.code']['checked']))
{ {
print '<td class="liste_titre maxwidth100onsmartphone" align="center">'; print '<td class="liste_titre maxwidth100onsmartphone" align="center">';
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT)); print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
print ajax_combobox('search_type_thirdparty'); print ajax_combobox('search_type_thirdparty');
print '</td>'; print '</td>';
} }

View File

@ -263,7 +263,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
// ThirdParty Type // ThirdParty Type
print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>'; print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>';
$sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. $sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label.
print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam_typent, '', 1); print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 1, 0, 0, '', 0, 0, 0, $sortparam_typent, '', 1);
if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print '</td></tr>'; print '</td></tr>';
// Category // Category

View File

@ -489,7 +489,7 @@ if ($resql)
if ($search_zip != '') $param .= '&search_zip='.urlencode($search_zip); if ($search_zip != '') $param .= '&search_zip='.urlencode($search_zip);
if ($search_state != '') $param .= '&search_state='.urlencode($search_state); if ($search_state != '') $param .= '&search_state='.urlencode($search_state);
if ($search_country != '') $param .= '&search_country='.urlencode($search_country); if ($search_country != '') $param .= '&search_country='.urlencode($search_country);
if ($search_type_thirdparty != '') $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty); if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
if ($search_product_category != '') $param .= '&search_product_category='.urlencode($search_product_category); if ($search_product_category != '') $param .= '&search_product_category='.urlencode($search_product_category);
if ($search_categ_cus > 0) $param .= '&search_categ_cus='.urlencode($search_categ_cus); if ($search_categ_cus > 0) $param .= '&search_categ_cus='.urlencode($search_categ_cus);
if ($show_files) $param .= '&show_files='.urlencode($show_files); if ($show_files) $param .= '&show_files='.urlencode($show_files);
@ -727,7 +727,7 @@ if ($resql)
if (!empty($arrayfields['typent.code']['checked'])) if (!empty($arrayfields['typent.code']['checked']))
{ {
print '<td class="liste_titre maxwidthonsmartphone" align="center">'; print '<td class="liste_titre maxwidthonsmartphone" align="center">';
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT)); print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
print '</td>'; print '</td>';
} }
// Date order // Date order

View File

@ -271,7 +271,7 @@ print '</td></tr>';
// ThirdParty Type // ThirdParty Type
print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>'; print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>';
$sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. $sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label.
print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam_typent, '', 1); print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 1, 0, 0, '', 0, 0, 0, $sortparam_typent, '', 1);
if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print '</td></tr>'; print '</td></tr>';
// Category // Category

View File

@ -494,7 +494,7 @@ if ($search_town) $sql .= natural_search('s.town', $search_town);
if ($search_zip) $sql .= natural_search("s.zip", $search_zip); if ($search_zip) $sql .= natural_search("s.zip", $search_zip);
if ($search_state) $sql .= natural_search("state.nom", $search_state); if ($search_state) $sql .= natural_search("state.nom", $search_state);
if ($search_country) $sql .= " AND s.fk_pays IN (".$db->sanitize($db->escape($search_country)).')'; if ($search_country) $sql .= " AND s.fk_pays IN (".$db->sanitize($db->escape($search_country)).')';
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$db->sanitize($db->escape($search_type_thirdparty)).')'; if ($search_type_thirdparty != '' && $search_type_thirdparty != '-1') $sql .= " AND s.fk_typent IN (".$db->sanitize($db->escape($search_type_thirdparty)).')';
if ($search_company) $sql .= natural_search('s.nom', $search_company); if ($search_company) $sql .= natural_search('s.nom', $search_company);
if ($search_company_alias) $sql .= natural_search('s.name_alias', $search_company_alias); if ($search_company_alias) $sql .= natural_search('s.name_alias', $search_company_alias);
if ($search_montant_ht != '') $sql .= natural_search('f.total', $search_montant_ht, 1); if ($search_montant_ht != '') $sql .= natural_search('f.total', $search_montant_ht, 1);
@ -894,7 +894,7 @@ if ($resql)
if (!empty($arrayfields['typent.code']['checked'])) if (!empty($arrayfields['typent.code']['checked']))
{ {
print '<td class="liste_titre maxwidthonsmartphone" align="center">'; print '<td class="liste_titre maxwidthonsmartphone" align="center">';
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), 'maxwidth100'); print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), 'maxwidth100', 1);
print '</td>'; print '</td>';
} }
// Payment mode // Payment mode

View File

@ -264,7 +264,7 @@ print '</td></tr>';
// ThirdParty Type // ThirdParty Type
print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>'; print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>';
$sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. $sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label.
print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam_typent, '', 1); print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 1, 0, 0, '', 0, 0, 0, $sortparam_typent, '', 1);
if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print '</td></tr>'; print '</td></tr>';

View File

@ -175,6 +175,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
$sall = ""; $sall = "";
$search_status = ""; $search_status = "";
$toselect = ''; $toselect = '';
$search_type_thirdparty = '';
$search_array_options = array(); $search_array_options = array();
} }
@ -198,6 +199,7 @@ $form = new Form($db);
$formfile = new FormFile($db); $formfile = new FormFile($db);
$formother = new FormOther($db); $formother = new FormOther($db);
$socstatic = new Societe($db); $socstatic = new Societe($db);
$formcompany = new FormCompany($db);
$contracttmp = new Contrat($db); $contracttmp = new Contrat($db);
$sql = 'SELECT'; $sql = 'SELECT';
@ -235,6 +237,7 @@ if ($search_user > 0)
} }
$sql .= " WHERE c.fk_soc = s.rowid "; $sql .= " WHERE c.fk_soc = s.rowid ";
$sql .= ' AND c.entity IN ('.getEntity('contract').')'; $sql .= ' AND c.entity IN ('.getEntity('contract').')';
if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $sql .= " AND s.fk_typent IN (".$db->sanitize($db->escape($search_type_thirdparty)).')';
if ($search_product_category > 0) $sql .= " AND cp.fk_categorie = ".$search_product_category; if ($search_product_category > 0) $sql .= " AND cp.fk_categorie = ".$search_product_category;
if ($socid) $sql .= " AND s.rowid = ".$db->escape($socid); if ($socid) $sql .= " AND s.rowid = ".$db->escape($socid);
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
@ -346,6 +349,7 @@ if ($search_dfyear != '') $param .= '&search_dfyear='.urlencode($search_df
if ($search_dfmonth != '') $param .= '&search_dfmonth='.urlencode($search_dfmonth); if ($search_dfmonth != '') $param .= '&search_dfmonth='.urlencode($search_dfmonth);
if ($search_sale != '') $param .= '&search_sale='.urlencode($search_sale); if ($search_sale != '') $param .= '&search_sale='.urlencode($search_sale);
if ($search_user != '') $param .= '&search_user='.urlencode($search_user); if ($search_user != '') $param .= '&search_user='.urlencode($search_user);
if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
if ($search_product_category != '') $param .= '&search_product_category='.urlencode($search_product_category); if ($search_product_category != '') $param .= '&search_product_category='.urlencode($search_product_category);
if ($show_files) $param .= '&show_files='.urlencode($show_files); if ($show_files) $param .= '&show_files='.urlencode($show_files);
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
@ -491,7 +495,7 @@ if (!empty($arrayfields['country.code_iso']['checked']))
if (!empty($arrayfields['typent.code']['checked'])) if (!empty($arrayfields['typent.code']['checked']))
{ {
print '<td class="liste_titre maxwidthonsmartphone center">'; print '<td class="liste_titre maxwidthonsmartphone center">';
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT)); print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
print '</td>'; print '</td>';
} }
if (!empty($arrayfields['sale_representative']['checked'])) if (!empty($arrayfields['sale_representative']['checked']))

View File

@ -1031,7 +1031,7 @@ class FormCompany extends Form
$out .= '<input type="hidden" name="action" value="set_thirdpartytype">'; $out .= '<input type="hidden" name="action" value="set_thirdpartytype">';
$out .= '<input type="hidden" name="token" value="'.newToken().'">'; $out .= '<input type="hidden" name="token" value="'.newToken().'">';
$sortparam = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. $sortparam = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label.
$out .= $this->selectarray($htmlname, $this->typent_array(0, $filter), $selected, 0, 0, 0, '', 0, 0, 0, $sortparam, '', 1); $out .= $this->selectarray($htmlname, $this->typent_array(0, $filter), $selected, 1, 0, 0, '', 0, 0, 0, $sortparam, '', 1);
$out .= '<input type="submit" class="button smallpaddingimp valignmiddle" value="'.$langs->trans("Modify").'">'; $out .= '<input type="submit" class="button smallpaddingimp valignmiddle" value="'.$langs->trans("Modify").'">';
$out .= '</form>'; $out .= '</form>';
} else { } else {

View File

@ -4507,7 +4507,7 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
//print 'totalnboflines='.$totalnboflines.'-savlimit='.$savlimit.'-limit='.$limit.'-num='.$num.'-nextpage='.$nextpage; //print 'totalnboflines='.$totalnboflines.'-savlimit='.$savlimit.'-limit='.$limit.'-num='.$num.'-nextpage='.$nextpage;
print "\n"; print "\n";
print "<!-- Begin title '".$titre."' -->\n"; print "<!-- Begin title -->\n";
print '<table class="centpercent notopnoleftnoright table-fiche-title'.($morecss ? ' '.$morecss : '').'"><tr>'; // maring bottom must be same than into load_fiche_tire print '<table class="centpercent notopnoleftnoright table-fiche-title'.($morecss ? ' '.$morecss : '').'"><tr>'; // maring bottom must be same than into load_fiche_tire
// Left // Left

View File

@ -93,21 +93,25 @@ class modBarcode extends DolibarrModules
// Main menu entries // Main menu entries
$r = 0; $r = 0;
$this->menu[$r] = array('fk_menu'=>'fk_mainmenu=tools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode $this->menu[$r] = array(
'fk_menu'=>'fk_mainmenu=tools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'mainmenu'=>'tools', 'mainmenu'=>'tools',
'leftmenu'=>'barcodeprint', 'leftmenu'=>'barcodeprint',
'type'=>'left', // This is a Left menu entry 'type'=>'left', // This is a Left menu entry
'titre'=>'BarCodePrintsheet', 'titre'=>'BarCodePrintsheet',
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
'url'=>'/barcode/printsheet.php?mainmenu=tools&leftmenu=barcodeprint', 'url'=>'/barcode/printsheet.php?mainmenu=tools&leftmenu=barcodeprint',
'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>200, 'position'=>200,
'enabled'=>'$conf->barcode->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. 'enabled'=>'$conf->barcode->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
'perms'=>'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->lire_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules 'perms'=>'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->lire_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'', 'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
$r++; $r++;
$this->menu[$r] = array('fk_menu'=>'fk_mainmenu=home,fk_leftmenu=admintools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode $this->menu[$r] = array(
'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=admintools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'left', // This is a Left menu entry 'type'=>'left', // This is a Left menu entry
'titre'=>'MassBarcodeInit', 'titre'=>'MassBarcodeInit',
'url'=>'/barcode/codeinit.php?mainmenu=home&leftmenu=admintools', 'url'=>'/barcode/codeinit.php?mainmenu=home&leftmenu=admintools',
@ -116,7 +120,8 @@ class modBarcode extends DolibarrModules
'enabled'=>'$conf->barcode->enabled && preg_match(\'/^(admintools|all)/\',$leftmenu)', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. 'enabled'=>'$conf->barcode->enabled && preg_match(\'/^(admintools|all)/\',$leftmenu)', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
'perms'=>'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->creer_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules 'perms'=>'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->creer_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'', 'target'=>'',
'user'=>0); // 0=Menu for internal users, 1=external users, 2=both 'user'=>0, // 0=Menu for internal users, 1=external users, 2=both
);
$r++; $r++;
} }

View File

@ -129,13 +129,15 @@ class modBlockedLog extends DolibarrModules
'leftmenu'=>'blockedlogbrowser', 'leftmenu'=>'blockedlogbrowser',
'type'=>'left', // This is a Left menu entry 'type'=>'left', // This is a Left menu entry
'titre'=>'BrowseBlockedLog', 'titre'=>'BrowseBlockedLog',
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
'url'=>'/blockedlog/admin/blockedlog_list.php?mainmenu=tools&leftmenu=blockedlogbrowser', 'url'=>'/blockedlog/admin/blockedlog_list.php?mainmenu=tools&leftmenu=blockedlogbrowser',
'langs'=>'blockedlog', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. 'langs'=>'blockedlog', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>200, 'position'=>200,
'enabled'=>'$conf->blockedlog->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. 'enabled'=>'$conf->blockedlog->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
'perms'=>'$user->rights->blockedlog->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules 'perms'=>'$user->rights->blockedlog->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
'target'=>'', 'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
$r++; $r++;
} }

View File

@ -123,7 +123,8 @@ class modECM extends DolibarrModules
$r = 0; $r = 0;
// Top menu // Top menu
$this->menu[$r] = array('fk_menu'=>0, $this->menu[$r] = array(
'fk_menu'=>0,
'type'=>'top', 'type'=>'top',
'titre'=>'MenuECM', 'titre'=>'MenuECM',
'mainmenu'=>'ecm', 'mainmenu'=>'ecm',
@ -133,13 +134,16 @@ class modECM extends DolibarrModules
'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup', 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup',
'enabled'=>'$conf->ecm->enabled', 'enabled'=>'$conf->ecm->enabled',
'target'=>'', 'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
$r++; $r++;
// Left menu linked to top menu // Left menu linked to top menu
$this->menu[$r] = array('fk_menu'=>'fk_mainmenu=ecm', $this->menu[$r] = array(
'fk_menu'=>'fk_mainmenu=ecm',
'type'=>'left', 'type'=>'left',
'titre'=>'ECMArea', 'titre'=>'ECMArea',
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
'mainmenu'=>'ecm', 'mainmenu'=>'ecm',
'leftmenu'=>'ecm', 'leftmenu'=>'ecm',
'url'=>'/ecm/index.php?mainmenu=ecm&leftmenu=ecm', 'url'=>'/ecm/index.php?mainmenu=ecm&leftmenu=ecm',
@ -148,10 +152,12 @@ class modECM extends DolibarrModules
'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload', 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload',
'enabled'=>'$user->rights->ecm->read || $user->rights->ecm->upload', 'enabled'=>'$user->rights->ecm->read || $user->rights->ecm->upload',
'target'=>'', 'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
$r++; $r++;
$this->menu[$r] = array('fk_menu'=>'fk_mainmenu=ecm,fk_leftmenu=ecm', $this->menu[$r] = array(
'fk_menu'=>'fk_mainmenu=ecm,fk_leftmenu=ecm',
'type'=>'left', 'type'=>'left',
'titre'=>'ECMSectionsManual', 'titre'=>'ECMSectionsManual',
'mainmenu'=>'ecm', 'mainmenu'=>'ecm',
@ -162,10 +168,12 @@ class modECM extends DolibarrModules
'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload', 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload',
'enabled'=>'$user->rights->ecm->read || $user->rights->ecm->upload', 'enabled'=>'$user->rights->ecm->read || $user->rights->ecm->upload',
'target'=>'', 'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
$r++; $r++;
$this->menu[$r] = array('fk_menu'=>'fk_mainmenu=ecm,fk_leftmenu=ecm', $this->menu[$r] = array(
'fk_menu'=>'fk_mainmenu=ecm,fk_leftmenu=ecm',
'type'=>'left', 'type'=>'left',
'titre'=>'ECMSectionsAuto', 'titre'=>'ECMSectionsAuto',
'mainmenu'=>'ecm', 'mainmenu'=>'ecm',
@ -175,7 +183,8 @@ class modECM extends DolibarrModules
'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload', 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload',
'enabled'=>'($user->rights->ecm->read || $user->rights->ecm->upload) && ! empty($conf->global->ECM_AUTO_TREE_ENABLED)', 'enabled'=>'($user->rights->ecm->read || $user->rights->ecm->upload) && ! empty($conf->global->ECM_AUTO_TREE_ENABLED)',
'target'=>'', 'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
$r++; $r++;
} }
} }

View File

@ -274,7 +274,7 @@ if ($search_zip) $sql .= natural_search("s.zip", $search_zip);
if ($search_state) $sql .= natural_search("state.nom", $search_state); if ($search_state) $sql .= natural_search("state.nom", $search_state);
if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')'; if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')';
if ($search_tracking) $sql .= natural_search("e.tracking_number", $search_tracking); if ($search_tracking) $sql .= natural_search("e.tracking_number", $search_tracking);
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')'; if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
if ($search_sale > 0) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$search_sale; if ($search_sale > 0) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$search_sale;
if ($search_user > 0) if ($search_user > 0)
{ {
@ -339,6 +339,7 @@ if ($resql)
if ($search_tracking) $param .= "&amp;search_tracking=".urlencode($search_tracking); if ($search_tracking) $param .= "&amp;search_tracking=".urlencode($search_tracking);
if ($search_town) $param .= '&search_town='.urlencode($search_town); if ($search_town) $param .= '&search_town='.urlencode($search_town);
if ($search_zip) $param .= '&search_zip='.urlencode($search_zip); if ($search_zip) $param .= '&search_zip='.urlencode($search_zip);
if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
if ($search_datedelivery_start) $param .= '&search_datedelivery_start='.urlencode($search_datedelivery_start); if ($search_datedelivery_start) $param .= '&search_datedelivery_start='.urlencode($search_datedelivery_start);
if ($search_datedelivery_end) $param .= '&search_datedelivery_end='.urlencode($search_datedelivery_end); if ($search_datedelivery_end) $param .= '&search_datedelivery_end='.urlencode($search_datedelivery_end);
@ -490,7 +491,7 @@ if ($resql)
if (!empty($arrayfields['typent.code']['checked'])) if (!empty($arrayfields['typent.code']['checked']))
{ {
print '<td class="liste_titre maxwidthonsmartphone center">'; print '<td class="liste_titre maxwidthonsmartphone center">';
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT)); print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
print '</td>'; print '</td>';
} }
// Weight // Weight

View File

@ -595,7 +595,7 @@ if ($search_town) $sql .= natural_search('s.town', $search_town);
if ($search_zip) $sql .= natural_search("s.zip", $search_zip); if ($search_zip) $sql .= natural_search("s.zip", $search_zip);
if ($search_state) $sql .= natural_search("state.nom", $search_state); if ($search_state) $sql .= natural_search("state.nom", $search_state);
if ($search_country) $sql .= " AND s.fk_pays IN (".$db->sanitize($db->escape($search_country)).')'; if ($search_country) $sql .= " AND s.fk_pays IN (".$db->sanitize($db->escape($search_country)).')';
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$db->sanitize($db->escape($search_type_thirdparty)).')'; if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $sql .= " AND s.fk_typent IN (".$db->sanitize($db->escape($search_type_thirdparty)).')';
if ($search_company) $sql .= natural_search('s.nom', $search_company); if ($search_company) $sql .= natural_search('s.nom', $search_company);
if ($search_sale > 0) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$db->escape($search_sale); if ($search_sale > 0) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$db->escape($search_sale);
if ($search_user > 0) $sql .= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='supplier_order' AND tc.source='internal' AND ec.element_id = cf.rowid AND ec.fk_socpeople = ".$db->escape($search_user); if ($search_user > 0) $sql .= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='supplier_order' AND tc.source='internal' AND ec.element_id = cf.rowid AND ec.fk_socpeople = ".$db->escape($search_user);
@ -680,6 +680,8 @@ if ($resql)
if ($search_billed != '') $param .= "&search_billed=".urlencode($search_billed); if ($search_billed != '') $param .= "&search_billed=".urlencode($search_billed);
if ($show_files) $param .= '&show_files='.urlencode($show_files); if ($show_files) $param .= '&show_files='.urlencode($show_files);
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
// Add $param from extra fields // Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
@ -875,7 +877,7 @@ if ($resql)
if (!empty($arrayfields['typent.code']['checked'])) if (!empty($arrayfields['typent.code']['checked']))
{ {
print '<td class="liste_titre maxwidthonsmartphone center">'; print '<td class="liste_titre maxwidthonsmartphone center">';
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT)); print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
print '</td>'; print '</td>';
} }
// Date order // Date order

View File

@ -533,7 +533,7 @@ if ($search_town) $sql .= natural_search('s.town', $search_town);
if ($search_zip) $sql .= natural_search("s.zip", $search_zip); if ($search_zip) $sql .= natural_search("s.zip", $search_zip);
if ($search_state) $sql .= natural_search("state.nom", $search_state); if ($search_state) $sql .= natural_search("state.nom", $search_state);
if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')'; if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')';
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')'; if ($search_type_thirdparty != '' && $search_type_thirdparty >= 0) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
if ($search_montant_ht != '') $sql .= natural_search('f.total_ht', $search_montant_ht, 1); if ($search_montant_ht != '') $sql .= natural_search('f.total_ht', $search_montant_ht, 1);
if ($search_montant_vat != '') $sql .= natural_search('f.total_tva', $search_montant_vat, 1); if ($search_montant_vat != '') $sql .= natural_search('f.total_tva', $search_montant_vat, 1);
if ($search_montant_localtax1 != '') $sql .= natural_search('f.localtax1', $search_montant_localtax1, 1); if ($search_montant_localtax1 != '') $sql .= natural_search('f.localtax1', $search_montant_localtax1, 1);
@ -678,6 +678,7 @@ if ($resql)
if ($option) $param .= "&option=".urlencode($option); if ($option) $param .= "&option=".urlencode($option);
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
if ($search_categ_sup > 0) $param .= '&search_categ_sup='.urlencode($search_categ_sup); if ($search_categ_sup > 0) $param .= '&search_categ_sup='.urlencode($search_categ_sup);
if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
// Add $param from extra fields // Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
@ -920,7 +921,7 @@ if ($resql)
if (!empty($arrayfields['typent.code']['checked'])) if (!empty($arrayfields['typent.code']['checked']))
{ {
print '<td class="liste_titre maxwidthonsmartphone center">'; print '<td class="liste_titre maxwidthonsmartphone center">';
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT)); print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
print '</td>'; print '</td>';
} }
// Condition of payment // Condition of payment
@ -1301,7 +1302,7 @@ if ($resql)
if (!empty($arrayfields['typent.code']['checked'])) if (!empty($arrayfields['typent.code']['checked']))
{ {
print '<td class="center">'; print '<td class="center">';
if (count($typenArray) == 0) $typenArray = $formcompany->typent_array(1); if (empty($typenArray)) $typenArray = $formcompany->typent_array(1);
print $typenArray[$obj->typent_code]; print $typenArray[$obj->typent_code];
print '</td>'; print '</td>';
if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['nbfield']++;

View File

@ -106,7 +106,7 @@ $search_month_end = GETPOST('search_month_end', 'int');
$search_year_end = GETPOST('search_year_end', 'int'); $search_year_end = GETPOST('search_year_end', 'int');
$search_employee = GETPOST('search_employee', 'int'); $search_employee = GETPOST('search_employee', 'int');
$search_valideur = GETPOST('search_valideur', 'int'); $search_valideur = GETPOST('search_valideur', 'int');
$search_status = GETPOST('search_status', 'int'); $search_status = GETPOST('search_statut', 'int');
$search_type = GETPOST('search_type', 'int'); $search_type = GETPOST('search_type', 'int');
// Initialize technical objects // Initialize technical objects

View File

@ -32,7 +32,6 @@
delete from llx_c_typent; delete from llx_c_typent;
-- Entries for all countries -- Entries for all countries
insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 0, 'TE_UNKNOWN', '-', NULL, 1);
insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 1, 'TE_STARTUP', 'Start-up', NULL, 0); insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 1, 'TE_STARTUP', 'Start-up', NULL, 0);
insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 2, 'TE_GROUP', 'Grand groupe', NULL, 1); insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 2, 'TE_GROUP', 'Grand groupe', NULL, 1);
insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 3, 'TE_MEDIUM', 'PME/PMI', NULL, 1); insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 3, 'TE_MEDIUM', 'PME/PMI', NULL, 1);

View File

@ -119,6 +119,11 @@ ALTER TABLE llx_societe CHANGE fk_entrepot fk_warehouse INTEGER DEFAULT NULL;
--ALTER TABLE llx_societe ADD CONSTRAINT fk_propal_fk_warehouse FOREIGN KEY (fk_warehouse) REFERENCES llx_entrepot(rowid); --ALTER TABLE llx_societe ADD CONSTRAINT fk_propal_fk_warehouse FOREIGN KEY (fk_warehouse) REFERENCES llx_entrepot(rowid);
ALTER TABLE llx_societe ADD INDEX idx_societe_warehouse(fk_warehouse); ALTER TABLE llx_societe ADD INDEX idx_societe_warehouse(fk_warehouse);
-- VMYSQL4.3 ALTER TABLE llx_societe MODIFY COLUMN fk_typent integer NULL;
-- VPGSQL8.2 ALTER TABLE llx_societe ALTER COLUMN fk_typent DROP NOT NULL;
UPDATE llx_societe SET fk_typent=NULL WHERE fk_typent=0;
DELETE FROM llx_c_typent WHERE code='TE_UNKNOWN';
ALTER TABLE llx_socpeople MODIFY poste varchar(255); ALTER TABLE llx_socpeople MODIFY poste varchar(255);
ALTER TABLE llx_menu ADD COLUMN prefix varchar(255) NULL AFTER titre; ALTER TABLE llx_menu ADD COLUMN prefix varchar(255) NULL AFTER titre;

View File

@ -63,7 +63,7 @@ create table llx_societe
whatsapp varchar(255), -- deprecated whatsapp varchar(255), -- deprecated
fk_effectif integer DEFAULT 0, -- fk_effectif integer DEFAULT 0, --
fk_typent integer DEFAULT 0, -- fk_typent integer DEFAULT NULL, -- type ent
fk_forme_juridique integer DEFAULT 0, -- juridical status fk_forme_juridique integer DEFAULT 0, -- juridical status
fk_currency varchar(3), -- default currency fk_currency varchar(3), -- default currency
siren varchar(128), -- IDProf1: depends on country (example: siren or RCS for france, ...) siren varchar(128), -- IDProf1: depends on country (example: siren or RCS for france, ...)

View File

@ -447,7 +447,7 @@ if ($search_town) $sql .= natural_search('s.town', $search_town);
if ($search_zip) $sql .= natural_search("s.zip", $search_zip); if ($search_zip) $sql .= natural_search("s.zip", $search_zip);
if ($search_state) $sql .= natural_search("state.nom", $search_state); if ($search_state) $sql .= natural_search("state.nom", $search_state);
if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')'; if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')';
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')'; if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
if ($search_ref_rcp) $sql .= natural_search('e.ref', $search_ref_rcp); if ($search_ref_rcp) $sql .= natural_search('e.ref', $search_ref_rcp);
if ($search_ref_liv) $sql .= natural_search('l.ref', $search_ref_liv); if ($search_ref_liv) $sql .= natural_search('l.ref', $search_ref_liv);
if ($search_company) $sql .= natural_search('s.nom', $search_company); if ($search_company) $sql .= natural_search('s.nom', $search_company);
@ -656,7 +656,7 @@ if ($resql)
if (!empty($arrayfields['typent.code']['checked'])) if (!empty($arrayfields['typent.code']['checked']))
{ {
print '<td class="liste_titre maxwidthonsmartphone center">'; print '<td class="liste_titre maxwidthonsmartphone center">';
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT)); print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
print '</td>'; print '</td>';
} }
// Date delivery planned // Date delivery planned

View File

@ -1497,7 +1497,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
// Type - Workforce/Staff // Type - Workforce/Staff
print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone"'.($conf->browser->layout == 'phone' ? ' colspan="3"' : '').'>'."\n"; print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone"'.($conf->browser->layout == 'phone' ? ' colspan="3"' : '').'>'."\n";
$sortparam = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. $sortparam = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label.
print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam, '', 1); print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 1, 0, 0, '', 0, 0, 0, $sortparam, '', 1);
if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print '</td>'; print '</td>';
if ($conf->browser->layout == 'phone') print '</tr><tr>'; if ($conf->browser->layout == 'phone') print '</tr><tr>';
@ -2173,7 +2173,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
// Type - Workforce/Staff // Type - Workforce/Staff
print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">'; print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">';
print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1); print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print '</td>'; print '</td>';
if ($conf->browser->layout == 'phone') print '</tr><tr>'; if ($conf->browser->layout == 'phone') print '</tr><tr>';

View File

@ -485,7 +485,7 @@ if ($search_type == '0') $sql .= " AND s.client = 0 AND s.fournisseur = 0";
if ($search_status != '' && $search_status >= 0) $sql .= natural_search("s.status", $search_status, 2); if ($search_status != '' && $search_status >= 0) $sql .= natural_search("s.status", $search_status, 2);
if (!empty($conf->barcode->enabled) && $search_barcode) $sql .= natural_search("s.barcode", $search_barcode); if (!empty($conf->barcode->enabled) && $search_barcode) $sql .= natural_search("s.barcode", $search_barcode);
if ($search_prive_level && $search_prive_level != '-1') $sql .= natural_search("s.price_level", $search_prive_level, 2); if ($search_prive_level && $search_prive_level != '-1') $sql .= natural_search("s.price_level", $search_prive_level, 2);
if ($search_type_thirdparty && $search_type_thirdparty != '-1') $sql .= natural_search("s.fk_typent", $search_type_thirdparty, 2); if ($search_type_thirdparty && $search_type_thirdparty > 0) $sql .= natural_search("s.fk_typent", $search_type_thirdparty, 2);
if (!empty($search_staff) && $search_staff != '-1') $sql .= natural_search("s.fk_effectif", $search_staff, 2); if (!empty($search_staff) && $search_staff != '-1') $sql .= natural_search("s.fk_effectif", $search_staff, 2);
if ($search_level) $sql .= natural_search("s.fk_prospectlevel", join(',', $search_level), 3); if ($search_level) $sql .= natural_search("s.fk_prospectlevel", join(',', $search_level), 3);
if ($search_parent_name) $sql .= natural_search("s2.nom", $search_parent_name); if ($search_parent_name) $sql .= natural_search("s2.nom", $search_parent_name);
@ -582,7 +582,7 @@ if ($search_idprof5 != '') $param .= '&search_idprof5='.urlencode($search_idprof
if ($search_idprof6 != '') $param .= '&search_idprof6='.urlencode($search_idprof6); if ($search_idprof6 != '') $param .= '&search_idprof6='.urlencode($search_idprof6);
if ($search_vat != '') $param .= '&search_vat='.urlencode($search_vat); if ($search_vat != '') $param .= '&search_vat='.urlencode($search_vat);
if ($search_prive_level != '') $param .= '&search_prive_level='.urlencode($search_prive_level); if ($search_prive_level != '') $param .= '&search_prive_level='.urlencode($search_prive_level);
if ($search_type_thirdparty != '') $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty); if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
if ($search_type != '') $param .= '&search_type='.urlencode($search_type); if ($search_type != '') $param .= '&search_type='.urlencode($search_type);
if (is_array($search_level) && count($search_level)) foreach ($search_level as $slevel) $param .= '&search_level[]='.urlencode($slevel); if (is_array($search_level) && count($search_level)) foreach ($search_level as $slevel) $param .= '&search_level[]='.urlencode($slevel);
if ($search_status != '') $param .= '&search_status='.urlencode($search_status); if ($search_status != '') $param .= '&search_status='.urlencode($search_status);

View File

@ -294,7 +294,7 @@ if ($search_town) $sql .= natural_search('s.town', $search_town);
if ($search_zip) $sql .= natural_search("s.zip", $search_zip); if ($search_zip) $sql .= natural_search("s.zip", $search_zip);
if ($search_state) $sql .= natural_search("state.nom", $search_state); if ($search_state) $sql .= natural_search("state.nom", $search_state);
if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')'; if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')';
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')'; if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
if ($search_ref) $sql .= natural_search('sp.ref', $search_ref); if ($search_ref) $sql .= natural_search('sp.ref', $search_ref);
if ($search_societe) $sql .= natural_search('s.nom', $search_societe); if ($search_societe) $sql .= natural_search('s.nom', $search_societe);
if ($search_login) $sql .= natural_search('u.login', $search_login); if ($search_login) $sql .= natural_search('u.login', $search_login);
@ -395,6 +395,7 @@ if ($resql)
if ($socid > 0) $param .= '&socid='.urlencode($socid); if ($socid > 0) $param .= '&socid='.urlencode($socid);
if ($search_status != '') $param .= '&search_status='.urlencode($search_status); if ($search_status != '') $param .= '&search_status='.urlencode($search_status);
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
// Add $param from extra fields // Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
@ -518,7 +519,7 @@ if ($resql)
if (!empty($arrayfields['typent.code']['checked'])) if (!empty($arrayfields['typent.code']['checked']))
{ {
print '<td class="liste_titre maxwidthonsmartphone center">'; print '<td class="liste_titre maxwidthonsmartphone center">';
print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT)); print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
print '</td>'; print '</td>';
} }
// Date // Date