diff --git a/htdocs/blockedlog/admin/blockedlog.php b/htdocs/blockedlog/admin/blockedlog.php
index f90385b4209..423c40d9e20 100644
--- a/htdocs/blockedlog/admin/blockedlog.php
+++ b/htdocs/blockedlog/admin/blockedlog.php
@@ -79,7 +79,10 @@ $form = new Form($db);
$block_static = new BlockedLog($db);
$block_static->loadTrackedEvents();
-llxHeader('', $langs->trans("BlockedLogSetup"));
+$title = $langs->trans("BlockedLogSetup");
+$help_url="EN:Module_Unalterable_Archives_-_Logs|FR:Module_Archives_-_Logs_Inaltérable";
+
+llxHeader('', $title, $help_url);
$linkback = '';
if ($withtab) {
diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php
index 265c12dd49c..385101c7468 100644
--- a/htdocs/blockedlog/admin/blockedlog_list.php
+++ b/htdocs/blockedlog/admin/blockedlog_list.php
@@ -275,8 +275,9 @@ if (GETPOST('withtab', 'alpha')) {
} else {
$title = $langs->trans("BrowseBlockedLog");
}
+$help_url="EN:Module_Unalterable_Archives_-_Logs|FR:Module_Archives_-_Logs_Inaltérable";
-llxHeader('', $langs->trans("BrowseBlockedLog"));
+llxHeader('', $title, $help_url);
$MAXLINES = 10000;
diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php
index 7b5bbbc50c5..049bcf89c8b 100644
--- a/htdocs/fourn/class/fournisseur.facture.class.php
+++ b/htdocs/fourn/class/fournisseur.facture.class.php
@@ -530,7 +530,8 @@ class FactureFournisseur extends CommonInvoice
$this->lines[$i]->date_end,
$this->lines[$i]->array_options,
$this->lines[$i]->fk_unit,
- $this->lines[$i]->multicurrency_subprice
+ $this->lines[$i]->multicurrency_subprice,
+ $this->lines[$i]->ref_supplier
);
} else {
$this->error = $this->db->lasterror();
@@ -568,7 +569,15 @@ class FactureFournisseur extends CommonInvoice
$line->fk_product,
'HT',
(!empty($line->info_bits) ? $line->info_bits : ''),
- $line->product_type
+ $line->product_type,
+ $line->remise_percent,
+ 0,
+ $line->date_start,
+ $line->date_end,
+ $line->array_options,
+ $line->fk_unit,
+ $line->multicurrency_subprice,
+ $line->ref_supplier
);
} else {
$this->error = $this->db->lasterror();
diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php
index 2c847b9a421..09588389cb1 100644
--- a/htdocs/fourn/commande/dispatch.php
+++ b/htdocs/fourn/commande/dispatch.php
@@ -721,12 +721,12 @@ if ($id > 0 || !empty($ref)) {
print '
'.$langs->trans("Description").' ';
if (!empty($conf->productbatch->enabled)) {
print ''.$langs->trans("batch_number").' ';
- if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
- print ''.$langs->trans("EatByDate").' ';
- }
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
print ''.$langs->trans("SellByDate").' ';
}
+ if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ print ''.$langs->trans("EatByDate").' ';
+ }
} else {
print ' ';
print ' ';
@@ -814,12 +814,12 @@ if ($id > 0 || !empty($ref)) {
print $linktoprod;
print "";
print ' ';
- if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
- print ' ';
- }
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
print ' ';
}
+ if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ print ' ';
+ }
} else {
print '';
print $linktoprod;
@@ -827,12 +827,12 @@ if ($id > 0 || !empty($ref)) {
print ' ';
print $langs->trans("ProductDoesNotUseBatchSerial");
print ' ';
- if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
- print ' ';
- }
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
print ' ';
}
+ if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ print ' ';
+ }
}
} else {
print '';
@@ -901,7 +901,7 @@ if ($id > 0 || !empty($ref)) {
print ' ';
print ' ';
print ' ';
- if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
print '';
$dlcdatesuffix = dol_mktime(0, 0, 0, GETPOST('dlc'.$suffix.'month'), GETPOST('dlc'.$suffix.'day'), GETPOST('dlc'.$suffix.'year'));
print $form->selectDate($dlcdatesuffix, 'dlc'.$suffix, '', '', 1, '');
@@ -917,8 +917,8 @@ if ($id > 0 || !empty($ref)) {
} else {
$type = 'dispatch';
$colspan = 7;
- $colspan = (!empty($conf->global->PRODUCT_DISABLE_EATBY)) ? --$colspan : $colspan;
$colspan = (!empty($conf->global->PRODUCT_DISABLE_SELLBY)) ? --$colspan : $colspan;
+ $colspan = (!empty($conf->global->PRODUCT_DISABLE_EATBY)) ? --$colspan : $colspan;
print ' ';
print ' '; // Qty to dispatch
print '';
@@ -1140,12 +1140,12 @@ if ($id > 0 || !empty($ref)) {
print ' '.$langs->trans("DateDeliveryPlanned").' ';
if (!empty($conf->productbatch->enabled)) {
print ''.$langs->trans("batch_number").' ';
- if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
- print ''.$langs->trans("EatByDate").' ';
- }
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
print ''.$langs->trans("SellByDate").' ';
}
+ if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ print ''.$langs->trans("EatByDate").' ';
+ }
}
print ''.$langs->trans("QtyDispatched").' ';
print ''.$langs->trans("Warehouse").' ';
@@ -1199,16 +1199,20 @@ if ($id > 0 || !empty($ref)) {
$lot = new Productlot($db);
$lot->fetch(0, $objp->pid, $objp->batch);
print ''.$lot->getNomUrl(1).' ';
- if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
- print ''.dol_print_date($lot->eatby, 'day').' ';
- }
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
print ''.dol_print_date($lot->sellby, 'day').' ';
}
+ if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ print ''.dol_print_date($lot->eatby, 'day').' ';
+ }
} else {
print ' ';
- print ' ';
- print ' ';
+ if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
+ print ' ';
+ }
+ if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ print ' ';
+ }
}
}
diff --git a/htdocs/mrp/mo_movements.php b/htdocs/mrp/mo_movements.php
index 7b9c0662e53..803fb3bf5b7 100644
--- a/htdocs/mrp/mo_movements.php
+++ b/htdocs/mrp/mo_movements.php
@@ -133,12 +133,12 @@ $arrayfields = array(
//'m.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500),
//'m.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500)
);
-if (!empty($conf->global->PRODUCT_DISABLE_EATBY)) {
- unset($arrayfields['pl.eatby']);
-}
if (!empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
unset($arrayfields['pl.sellby']);
}
+if (!empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ unset($arrayfields['pl.eatby']);
+}
$objectlist->fields = dol_sort_array($objectlist->fields, 'position');
$arrayfields = dol_sort_array($arrayfields, 'position');
diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php
index ea9901a3794..65e69b91384 100644
--- a/htdocs/product/reassortlot.php
+++ b/htdocs/product/reassortlot.php
@@ -343,10 +343,10 @@ if ($resql) {
print ' ';
print ' ';
print ' ';
- if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
print ' ';
}
- if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
+ if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
print ' ';
}
print ' ';
@@ -367,12 +367,12 @@ if ($resql) {
print_liste_field_titre("Warehouse", $_SERVER["PHP_SELF"], "e.ref", $param, "", '', $sortfield, $sortorder);
//print_liste_field_titre("DesiredStock", $_SERVER["PHP_SELF"], "p.desiredstock",$param,"",'',$sortfield,$sortorder, 'right );
print_liste_field_titre("Batch", $_SERVER["PHP_SELF"], "pb.batch", $param, "", '', $sortfield, $sortorder, 'center ');
- if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
- print_liste_field_titre("EatByDate", $_SERVER["PHP_SELF"], "pb.eatby", $param, "", '', $sortfield, $sortorder, 'center ');
- }
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
print_liste_field_titre("SellByDate", $_SERVER["PHP_SELF"], "pb.sellby", $param, "", '', $sortfield, $sortorder, 'center ');
}
+ if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ print_liste_field_titre("EatByDate", $_SERVER["PHP_SELF"], "pb.eatby", $param, "", '', $sortfield, $sortorder, 'center ');
+ }
print_liste_field_titre("PhysicalStock", $_SERVER["PHP_SELF"], "stock_physique", $param, "", '', $sortfield, $sortorder, 'right ');
// TODO Add info of running suppliers/customers orders
//print_liste_field_titre("TheoreticalStock",$_SERVER["PHP_SELF"], "stock_theorique",$param,"",'',$sortfield,$sortorder, 'right ');
@@ -470,23 +470,30 @@ if ($resql) {
}
print '';
- if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
- print ''.dol_print_date($db->jdate($objp->eatby), 'day').' ';
- }
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
print ''.dol_print_date($db->jdate($objp->sellby), 'day').' ';
}
+
+ if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ print ''.dol_print_date($db->jdate($objp->eatby), 'day').' ';
+ }
+
print '';
//if ($objp->seuil_stock_alerte && ($objp->stock_physique < $objp->seuil_stock_alerte)) print img_warning($langs->trans("StockTooLow")).' ';
print $objp->stock_physique;
print ' ';
+
print '';
print img_picto($langs->trans("StockMovement"), 'movement', 'class="pictofixedwidth"');
print ''.$langs->trans("Movements").' ';
print ' ';
+
print ''.$product_static->LibStatut($objp->statut, 5, 0).' ';
+
print ''.$product_static->LibStatut($objp->tobuy, 5, 1).' ';
+
print ' ';
+
print "\n";
$i++;
}
diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php
index 88927e94890..1096d8b9e09 100644
--- a/htdocs/product/stock/movement_list.php
+++ b/htdocs/product/stock/movement_list.php
@@ -136,12 +136,12 @@ $arrayfields = array(
//'m.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500),
//'m.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500)
);
-if (!empty($conf->global->PRODUCT_DISABLE_EATBY)) {
- unset($arrayfields['pl.eatby']);
-}
if (!empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
unset($arrayfields['pl.sellby']);
}
+if (!empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ unset($arrayfields['pl.eatby']);
+}
// Security check
if (!$user->rights->stock->mouvement->lire) {
diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
index 7fcee8f59cd..0e4cf4b6a20 100644
--- a/htdocs/product/stock/product.php
+++ b/htdocs/product/stock/product.php
@@ -946,14 +946,14 @@ if (!$variants) {
}
print '';
print ''.$langs->trans("batch_number").' ';
- if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
- $colspan--;
- print ''.$langs->trans("EatByDate").' ';
- }
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
$colspan--;
print ''.$langs->trans("SellByDate").' ';
}
+ if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ $colspan--;
+ print ''.$langs->trans("EatByDate").' ';
+ }
print ' ';
print ' ';
print ' ';
@@ -1061,16 +1061,16 @@ if (!$variants) {
print ' ';
print ' ';
print ' ';
- if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
- print '';
- print $form->selectDate($pdluo->eatby, 'eatby', '', '', 1, '', 1, 0);
- print ' ';
- }
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
print '';
print $form->selectDate($pdluo->sellby, 'sellby', '', '', 1, '', 1, 0);
print ' ';
}
+ if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ print '';
+ print $form->selectDate($pdluo->eatby, 'eatby', '', '', 1, '', 1, 0);
+ print ' ';
+ }
print ''.$pdluo->qty.($pdluo->qty < 0 ? ' '.img_warning() : '').' ';
print ' ';
print ' ';
@@ -1087,14 +1087,14 @@ if (!$variants) {
print $product_lot_static->getNomUrl(1);
print '';
$colspan = 3;
- if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
- $colspan--;
- print ''.dol_print_date($pdluo->eatby, 'day').' ';
- }
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
$colspan--;
print ''.dol_print_date($pdluo->sellby, 'day').' ';
}
+ if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ $colspan--;
+ print ''.dol_print_date($pdluo->eatby, 'day').' ';
+ }
print ''.$pdluo->qty.($pdluo->qty < 0 ? ' '.img_warning() : '').' ';
print ' ';
print '';
diff --git a/htdocs/product/stock/productlot_card.php b/htdocs/product/stock/productlot_card.php
index d8ac85d004d..22f32f0c8b9 100644
--- a/htdocs/product/stock/productlot_card.php
+++ b/htdocs/product/stock/productlot_card.php
@@ -463,16 +463,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print $producttmp->getNomUrl(1, 'stock')." - ".$producttmp->label;
print ' ';
- // Eat by
- if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
- print '';
- print $form->editfieldkey($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
- print ' ';
- print $form->editfieldval($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
- print ' ';
- print ' ';
- }
-
// Sell by
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
print '';
@@ -483,6 +473,16 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print ' ';
}
+ // Eat by
+ if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ print '';
+ print $form->editfieldkey($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
+ print ' ';
+ print $form->editfieldval($langs->trans('EatByDate'), 'eatby', $object->eatby, $object, $user->rights->stock->creer, 'datepicker');
+ print ' ';
+ print ' ';
+ }
+
if (!empty($conf->global->PRODUCT_LOT_ENABLE_TRACEABOLITY)) {
print ''.$form->editfieldkey($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer).' ';
print ''.$form->editfieldval($langs->trans('ManufacturingDate'), 'manufacturing_date', $object->manufacturing_date, $object, $user->rights->stock->creer, 'datepicker').' ';
diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php
index 6e2ab53dd0e..05d628902fb 100644
--- a/htdocs/product/stock/tpl/stockcorrection.tpl.php
+++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php
@@ -120,18 +120,18 @@ if (!empty($conf->productbatch->enabled) &&
print '';
print ' ';
print '';
- if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
- print ''.$langs->trans("EatByDate").' ';
- $eatbyselected = dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear'));
- print $form->selectDate($eatbyselected, 'eatby', '', '', 1, "");
- print ' ';
- }
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
print ''.$langs->trans("SellByDate").' ';
$sellbyselected = dol_mktime(0, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear'));
print $form->selectDate($sellbyselected, 'sellby', '', '', 1, "");
print ' ';
}
+ if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ print ''.$langs->trans("EatByDate").' ';
+ $eatbyselected = dol_mktime(0, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear'));
+ print $form->selectDate($eatbyselected, 'eatby', '', '', 1, "");
+ print ' ';
+ }
print ' ';
}
diff --git a/htdocs/product/stock/tpl/stocktransfer.tpl.php b/htdocs/product/stock/tpl/stocktransfer.tpl.php
index dcd19be4ad6..27c9b2acb21 100644
--- a/htdocs/product/stock/tpl/stocktransfer.tpl.php
+++ b/htdocs/product/stock/tpl/stocktransfer.tpl.php
@@ -110,16 +110,16 @@ if (!empty($conf->productbatch->enabled) &&
print '';
print '';
- if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
- print ''.$langs->trans("EatByDate").' ';
- print $form->selectDate(($d_eatby ? $d_eatby : $pdluo->eatby), 'eatby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled
- print ' ';
- }
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
print ''.$langs->trans("SellByDate").' ';
print $form->selectDate(($d_sellby ? $d_sellby : $pdluo->sellby), 'sellby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled
print ' ';
}
+ if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ print ''.$langs->trans("EatByDate").' ';
+ print $form->selectDate(($d_eatby ? $d_eatby : $pdluo->eatby), 'eatby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled
+ print ' ';
+ }
print ' ';
}
diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php
index c9a638e7cde..57ef8981393 100644
--- a/htdocs/reception/card.php
+++ b/htdocs/reception/card.php
@@ -999,12 +999,12 @@ if ($action == 'create') {
}
if (!empty($conf->productbatch->enabled)) {
print ''.$langs->trans("batch_number").' ';
- if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
- print ''.$langs->trans("EatByDate").' ';
- }
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
print ''.$langs->trans("SellByDate").' ';
}
+ if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ print ''.$langs->trans("EatByDate").' ';
+ }
}
print "\n";
}
@@ -1153,12 +1153,12 @@ if ($action == 'create') {
if (!empty($conf->productbatch->enabled)) {
if (!empty($product->status_batch)) {
print ' ';
- if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
print '';
print $form->selectDate($dispatchLines[$indiceAsked]['DLC'], 'dlc'.$indiceAsked, '', '', 1, "");
print ' ';
}
- if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
+ if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
print '';
print $form->selectDate($dispatchLines[$indiceAsked]['DLUO'], 'dluo'.$indiceAsked, '', '', 1, "");
print ' ';
@@ -1829,14 +1829,14 @@ if ($action == 'create') {
print ''.$formproduct->selectWarehouses($lines[$i]->fk_entrepot, 'entl'.$line_id, '', 1, 0, $lines[$i]->fk_product, '', 1).' ';
// Batch number managment
if ($conf->productbatch->enabled && !empty($lines[$i]->product->status_batch)) {
- print ' ';
- if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
- print $langs->trans('EatByDate').' : ';
- print $form->selectDate($lines[$i]->eatby, 'dlc'.$line_id, '', '', 1, "").'';
- }
+ print ' ';
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
print $langs->trans('SellByDate').' : ';
- print $form->selectDate($lines[$i]->sellby, 'dluo'.$line_id, '', '', 1, "");
+ print $form->selectDate($lines[$i]->sellby, 'dlc'.$line_id, '', '', 1, "").'';
+ }
+ if (empty($conf->global->PRODUCT_DISABLE_EATBY)) {
+ print $langs->trans('EatByDate').' : ';
+ print $form->selectDate($lines[$i]->eatby, 'dluo'.$line_id, '', '', 1, "");
}
print ' ';
}