From 80354cd8d624491a202603a9cf41861f4502b8d4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 21 Jul 2016 18:43:44 +0200 Subject: [PATCH] FIX Can correct stock of lot using eatby or sell by date --- htdocs/product/stock/mouvement.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index d5deffb2c12..0a979a0add7 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -109,8 +109,12 @@ if ($action == "correct_stock") if ($product->hasbatch()) { $batch=GETPOST('batch_number'); - $eatby=GETPOST('eatby'); - $sellby=GETPOST('sellby'); + + //$eatby=GETPOST('eatby'); + //$sellby=GETPOST('sellby'); + $eatby=dol_mktime(12, 0, 0, GETPOST('eatbymonth'), GETPOST('eatbyday'), GETPOST('eatbyyear')); + $sellby=dol_mktime(12, 0, 0, GETPOST('sellbymonth'), GETPOST('sellbyday'), GETPOST('sellbyyear')); + $result=$product->correct_stock_batch( $user, $id,