diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 1547983da0c..f73d06c703c 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -88,6 +88,7 @@ if (empty($search_date_start) && !GETPOSTISSET('formfilteraction')) } else { $month_start = ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); $year_start = dol_print_date(dol_now(), '%Y'); + if (dol_print_date(dol_now(), '%m') < $month_start) $year_start--; // If current month is lower that starting fiscal month, we start last year $year_end = $year_start + 1; $month_end = $month_start - 1; if ($month_end < 1) diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index 5c170d0aa72..38e8b601cf6 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -181,8 +181,10 @@ if (empty($reshook)) unset($_POST['qty_frozen']); unset($_POST['disable_stock_change']); - $object->fetchLines(); - } + $object->fetchLines(); + + $object->calculateCosts(); + } } } @@ -221,7 +223,9 @@ if (empty($reshook)) unset($_POST['qty_frozen']); unset($_POST['disable_stock_change']); - $object->fetchLines(); + $object->fetchLines(); + + $object->calculateCosts(); } } }