mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Look and feel v14
This commit is contained in:
parent
50de0777e4
commit
1d48b883a7
|
|
@ -1831,7 +1831,7 @@ class Form
|
|||
*
|
||||
* @param string $selected User id or user object of user preselected. If 0 or < -2, we use id of current user. If -1, keep unselected (if empty is allowed)
|
||||
* @param string $htmlname Field name in form
|
||||
* @param int $show_empty 0=list with no empty value, 1=add also an empty value into list
|
||||
* @param int|string $show_empty 0=list with no empty value, 1=add also an empty value into list
|
||||
* @param array $exclude Array list of users id to exclude
|
||||
* @param int $disabled If select list must be disabled
|
||||
* @param array|string $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me
|
||||
|
|
@ -1949,7 +1949,14 @@ class Form
|
|||
// do not use maxwidthonsmartphone by default. Set it by caller so auto size to 100% will work when not defined
|
||||
$out .= '<select class="flat'.($morecss ? ' '.$morecss : ' minwidth200').'" id="'.$htmlname.'" name="'.$htmlname.($multiple ? '[]' : '').'" '.($multiple ? 'multiple' : '').' '.($disabled ? ' disabled' : '').'>';
|
||||
if ($show_empty && !$multiple) {
|
||||
$out .= '<option value="-1"'.((empty($selected) || in_array(-1, $selected)) ? ' selected' : '').'> </option>'."\n";
|
||||
$textforempty = ' ';
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
$textforempty = ' '; // If we use ajaxcombo, we need here to avoid to have an empty element that is too small.
|
||||
}
|
||||
if (!is_numeric($show_empty)) {
|
||||
$textforempty = $show_empty;
|
||||
}
|
||||
$out .= '<option class="optiongrey" value="'.($show_empty < 0 ? $show_empty : -1).'"'.((empty($selected) || in_array(-1, $selected)) ? ' selected' : '').'>'.$textforempty.'</option>'."\n";
|
||||
}
|
||||
if ($show_every) {
|
||||
$out .= '<option value="-2"'.((in_array(-2, $selected)) ? ' selected' : '').'>-- '.$langs->trans("Everybody").' --</option>'."\n";
|
||||
|
|
|
|||
|
|
@ -511,31 +511,37 @@ $moreforfilter = '';
|
|||
if ($user->rights->societe->client->voir || $socid) {
|
||||
$langs->load("commercial");
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= $langs->trans('ThirdPartiesOfSaleRepresentative').': ';
|
||||
$moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth200');
|
||||
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
|
||||
$moreforfilter .= img_picto($tmptitle, 'user');
|
||||
$moreforfilter .= $formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth200');
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
// If the user can view other users
|
||||
if ($user->rights->user->user->lire) {
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= $langs->trans('LinkedToSpecificUsers').': ';
|
||||
$moreforfilter .= $form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||
$tmptitle = $langs->trans('LinkedToSpecificUsers');
|
||||
$moreforfilter .= img_picto($tmptitle, 'user');
|
||||
$moreforfilter .= $form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
// If the user can view prospects other than his'
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= $langs->trans('IncludingProductWithTag').': ';
|
||||
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
|
||||
$moreforfilter .= $form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
|
||||
$tmptitle = $langs->trans('IncludingProductWithTag');
|
||||
$moreforfilter .= img_picto($tmptitle, 'category');
|
||||
//$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
|
||||
//$moreforfilter .= $form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
|
||||
$moreforfilter .= $formother->select_categories(Categorie::TYPE_PRODUCT, $search_product_category, 'parent', 1, $tmptitle);
|
||||
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= $langs->trans('CustomersProspectsCategoriesShort').': ';
|
||||
$moreforfilter .= $formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1);
|
||||
$tmptitle = $langs->trans('CustomersProspectsCategoriesShort');
|
||||
$moreforfilter .= img_picto($tmptitle, 'category');
|
||||
$moreforfilter .= $formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $tmptitle);
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
$parameters = array();
|
||||
|
|
|
|||
|
|
@ -1491,9 +1491,9 @@ if ($resql) {
|
|||
print '<td class="right nowraponall">';
|
||||
if ($obj->tosell) {
|
||||
if ($obj->price_base_type == 'TTC') {
|
||||
print price($obj->price_ttc).' '.$langs->trans("TTC");
|
||||
print '<span class="amount">'.price($obj->price_ttc).' '.$langs->trans("TTC").'</span>';
|
||||
} else {
|
||||
print price($obj->price).' '.$langs->trans("HT");
|
||||
print '<span class="amount">'.price($obj->price).' '.$langs->trans("HT").'</span>';
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
|
|
@ -1546,9 +1546,9 @@ if ($resql) {
|
|||
print '<td class="right nowraponall">';
|
||||
if (!empty($productpricescache[$obj->rowid])) {
|
||||
if ($productpricescache[$obj->rowid][$key]['price_base_type'] == 'TTC') {
|
||||
print price($productpricescache[$obj->rowid][$key]['price_ttc']).' '.$langs->trans("TTC");
|
||||
print '<span class="amount">'.price($productpricescache[$obj->rowid][$key]['price_ttc']).' '.$langs->trans("TTC").'</span>';
|
||||
} else {
|
||||
print price($productpricescache[$obj->rowid][$key]['price']).' '.$langs->trans("HT");
|
||||
print '<span class="amount">'.price($productpricescache[$obj->rowid][$key]['price']).' '.$langs->trans("HT").'</span>';
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
|
|
@ -1568,9 +1568,9 @@ if ($resql) {
|
|||
if ($product_fourn->product_fourn_price_id > 0) {
|
||||
if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire) {
|
||||
$htmltext = $product_fourn->display_price_product_fournisseur(1, 1, 0, 1);
|
||||
print $form->textwithpicto(price($product_fourn->fourn_unitprice * (1 - $product_fourn->fourn_remise_percent / 100) - $product_fourn->fourn_remise).' '.$langs->trans("HT"), $htmltext);
|
||||
print '<span class="amount">'.$form->textwithpicto(price($product_fourn->fourn_unitprice * (1 - $product_fourn->fourn_remise_percent / 100) - $product_fourn->fourn_remise).' '.$langs->trans("HT"), $htmltext).'</span>';
|
||||
} else {
|
||||
print price($product_fourn->fourn_unitprice).' '.$langs->trans("HT");
|
||||
print '<span class="amount">'.price($product_fourn->fourn_unitprice).' '.$langs->trans("HT").'</span>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1606,14 +1606,14 @@ if ($resql) {
|
|||
// WAP
|
||||
if (!empty($arrayfields['p.pmp']['checked'])) {
|
||||
print '<td class="nowrap right">';
|
||||
print price($product_static->pmp, 1, $langs);
|
||||
print '<span class="amount">'.price($product_static->pmp, 1, $langs)."</span>";
|
||||
print '</td>';
|
||||
}
|
||||
// Cost price
|
||||
if (!empty($arrayfields['p.cost_price']['checked'])) {
|
||||
print '<td class="nowrap right">';
|
||||
//print $obj->cost_price;
|
||||
print price($obj->cost_price).' '.$langs->trans("HT");
|
||||
print '<span class="amount">'.price($obj->cost_price).' '.$langs->trans("HT").'</span>';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -280,14 +280,14 @@ if ($result) {
|
|||
$line = $total = $totalsell = $totalStock = 0;
|
||||
while ($line < $totalnboflines) {
|
||||
$objp = $db->fetch_object($result);
|
||||
$total += price2num($objp->estimatedvalue, 'MU');
|
||||
$totalsell += price2num($objp->sellvalue, 'MU');
|
||||
$total += $objp->estimatedvalue;
|
||||
$totalsell += $objp->sellvalue;
|
||||
$totalStock += $objp->stockqty;
|
||||
$line++;
|
||||
}
|
||||
$totalarray['val']['stockqty'] = $totalStock;
|
||||
$totalarray['val']['estimatedvalue'] = $total;
|
||||
$totalarray['val']['estimatedstockvaluesell'] = $totalsell;
|
||||
$totalarray['val']['stockqty'] = price2num($totalStock, 'MS');
|
||||
$totalarray['val']['estimatedvalue'] = price2num($total, 'MT');
|
||||
$totalarray['val']['estimatedstockvaluesell'] = price2num($totalsell, 'MT');
|
||||
}
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
|
||||
|
|
@ -633,7 +633,7 @@ if ($num) {
|
|||
if (!empty($arrayfields["estimatedvalue"]['checked'])) {
|
||||
print '<td class="right">';
|
||||
if (price2num($obj->estimatedvalue, 'MT')) {
|
||||
print price(price2num($obj->estimatedvalue, 'MT'), 1);
|
||||
print '<span class="amount">'.price(price2num($obj->estimatedvalue, 'MT'), 1).'</span>';
|
||||
} else {
|
||||
print '';
|
||||
}
|
||||
|
|
@ -650,7 +650,9 @@ if ($num) {
|
|||
if (!empty($arrayfields["estimatedstockvaluesell"]['checked'])) {
|
||||
print '<td class="right">';
|
||||
if (empty($conf->global->PRODUIT_MULTIPRICES)) {
|
||||
print price(price2num($obj->sellvalue, 'MT'), 1);
|
||||
if ($obj->sellvalue) {
|
||||
print '<span class="amount">'.price(price2num($obj->sellvalue, 'MT'), 1).'</span>';
|
||||
}
|
||||
} else {
|
||||
$htmltext = $langs->trans("OptionMULTIPRICESIsOn");
|
||||
print $form->textwithtooltip($langs->trans("Variable"), $htmltext);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user