From ff3e54cb934599c7cd681d3e3ab1bbb268de1a6c Mon Sep 17 00:00:00 2001 From: benoitpotier Date: Thu, 23 Mar 2017 15:57:19 +0100 Subject: [PATCH] fix bad request sql --- library/Metier/Partenaires/MBilans.php | 2 +- library/WsScore/Entreprise/v0.8/Service.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Metier/Partenaires/MBilans.php b/library/Metier/Partenaires/MBilans.php index 74fda94c..fe6f1254 100644 --- a/library/Metier/Partenaires/MBilans.php +++ b/library/Metier/Partenaires/MBilans.php @@ -364,7 +364,7 @@ class Metier_Partenaires_MBilans // --- 1 : consultation d'un membre de scores et décisions // --- 147 : consultation d'un opérateur de l'arménie if ($idClient > 1 && $idClient != 147) { - $where.= " AND (confidentiel_client == '".$idClient."' OR confidentiel = 0)"; + $where.= " AND (confidentiel_client = ".$idClient." OR confidentiel = 0)"; } $where.= " ORDER BY dateExercice DESC, CASE typeBilan WHEN 'N' THEN 1 WHEN 'S' THEN 2 ELSE 3 END"; diff --git a/library/WsScore/Entreprise/v0.8/Service.php b/library/WsScore/Entreprise/v0.8/Service.php index 91c51281..f3acfa04 100644 --- a/library/WsScore/Entreprise/v0.8/Service.php +++ b/library/WsScore/Entreprise/v0.8/Service.php @@ -4632,7 +4632,7 @@ class Entreprise extends Scores_Ws_Server // Ratios $mBil = new Metier_Partenaires_MBilans(); $mBil->setSiren($siren); - $tabBilans = $mBil->listeBilans($accesPartenaire, 5); + $tabBilans = $mBil->listeBilans($accesPartenaire, 5, $this->User->idClient); $nbBilans = count($tabBilans); $tabBilan = $tabBil = array(); if ($nbBilans > 0) {