Dolibarrize v18
This commit is contained in:
parent
a09a29fa6a
commit
06f8291e07
@ -717,6 +717,7 @@ while ($i < $imaxinloop) {
|
|||||||
// Show here line of result
|
// Show here line of result
|
||||||
$j = 0;
|
$j = 0;
|
||||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||||
|
|
||||||
// Action column
|
// Action column
|
||||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td class="nowrap center">';
|
print '<td class="nowrap center">';
|
||||||
|
|||||||
@ -137,6 +137,23 @@ if ($user->socid) {
|
|||||||
}
|
}
|
||||||
$result = restrictedArea($user, 'produit|service', 0, 'product&product');
|
$result = restrictedArea($user, 'produit|service', 0, 'product&product');
|
||||||
|
|
||||||
|
// Definition of array of fields for columns
|
||||||
|
$arrayfields = array(
|
||||||
|
array('type'=>'varchar', 'label'=>'Ref', 'checked'=>1, 'enabled'=>1, 'position'=>1),
|
||||||
|
array('type'=>'varchar', 'label'=>'Label', 'checked'=>1, 'enabled'=>1, 'position'=>1),
|
||||||
|
array('type'=>'int', 'label'=>'Warehouse', 'checked'=>1, 'enabled'=>1, 'position'=>1),
|
||||||
|
array('type'=>'varchar', 'label'=>'Lot', 'checked'=>1, 'enabled'=>1, 'position'=>1),
|
||||||
|
array('type'=>'varchar', 'label'=>'DLC', 'checked'=>1, 'enabled'=>1, 'position'=>1),
|
||||||
|
array('type'=>'varchar', 'label'=>'DLUO', 'checked'=>1, 'enabled'=>1, 'position'=>1),
|
||||||
|
array('type'=>'int', 'label'=>'Stock', 'checked'=>1, 'enabled'=>1, 'position'=>1),
|
||||||
|
array('type'=>'int', 'label'=>'StatusSell', 'checked'=>1, 'enabled'=>1, 'position'=>1),
|
||||||
|
array('type'=>'int', 'label'=>'StatusBuy', 'checked'=>1, 'enabled'=>1, 'position'=>1),
|
||||||
|
);
|
||||||
|
|
||||||
|
//$arrayfields['anotherfield'] = array('type'=>'integer', 'label'=>'AnotherField', 'checked'=>1, 'enabled'=>1, 'position'=>90, 'csslist'=>'right');
|
||||||
|
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -734,6 +751,9 @@ while ($i < $imaxinloop) {
|
|||||||
// Action column
|
// Action column
|
||||||
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
@ -741,9 +761,15 @@ while ($i < $imaxinloop) {
|
|||||||
print $product_static->getNomUrl(1, '', 16);
|
print $product_static->getNomUrl(1, '', 16);
|
||||||
//if ($objp->stock_theorique < $objp->seuil_stock_alerte) print ' '.img_warning($langs->trans("StockTooLow"));
|
//if ($objp->stock_theorique < $objp->seuil_stock_alerte) print ' '.img_warning($langs->trans("StockTooLow"));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<td>'.$objp->label.'</td>';
|
print '<td>'.$objp->label.'</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
|
||||||
if (isModEnabled("service") && $type == 1) {
|
if (isModEnabled("service") && $type == 1) {
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
@ -757,6 +783,9 @@ while ($i < $imaxinloop) {
|
|||||||
} else {
|
} else {
|
||||||
print $objp->duration;
|
print $objp->duration;
|
||||||
}
|
}
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
//print '<td class="right">'.$objp->stock_theorique.'</td>';
|
//print '<td class="right">'.$objp->stock_theorique.'</td>';
|
||||||
@ -768,6 +797,9 @@ while ($i < $imaxinloop) {
|
|||||||
if ($objp->fk_entrepot > 0) {
|
if ($objp->fk_entrepot > 0) {
|
||||||
print $warehousetmp->getNomUrl(1);
|
print $warehousetmp->getNomUrl(1);
|
||||||
}
|
}
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Lot
|
// Lot
|
||||||
@ -775,14 +807,23 @@ while ($i < $imaxinloop) {
|
|||||||
if ($product_lot_static->batch) {
|
if ($product_lot_static->batch) {
|
||||||
print $product_lot_static->getNomUrl(1);
|
print $product_lot_static->getNomUrl(1);
|
||||||
}
|
}
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
|
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
|
||||||
print '<td class="center">'.dol_print_date($db->jdate($objp->sellby), 'day').'</td>';
|
print '<td class="center">'.dol_print_date($db->jdate($objp->sellby), 'day').'</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
|
if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
|
||||||
print '<td class="center">'.dol_print_date($db->jdate($objp->eatby), 'day').'</td>';
|
print '<td class="center">'.dol_print_date($db->jdate($objp->eatby), 'day').'</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
@ -801,15 +842,27 @@ while ($i < $imaxinloop) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
print img_picto($langs->trans("StockMovement"), 'movement', 'class="pictofixedwidth"');
|
print img_picto($langs->trans("StockMovement"), 'movement', 'class="pictofixedwidth"');
|
||||||
print '<a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$product_static->id.'&search_warehouse='.$objp->fk_entrepot.'&search_batch='.($objp->batch != 'Undefined' ? $objp->batch : 'Undefined').'">'.$langs->trans("Movements").'</a>';
|
print '<a href="'.DOL_URL_ROOT.'/product/stock/movement_list.php?idproduct='.$product_static->id.'&search_warehouse='.$objp->fk_entrepot.'&search_batch='.($objp->batch != 'Undefined' ? $objp->batch : 'Undefined').'">'.$langs->trans("Movements").'</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
|
||||||
print '<td class="right nowrap">'.$product_static->LibStatut($objp->statut, 5, 0).'</td>';
|
print '<td class="right nowrap">'.$product_static->LibStatut($objp->statut, 5, 0).'</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
|
||||||
print '<td class="right nowrap">'.$product_static->LibStatut($objp->tobuy, 5, 1).'</td>';
|
print '<td class="right nowrap">'.$product_static->LibStatut($objp->tobuy, 5, 1).'</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
|
||||||
// Fields values from hook
|
// Fields values from hook
|
||||||
$parameters = array('obj'=>$objp);
|
$parameters = array('obj'=>$objp);
|
||||||
@ -819,12 +872,27 @@ while ($i < $imaxinloop) {
|
|||||||
// Action column
|
// Action column
|
||||||
if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If no record found
|
||||||
|
if ($num == 0) {
|
||||||
|
$colspan = 2;
|
||||||
|
foreach ($arrayfields as $key => $val) {
|
||||||
|
if (!empty($val['checked'])) {
|
||||||
|
$colspan++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|
||||||
print '</table>'."\n";
|
print '</table>'."\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user