Update mouvement.php

sometime $year not filled then made "bug" the search
propose to fill with current year in this case
This commit is contained in:
BENKE Charles 2014-03-25 15:41:20 +01:00
parent d98a5d4c6f
commit 680ce297c5

View File

@ -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);