Loading config/application.config.php +3 −0 Changes for config/application.config.php: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -68,6 +68,9 @@ class AppConfig public static function getEnv() { $forcedEnv = self::get('dev', 'forced-env', false); if (false !== $forcedEnv) return $forcedEnv; return getenv('APPLICATION_ENV') ?: 'dev'; } Loading module/Application/src/Model/FormuleCalcul.php +24 −4 Changes for module/Application/src/Model/FormuleCalcul.php: 24 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -971,6 +971,7 @@ END FORMULE_" . $this->getName() . ";"; 'OR' => 'traductionFunctionOr', 'ISBLANK' => 'traductionFunctionIsBlank', 'SUMIF' => 'traductionFunctionSumIf', 'MID' => 'traductionFunctionMid', ]; if (array_key_exists($term['name'], $functions)) { Loading Loading @@ -1143,9 +1144,9 @@ END FORMULE_" . $this->getName() . ";"; } } var_dump($plage); var_dump($critere); var_dump($plageSomme); // var_dump($plage); // var_dump($critere); // var_dump($plageSomme); $plsql = "val := 0;\n"; for ($c = 0; $c <= ($plage['colEnd'] - $plage['colBegin']); $c++) { Loading Loading @@ -1174,7 +1175,26 @@ END FORMULE_" . $this->getName() . ";"; $plsql .= 'RETURN ' . $this->traductionExpr($term['valExpr']); echo '<pre>' . htmlentities($plsql) . '</pre>'; // echo '<pre>' . htmlentities($plsql) . '</pre>'; return $plsql; } private function traductionFunctionMid(array &$expr, int $i): string { $term = $expr[$i]; $plsql = 'SUBSTR('; $plExprs = []; foreach ($term['exprs'] as $e => $fExpr) { $fExpr[] = null; $plExprs[$e] = $this->traductionExpr($fExpr); } $plsql .= implode(', ', $plExprs); $plsql .= ')'; return $plsql; } Loading module/Application/view/application/formule/test-saisir.phtml +4 −1 Changes for module/Application/view/application/formule/test-saisir.phtml: 4 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -392,7 +392,10 @@ echo $this->tag('h1', ['class' => 'page-header'])->html($title); </table> <div> <h2>Informations de débogage <a class="btn btn-secondary btn-sm" data-bs-toggle="collapse" href="#debug-info">Afficher/masquer</a> <button class="btn btn-secondary btn-sm" type="button" data-bs-toggle="collapse" data-bs-target="#debug-info" aria-expanded="false" aria-controls="debug-info"> Afficher/masquer </button> </h2> <div class="collapse debug-info" id="debug-info"></div> </div> Loading Loading
config/application.config.php +3 −0 Changes for config/application.config.php: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -68,6 +68,9 @@ class AppConfig public static function getEnv() { $forcedEnv = self::get('dev', 'forced-env', false); if (false !== $forcedEnv) return $forcedEnv; return getenv('APPLICATION_ENV') ?: 'dev'; } Loading
module/Application/src/Model/FormuleCalcul.php +24 −4 Changes for module/Application/src/Model/FormuleCalcul.php: 24 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -971,6 +971,7 @@ END FORMULE_" . $this->getName() . ";"; 'OR' => 'traductionFunctionOr', 'ISBLANK' => 'traductionFunctionIsBlank', 'SUMIF' => 'traductionFunctionSumIf', 'MID' => 'traductionFunctionMid', ]; if (array_key_exists($term['name'], $functions)) { Loading Loading @@ -1143,9 +1144,9 @@ END FORMULE_" . $this->getName() . ";"; } } var_dump($plage); var_dump($critere); var_dump($plageSomme); // var_dump($plage); // var_dump($critere); // var_dump($plageSomme); $plsql = "val := 0;\n"; for ($c = 0; $c <= ($plage['colEnd'] - $plage['colBegin']); $c++) { Loading Loading @@ -1174,7 +1175,26 @@ END FORMULE_" . $this->getName() . ";"; $plsql .= 'RETURN ' . $this->traductionExpr($term['valExpr']); echo '<pre>' . htmlentities($plsql) . '</pre>'; // echo '<pre>' . htmlentities($plsql) . '</pre>'; return $plsql; } private function traductionFunctionMid(array &$expr, int $i): string { $term = $expr[$i]; $plsql = 'SUBSTR('; $plExprs = []; foreach ($term['exprs'] as $e => $fExpr) { $fExpr[] = null; $plExprs[$e] = $this->traductionExpr($fExpr); } $plsql .= implode(', ', $plExprs); $plsql .= ')'; return $plsql; } Loading
module/Application/view/application/formule/test-saisir.phtml +4 −1 Changes for module/Application/view/application/formule/test-saisir.phtml: 4 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -392,7 +392,10 @@ echo $this->tag('h1', ['class' => 'page-header'])->html($title); </table> <div> <h2>Informations de débogage <a class="btn btn-secondary btn-sm" data-bs-toggle="collapse" href="#debug-info">Afficher/masquer</a> <button class="btn btn-secondary btn-sm" type="button" data-bs-toggle="collapse" data-bs-target="#debug-info" aria-expanded="false" aria-controls="debug-info"> Afficher/masquer </button> </h2> <div class="collapse debug-info" id="debug-info"></div> </div> Loading