';
// Action column
@@ -1467,7 +1491,7 @@ while ($i < min($num, $limit)) {
// Label
if (!empty($arrayfields['p.label']['checked'])) {
- print '| '.$product_static->label.' | ';
+ print ''.$obj->label.' | ';
if (!$i) {
$totalarray['nbfield']++;
}
@@ -1477,7 +1501,7 @@ while ($i < min($num, $limit)) {
if (!empty($arrayfields['p.fk_product_type']['checked'])) {
print '';
$s = '';
- if ($product_static->type == 0) {
+ if ($obj->fk_product_type == 0) {
$s .= img_picto($langs->trans("Product"), 'product', 'class="paddingleftonly paddingrightonly colorgrey"');
} else {
$s .= img_picto($langs->trans("Service"), 'service', 'class="paddingleftonly paddingrightonly colorgrey"');
@@ -1491,7 +1515,7 @@ while ($i < min($num, $limit)) {
// Barcode
if (!empty($arrayfields['p.barcode']['checked'])) {
- print ' | '.$product_static->barcode.' | ';
+ print ''.$obj->barcode.' | ';
if (!$i) {
$totalarray['nbfield']++;
}
@@ -1535,7 +1559,7 @@ while ($i < min($num, $limit)) {
// Weight
if (!empty($arrayfields['p.weight']['checked'])) {
print '';
- print $product_static->weight;
+ print $obj->weight;
print ' | ';
if (!$i) {
$totalarray['nbfield']++;
@@ -1555,7 +1579,7 @@ while ($i < min($num, $limit)) {
// Length
if (!empty($arrayfields['p.length']['checked'])) {
print '';
- print $product_static->length;
+ print $obj->length;
print ' | ';
if (!$i) {
$totalarray['nbfield']++;
@@ -1575,7 +1599,7 @@ while ($i < min($num, $limit)) {
// Width
if (!empty($arrayfields['p.width']['checked'])) {
print '';
- print $product_static->width;
+ print $obj->width;
print ' | ';
if (!$i) {
$totalarray['nbfield']++;
@@ -1595,7 +1619,7 @@ while ($i < min($num, $limit)) {
// Height
if (!empty($arrayfields['p.height']['checked'])) {
print '';
- print $product_static->height;
+ print $obj->height;
print ' | ';
if (!$i) {
$totalarray['nbfield']++;
@@ -1615,7 +1639,7 @@ while ($i < min($num, $limit)) {
// Surface
if (!empty($arrayfields['p.surface']['checked'])) {
print '';
- print $product_static->surface;
+ print $obj->surface;
print ' | ';
if (!$i) {
$totalarray['nbfield']++;
@@ -1635,7 +1659,7 @@ while ($i < min($num, $limit)) {
// Volume
if (!empty($arrayfields['p.volume']['checked'])) {
print '';
- print $product_static->volume;
+ print $obj->volume;
print ' | ';
if (!$i) {
$totalarray['nbfield']++;
@@ -1667,7 +1691,7 @@ while ($i < min($num, $limit)) {
// Sell price
if (!empty($arrayfields['p.sellprice']['checked'])) {
print '';
- if ($product_static->status && $usercancreadprice) {
+ if ($obj->tosell && $usercancreadprice) {
if ($obj->price_base_type == 'TTC') {
print ''.price($obj->price_ttc).' '.$langs->trans("TTC").'';
} else {
@@ -1690,7 +1714,7 @@ while ($i < min($num, $limit)) {
$productpricescache[$obj->rowid] = array();
}
- if ($product_static->status && $usercancreadprice) {
+ if ($obj->tosell && $usercancreadprice) {
// Make 1 request for all price levels (without filter on price_level) and saved result into an cache array
// then reuse the cache array if we need prices for other price levels
$sqlp = "SELECT p.rowid, p.fk_product, p.price, p.price_ttc, p.price_level, p.date_price, p.price_base_type";
@@ -1735,188 +1759,198 @@ while ($i < min($num, $limit)) {
}
}
}
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+}
}
// Better buy price
- if (!empty($arrayfields['p.minbuyprice']['checked'])) {
- print '';
- if ($product_static->status_buy && $obj->bestpurchaseprice != '' && $usercancreadprice) {
- if ($product_fourn->find_min_price_product_fournisseur($obj->rowid) > 0) {
- if ($product_fourn->product_fourn_price_id > 0) {
- if ((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_order") && !empty($user->rights->supplier_order->lire)) || (isModEnabled("supplier_invoice") && !empty($user->rights->supplier_invoice->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).'';
- } else {
- print ''.price($product_fourn->fourn_unitprice).' '.$langs->trans("HT").'';
- }
+if (!empty($arrayfields['p.minbuyprice']['checked'])) {
+ print ' | ';
+ if ($product_static->status_buy && $obj->bestpurchaseprice != '' && $usercancreadprice) {
+ if ($product_fourn->find_min_price_product_fournisseur($obj->rowid) > 0) {
+ if ($product_fourn->product_fourn_price_id > 0) {
+ if ((isModEnabled("fournisseur") && !empty($user->rights->fournisseur->lire) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || (isModEnabled("supplier_order") && !empty($user->rights->supplier_order->lire)) || (isModEnabled("supplier_invoice") && !empty($user->rights->supplier_invoice->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).'';
+ } else {
+ print ''.price($product_fourn->fourn_unitprice).' '.$langs->trans("HT").'';
}
}
- }
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ print '';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
}
+ print '';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+}
// Number of buy prices
- if (!empty($arrayfields['p.numbuyprice']['checked'])) {
- print '';
- if ($product_static->status_buy && $usercancreadprice) {
- if (count($productFournList = $product_fourn->list_product_fournisseur_price($obj->rowid)) > 0) {
- $htmltext = $product_fourn->display_price_product_fournisseur(1, 1, 0, 1, $productFournList);
- print $form->textwithpicto(count($productFournList), $htmltext);
- }
+if (!empty($arrayfields['p.numbuyprice']['checked'])) {
+ print ' | ';
+ if ($product_static->status_buy && $usercancreadprice) {
+ if (count($productFournList = $product_fourn->list_product_fournisseur_price($obj->rowid)) > 0) {
+ $htmltext = $product_fourn->display_price_product_fournisseur(1, 1, 0, 1, $productFournList);
+ print $form->textwithpicto(count($productFournList), $htmltext);
}
- print ' | ';
}
+ print '';
+}
// VAT or Sell Tax Rate
- if (!empty($arrayfields['p.tva_tx']['checked'])) {
- print '';
- print vatrate($obj->tva_tx, true);
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
+if (!empty($arrayfields['p.tva_tx']['checked'])) {
+ print '';
+ print vatrate($obj->tva_tx, true);
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
}
+}
// WAP
- if (!empty($arrayfields['p.pmp']['checked'])) {
- print '';
- if ($usercancreadprice) {
- print ''.price($product_static->pmp, 1, $langs)."";
- }
- print ' | ';
+if (!empty($arrayfields['p.pmp']['checked'])) {
+ print '';
+ if ($usercancreadprice) {
+ print ''.price($product_static->pmp, 1, $langs)."";
}
+ print ' | ';
+}
// Cost price
- if (!empty($arrayfields['p.cost_price']['checked'])) {
- print '';
- //print $obj->cost_price;
- if ($usercancreadprice) {
- print ''.price($obj->cost_price).' '.$langs->trans("HT").'';
- }
- print ' | ';
+if (!empty($arrayfields['p.cost_price']['checked'])) {
+ print '';
+ //print $obj->cost_price;
+ if ($usercancreadprice) {
+ print ''.price($obj->cost_price).' '.$langs->trans("HT").'';
}
+ print ' | ';
+}
// Limit alert
- if (!empty($arrayfields['p.seuil_stock_alerte']['checked'])) {
- print '';
- if ($product_static->type != 1) {
- print $obj->seuil_stock_alerte;
- }
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
+if (!empty($arrayfields['p.seuil_stock_alerte']['checked'])) {
+ print '';
+ if ($product_static->type != 1) {
+ print $obj->seuil_stock_alerte;
}
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+}
// Desired stock
- if (!empty($arrayfields['p.desiredstock']['checked'])) {
- print '';
- if ($product_static->type != 1) {
- print $obj->desiredstock;
- }
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
+if (!empty($arrayfields['p.desiredstock']['checked'])) {
+ print '';
+ if ($product_static->type != 1) {
+ print $obj->desiredstock;
}
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+}
// Stock real
- if (!empty($arrayfields['p.stock']['checked'])) {
- print '';
- if ($product_static->type != 1) {
- if ($obj->seuil_stock_alerte != '' && $product_static->stock_reel < (float) $obj->seuil_stock_alerte) {
- print img_warning($langs->trans("StockLowerThanLimit", $obj->seuil_stock_alerte)).' ';
- }
- if ($usercancreadprice) {
- print price(price2num($product_static->stock_reel, 'MS'));
- }
+if (!empty($arrayfields['p.stock']['checked'])) {
+ print ' | ';
+ if ($product_static->type != 1) {
+ if ($obj->seuil_stock_alerte != '' && $product_static->stock_reel < (float) $obj->seuil_stock_alerte) {
+ print img_warning($langs->trans("StockLowerThanLimit", $obj->seuil_stock_alerte)).' ';
}
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ if ($usercancreadprice) {
+ print price(price2num($product_static->stock_reel, 'MS'));
}
}
+ print '';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+}
// Stock virtual
- if (!empty($arrayfields['stock_virtual']['checked'])) {
- print '';
- if ($product_static->type != 1) {
- if ($obj->seuil_stock_alerte != '' && $product_static->stock_theorique < (float) $obj->seuil_stock_alerte) {
- print img_warning($langs->trans("StockLowerThanLimit", $obj->seuil_stock_alerte)).' ';
- }
- if ($usercancreadprice) {
- print price(price2num($product_static->stock_theorique, 'MS'));
- }
+if (!empty($arrayfields['stock_virtual']['checked'])) {
+ print ' | ';
+ if ($product_static->type != 1) {
+ if ($obj->seuil_stock_alerte != '' && $product_static->stock_theorique < (float) $obj->seuil_stock_alerte) {
+ print img_warning($langs->trans("StockLowerThanLimit", $obj->seuil_stock_alerte)).' ';
}
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ if ($usercancreadprice) {
+ print price(price2num($product_static->stock_theorique, 'MS'));
}
}
+ print '';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+}
// Lot/Serial
- if (!empty($arrayfields['p.tobatch']['checked'])) {
- print '';
- print $product_static->getLibStatut(1, 2);
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
+if (!empty($arrayfields['p.tobatch']['checked'])) {
+ print '';
+ print $product_static->getLibStatut(1, 2);
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
}
+}
// Country
- if (!empty($arrayfields['p.fk_country']['checked'])) {
- print ''.getCountry($obj->fk_country, 0, $db).' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
+if (!empty($arrayfields['p.fk_country']['checked'])) {
+ print ''.getCountry($obj->fk_country, 0, $db).' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
}
+}
// State
- if (!empty($arrayfields['p.fk_state']['checked'])) {
- print '';
- if (!empty($obj->fk_state)) {
- print getState($obj->fk_state, 0, $db);
- }
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
+if (!empty($arrayfields['p.fk_state']['checked'])) {
+ print '';
+ if (!empty($obj->fk_state)) {
+ print getState($obj->fk_state, 0, $db);
}
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+}
// Accountancy code sell
- if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell']['checked'])) {
- print ''.$product_static->accountancy_code_sell.' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
+if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell']['checked'])) {
+ print ''.$product_static->accountancy_code_sell.' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
}
- if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_intra']['checked'])) {
- print ''.$product_static->accountancy_code_sell_intra.' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
+}
+if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_intra']['checked'])) {
+ print ''.$product_static->accountancy_code_sell_intra.' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
}
- if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_export']['checked'])) {
- print ''.$product_static->accountancy_code_sell_export.' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
+}
+if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_sell_export']['checked'])) {
+ print ''.$product_static->accountancy_code_sell_export.' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
}
+}
// Accountancy code buy
- if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy']['checked'])) {
- print ''.$product_static->accountancy_code_buy.' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
+if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy']['checked'])) {
+ print ''.$product_static->accountancy_code_buy.' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
}
- if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_intra']['checked'])) {
- print ''.$product_static->accountancy_code_buy_intra.' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
+}
+if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_intra']['checked'])) {
+ print ''.$product_static->accountancy_code_buy_intra.' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
}
- if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_export']['checked'])) {
- print ''.$product_static->accountancy_code_buy_export.' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
+}
+if (!empty($arrayfields[$alias_product_perentity . '.accountancy_code_buy_export']['checked'])) {
+ print ''.$product_static->accountancy_code_buy_export.' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
}
+}
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
@@ -1924,68 +1958,70 @@ while ($i < min($num, $limit)) {
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Date creation
- if (!empty($arrayfields['p.datec']['checked'])) {
- print '';
- print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
+if (!empty($arrayfields['p.datec']['checked'])) {
+ print '';
+ print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser');
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
}
+}
// Date modification
- if (!empty($arrayfields['p.tms']['checked'])) {
- print '';
- print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
+if (!empty($arrayfields['p.tms']['checked'])) {
+ print '';
+ print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser');
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
}
+}
// Status (to sell)
- if (!empty($arrayfields['p.tosell']['checked'])) {
- print '';
- if (!empty($conf->use_javascript_ajax) && $user->hasRight("produit", "creer") && !empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
- print ajax_object_onoff($product_static, 'status', 'tosell', 'ProductStatusOnSell', 'ProductStatusNotOnSell');
- } else {
- print $product_static->LibStatut($product_static->status, 5, 0);
- }
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
+if (!empty($arrayfields['p.tosell']['checked'])) {
+ print '';
+ if (!empty($conf->use_javascript_ajax) && $user->hasRight("produit", "creer") && !empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
+ print ajax_object_onoff($product_static, 'status', 'tosell', 'ProductStatusOnSell', 'ProductStatusNotOnSell');
+ } else {
+ print $product_static->LibStatut($product_static->status, 5, 0);
}
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+}
// Status (to buy)
- if (!empty($arrayfields['p.tobuy']['checked'])) {
- print '';
- if (!empty($conf->use_javascript_ajax) && $user->hasRight("produit", "creer") && !empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
- print ajax_object_onoff($product_static, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy');
- } else {
- print $product_static->LibStatut($product_static->status_buy, 5, 1);
- }
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
+if (!empty($arrayfields['p.tobuy']['checked'])) {
+ print '';
+ if (!empty($conf->use_javascript_ajax) && $user->hasRight("produit", "creer") && !empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
+ print ajax_object_onoff($product_static, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy');
+ } else {
+ print $product_static->LibStatut($product_static->status_buy, 5, 1);
}
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+}
// Action column
- if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
- print '';
- if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
- $selected = 0;
- if (in_array($obj->rowid, $arrayofselected)) {
- $selected = 1;
- }
- print '';
- }
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
+ print '';
+ if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
+ $selected = 0;
+ if (in_array($obj->rowid, $arrayofselected)) {
+ $selected = 1;
}
+ print '';
}
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+}
print "
\n";
+
+}
$i++;
}
diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php
index 5c010e21e26..dd6c21368db 100644
--- a/htdocs/theme/eldy/info-box.inc.php
+++ b/htdocs/theme/eldy/info-box.inc.php
@@ -189,6 +189,31 @@ a.info-box-text-a i.fa.fa-exclamation-triangle {
bottom: 0;
}
+/* customize section img box on list of products */
+.info-box-img {
+ height: 105px !important;
+ width: 88px;
+ border-top-left-radius: 2px;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 2px;
+ display: block;
+ overflow: hidden;
+ float: left;
+ text-align: center;
+ font-size: 2.8em;
+ line-height: 90px;
+ margin-right: 5px;
+ background: var(--colorbacktitle1) !important;
+}
+.info-box-img > img {
+ width: 90%;
+ position: relative;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+}
+
global->MAIN_DISABLE_GLOBAL_BOXSTATS) && !empty($conf->global->MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD)) { ?>
.info-box-icon-text{
opacity: 1;