MBilans : Modification de l'empreinte
This commit is contained in:
parent
0a55a7533c
commit
e0eacb08d7
@ -3380,7 +3380,7 @@ class Metier_Insee_MInsee extends Metier_Insee_Table
|
||||
}
|
||||
}
|
||||
if (strtoupper($entrep['typeBilan'])=='S') {
|
||||
$mBil = new Metier_Partenaires_MBilans(0, $this->iDb);
|
||||
$mBil = new Metier_Partenaires_MBilans();
|
||||
$tabTmp = $mBil->bilanSimplifie2Normal($tabBilan);
|
||||
$tabBilan = array_merge($tabTmp, $tabBilan);
|
||||
}
|
||||
@ -4691,7 +4691,8 @@ class Metier_Insee_MInsee extends Metier_Insee_Table
|
||||
1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1311, 1312, 1313,
|
||||
1500, 1501, 1502, 1503, 1504
|
||||
))) {
|
||||
$mBil = new Metier_Partenaires_MBilans($siren, $this->iDb);
|
||||
$mBil = new Metier_Partenaires_MBilans();
|
||||
$mBil->setSiren($siren);
|
||||
$tabBilans = $mBil->listeBilans(false);
|
||||
$derExercice = 0;
|
||||
foreach ($tabBilans as $idx => $bilan) {
|
||||
@ -4715,7 +4716,8 @@ class Metier_Insee_MInsee extends Metier_Insee_Table
|
||||
}
|
||||
// --- Dissolution mais bilan après événements
|
||||
elseif ($rubrique == 'D') {
|
||||
$mBil = new Metier_Partenaires_MBilans($siren, $this->iDb);
|
||||
$mBil = new Metier_Partenaires_MBilans();
|
||||
$mBil->setSiren($siren);
|
||||
$tabBilans = $mBil->listeBilans(false, 3);
|
||||
$derExercice = 0;
|
||||
foreach ($tabBilans as $idx => $bilan) {
|
||||
|
@ -273,13 +273,19 @@ class Metier_Partenaires_MBilans
|
||||
|
||||
/**
|
||||
* MBilans
|
||||
* @param string $siren
|
||||
* @param string $db
|
||||
*/
|
||||
public function __construct($siren, $db = null)
|
||||
public function __construct()
|
||||
{
|
||||
$this->conn = Zend_Registry::get('doctrine');
|
||||
$this->siren = $siren;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set SIREN
|
||||
* @param string $val
|
||||
*/
|
||||
public function setSiren($val)
|
||||
{
|
||||
$this->siren = $val;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -297,13 +303,12 @@ class Metier_Partenaires_MBilans
|
||||
*/
|
||||
public function listeBilansDepose($accesPartenaire = false)
|
||||
{
|
||||
$fields = "Bodacc_Date_Parution, dateEffet, typeEven";
|
||||
$where = "siren=:siren AND Rubrique='comptes'";
|
||||
if ($this->companyEvenDateStop !== null) {
|
||||
$where = " AND dateEffet<'".$this->companyEvenDateStop."'";
|
||||
}
|
||||
$where.= " ORDER BY dateEffet DESC LIMIT 0,1";
|
||||
|
||||
$fields = "Bodacc_Date_Parution, dateEffet, typeEven";
|
||||
$listeSql = "SELECT $fields FROM jo.bodacc_detail WHERE $where";
|
||||
try {
|
||||
$listeStmt = $this->conn->prepare($listeSql);
|
||||
|
@ -1049,7 +1049,8 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
||||
|
||||
// --- Liste des bilans
|
||||
$tabBilan = $tabBil = $tabRegX = array();
|
||||
$mBil = new Metier_Partenaires_MBilans($siren, $iDb);
|
||||
$mBil = new Metier_Partenaires_MBilans();
|
||||
$mBil->setSiren($siren);
|
||||
$tabBilans = $mBil->listeBilans($accesDist);
|
||||
$NBBILAN = count($tabBilans);
|
||||
if ($NBBILAN > 0) {
|
||||
@ -2207,7 +2208,8 @@ function calculIndiScore($siren, $nic=0, $accesDist=false, $cycleClient=2, $mail
|
||||
$TYPEMERE='PM';
|
||||
}
|
||||
}
|
||||
$mBilA = new Metier_Partenaires_MBilans($lien->siren, $iDb);
|
||||
$mBilA = new Metier_Partenaires_MBilans();
|
||||
$mBilA->setSiren($lien->siren);
|
||||
$tabBilansA = $mBilA->listeBilans(false, 2);
|
||||
$nbBilansA = count($tabBilansA);
|
||||
if ($nbBilansA > 0) {
|
||||
|
@ -994,7 +994,8 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
||||
|
||||
// --- Liste des bilans
|
||||
$tabBilan = $tabBil = $this->tabRegX = array();
|
||||
$mBil = new Metier_Partenaires_MBilans($siren, $this->db);
|
||||
$mBil = new Metier_Partenaires_MBilans();
|
||||
$mBil->setSiren($siren);
|
||||
if ($this->companyEvenDateStop !== null) {
|
||||
$mBil->setEvenLimit($this->companyEvenDateStop);
|
||||
}
|
||||
@ -2150,7 +2151,8 @@ class Metier_Scoring_Base extends Metier_Scoring_Vars
|
||||
$this->TYPEMERE='PM';
|
||||
}
|
||||
}
|
||||
$mBilA = new Metier_Partenaires_MBilans($lien->siren, $this->db);
|
||||
$mBilA = new Metier_Partenaires_MBilans();
|
||||
$mBilA->setSiren($lien->siren);
|
||||
$tabBilansA = $mBilA->listeBilans(false, 2);
|
||||
$nbBilansA = count($tabBilansA);
|
||||
if ($nbBilansA > 0) {
|
||||
|
@ -3331,7 +3331,8 @@ class Entreprise extends Scores_Ws_Server
|
||||
}
|
||||
|
||||
$millesime = Metier_Util_Date::dateT('Ymd','d/m/Y',$millesime);
|
||||
$mBil = new Metier_Partenaires_MBilans($siren);
|
||||
$mBil = new Metier_Partenaires_MBilans();
|
||||
$mBil->setSiren($siren);
|
||||
$tabBilan = $mBil->getBilan($millesime, $typeBilan, $ref, true);
|
||||
|
||||
$resultBilan = new Bilan();
|
||||
@ -3376,7 +3377,8 @@ class Entreprise extends Scores_Ws_Server
|
||||
$this->sendError('1010');
|
||||
}
|
||||
|
||||
$mBil = new Metier_Partenaires_MBilans($siren);
|
||||
$mBil = new Metier_Partenaires_MBilans();
|
||||
$mBil->setSiren($siren);
|
||||
$tabBilans = $mBil->listeBilans(true);
|
||||
foreach($tabBilans as $bilan)
|
||||
{
|
||||
@ -3561,7 +3563,8 @@ class Entreprise extends Scores_Ws_Server
|
||||
$efftr = $tabIdentite['Effectif']*1;
|
||||
$fj = $tabIdentite['FJ'];
|
||||
|
||||
$mBil = new Metier_Partenaires_MBilans($siren);
|
||||
$mBil = new Metier_Partenaires_MBilans();
|
||||
$mBil->setSiren($siren);
|
||||
$tabBilans = $mBil->listeBilans(true);
|
||||
$nbBilans = count($tabBilans);
|
||||
$tabBilan = $tabBil = array();
|
||||
|
@ -2730,7 +2730,8 @@ class Entreprise extends Scores_Ws_Server
|
||||
//Ratios
|
||||
global $tva, $mBil, $efftr, $tabInfla;
|
||||
require_once 'Metier/Scores/MRatios.php';
|
||||
$mBil = new Metier_Partenaires_MBilans($siren);
|
||||
$mBil = new Metier_Partenaires_MBilans();
|
||||
$mBil->setSiren($siren);
|
||||
$tabBilans = $mBil->listeBilans($accesPartenaire, 5);
|
||||
$nbBilans = count($tabBilans);
|
||||
$tabBilan = $tabBil = array();
|
||||
@ -4250,7 +4251,8 @@ class Entreprise extends Scores_Ws_Server
|
||||
}
|
||||
|
||||
$millesime = Metier_Util_Date::dateT('Ymd','d/m/Y',$millesime);
|
||||
$mBil = new Metier_Partenaires_MBilans($siren);
|
||||
$mBil = new Metier_Partenaires_MBilans();
|
||||
$mBil->setSiren($siren);
|
||||
$tabBilan = $mBil->getBilan($millesime, $typeBilan, $ref, true);
|
||||
|
||||
// --- Bilan condidentiel
|
||||
@ -4315,7 +4317,8 @@ class Entreprise extends Scores_Ws_Server
|
||||
$this->sendError('1010');
|
||||
}
|
||||
|
||||
$mBil = new Metier_Partenaires_MBilans($siren);
|
||||
$mBil = new Metier_Partenaires_MBilans();
|
||||
$mBil->setSiren($siren);
|
||||
$tabBilans = $mBil->listeBilans(true);
|
||||
foreach($tabBilans as $bilan) {
|
||||
$element = new ListeBilans();
|
||||
@ -4627,7 +4630,8 @@ class Entreprise extends Scores_Ws_Server
|
||||
}
|
||||
|
||||
// Ratios
|
||||
$mBil = new Metier_Partenaires_MBilans($siren);
|
||||
$mBil = new Metier_Partenaires_MBilans();
|
||||
$mBil->setSiren($siren);
|
||||
$tabBilans = $mBil->listeBilans($accesPartenaire, 5);
|
||||
$nbBilans = count($tabBilans);
|
||||
$tabBilan = $tabBil = array();
|
||||
|
Loading…
Reference in New Issue
Block a user