From 680ce297c5ce6ccdc8a5d5192cddf96e311e62dd Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Tue, 25 Mar 2014 15:41:20 +0100 Subject: [PATCH] Update mouvement.php sometime $year not filled then made "bug" the search propose to fill with current year in this case --- htdocs/product/stock/mouvement.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index ee3f0b65639..9c6e9d80594 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -537,8 +537,8 @@ if ($resql) $productidselected=$key; $productlabelselected=$val; } - $datebefore=dol_get_first_day($year, $month?$month:1, true); - $dateafter=dol_get_last_day($year, $month?$month:12, true); + $datebefore=dol_get_first_day($year?$year:strftime("%Y",time()), $month?$month:1, true); + $dateafter=dol_get_last_day($year?$year:strftime("%Y",time()), $month?$month:12, true); $balancebefore=$movement->calculateBalanceForProductBefore($productidselected, $datebefore); $balanceafter=$movement->calculateBalanceForProductBefore($productidselected, $dateafter);