From 85f19810ad81cf29f2b4e58cc05268f667d73d00 Mon Sep 17 00:00:00 2001 From: Dany wm Date: Wed, 21 Feb 2024 20:44:29 +0100 Subject: [PATCH] Bug : verification ne fonctionne pas avec MY_REPORT=N --- include/constant.php | 1 + include/verif_bilan.inc.php | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/constant.php b/include/constant.php index cc2868b6d..f05eb71f9 100644 --- a/include/constant.php +++ b/include/constant.php @@ -171,6 +171,7 @@ if (DEBUGNOALYSS == 0) { ini_set('log_errors', 1); ini_set('log_errors_max_len', 0); + } // Erreur define("NOERROR", 0); diff --git a/include/verif_bilan.inc.php b/include/verif_bilan.inc.php index 9c66783dc..05e90e595 100644 --- a/include/verif_bilan.inc.php +++ b/include/verif_bilan.inc.php @@ -108,8 +108,16 @@ echo '

'._('Vérification des comptes' $bilan=new Acc_Bilan($cn); $periode=new Periode($cn); list ($start_periode,$end_periode)=$periode->get_limit($exercice); -$bilan->from=$start_periode->p_id; -$bilan->to=$end_periode->p_id; +global $g_parameter; +if ( $g_parameter->MY_REPORT=="Y") { + $bilan->from=$start_periode->p_id; + $bilan->to=$end_periode->p_id; + +} else { + $first_periode=$cn->get_value("select to_char(p_start,'YYYY-MM-DD') from parm_periode order by p_start limit 1"); + $bilan->from=format_date($first_periode,'YYYY-MM-DD','DD.MM.YYYY'); + $bilan->to=$end_periode->last_day(); +} $bilan->verify(); echo '

'; ?>