Fix filter on categories
This commit is contained in:
parent
ed68b73ef5
commit
e4611f2950
@ -262,20 +262,16 @@ if ($mode == 'customer') $filter = 's.client in (1,2,3)';
|
|||||||
if ($mode == 'supplier') $filter = 's.fournisseur = 1';
|
if ($mode == 'supplier') $filter = 's.fournisseur = 1';
|
||||||
print $form->selectarray('socid', $companies, $socid, 1, 0, 0, 'style="width: 95%"', 0, 0, 0, '', '', 1);
|
print $form->selectarray('socid', $companies, $socid, 1, 0, 0, 'style="width: 95%"', 0, 0, 0, '', '', 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
if(! empty($conf->category->enabled) && $mode == 'customer') {
|
|
||||||
// Customer Category
|
|
||||||
print '<tr><td>'.$langs->trans("CustomersProspectsCategoriesShort").'</td><td>';
|
|
||||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, 'parent', null, null, 1);
|
|
||||||
print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null, null, "90%");
|
|
||||||
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);
|
print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam_typent);
|
||||||
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
|
||||||
|
if (! empty($conf->category->enabled)) {
|
||||||
if ($mode == 'customer')
|
if ($mode == 'customer')
|
||||||
{
|
{
|
||||||
$cat_type = Categorie::TYPE_CUSTOMER;
|
$cat_type = Categorie::TYPE_CUSTOMER;
|
||||||
@ -287,8 +283,12 @@ if ($mode == 'supplier')
|
|||||||
$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Supplier"));
|
$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Supplier"));
|
||||||
}
|
}
|
||||||
print '<tr><td>'.$cat_label.'</td><td>';
|
print '<tr><td>'.$cat_label.'</td><td>';
|
||||||
print $formother->select_categories($cat_type, $categ_id, 'categ_id', true);
|
$cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, 'parent', null, null, 1);
|
||||||
|
print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null, null, "90%");
|
||||||
|
//print $formother->select_categories($cat_type, $categ_id, 'categ_id', true);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// User
|
// User
|
||||||
print '<tr><td>'.$langs->trans("CreatedBy").'</td><td>';
|
print '<tr><td>'.$langs->trans("CreatedBy").'</td><td>';
|
||||||
print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user