From 4b9bb824d0bd9e8af3d857dc451d4770cf8fb7c4 Mon Sep 17 00:00:00 2001 From: atm-lena Date: Wed, 6 Jan 2021 11:16:51 +0100 Subject: [PATCH 1/2] FIX balance starting and ending fiscal month #14197 --- htdocs/accountancy/bookkeeping/balance.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 375b17e3b96..5550c837812 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -87,6 +87,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) From 2a31ca969f31539426cbe93cc4e8736d83a5f551 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Jan 2021 21:29:58 +0100 Subject: [PATCH 2/2] FIX #15388 #15891 --- htdocs/bom/bom_card.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index 591e9a69d88..b28cf459094 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -185,6 +185,8 @@ if (empty($reshook)) unset($_POST['disable_stock_change']); $object->fetchLines(); + + $object->calculateCosts(); } } } @@ -227,6 +229,8 @@ if (empty($reshook)) unset($_POST['disable_stock_change']); $object->fetchLines(); + + $object->calculateCosts(); } } }