Import initial du projet Production

This commit is contained in:
KANE LAZENI
2025-12-01 16:12:12 +00:00
commit 2f364ab2fc
14257 changed files with 3395325 additions and 0 deletions

61
Modele/Garantiecollege.php Executable file
View File

@@ -0,0 +1,61 @@
<?php
require_once 'Framework/Modele.php';
class Garantiecollege extends Modele {
public function getGarBaseCollege($idCollege)
{
$sql = 'select A.*, A.id as idGarantie
from garantiecollege A
join garantie B on (B.codeSociete=A.codeSociete) and (B.codeGarantie=A.codeGarantie)
Where (A.idCollege=?) and (A.optionnelle!="1") order by A.optionnelle, B.ordre';
$garanties = $this->executerRequete($sql, array($idCollege));
return $garanties;
}
public function getGarOptCollege($idCollege)
{
$sql = 'select A.*, IFNULL(B.idCollege,"0") as idCollege
from garantie A
left join garantiecollege B on (B.idCollege=?) and (B.codeSociete=A.codeSociete) and (B.codeGarantie=A.codeGarantie)
Where (A.optionnelle="1") order by A.ordre';
$garanties = $this->executerRequete($sql, array($idCollege));
return $garanties;
}
public function getGarOptCollegeAcq($idCollege)
{
$sql = 'select B.*, B.id as idGarantie
from garantie A
join garantiecollege B on (B.codeSociete=A.codeSociete) and (B.codeGarantie=A.codeGarantie)
Where (B.idCollege=?) and (A.optionnelle="1") order by A.ordre';
$garanties = $this->executerRequete($sql, array($idCollege));
return $garanties;
}
public function ajouter($idCollege, $codeGarantie)
{
$sql = 'insert into garantiecollege (codeSociete, idCollege, numeroPolice, codeGarantie, garantie, garantieEng, optionnelle,
additionnelle, tauxPlafond, forfaitPlafond, ordre, plafondLettre, champApplication)
select A.codeSociete, B.id as idCollege, B.numeroPolice, A.codeGarantie, A.libelle, A.libelleEng, A.optionnelle,
A.additionnelle, A.tauxPlafond,
A.forfaitPlafond, A.ordre, A.plafondLettre, A.champApplication
from garantie A
join police B on (B.codeSociete=A.codeSociete)
where (B.id=?) and (A.codeGarantie=?)';
$this->executerRequete($sql, array($idCollege, $codeGarantie));
}
public function supprimer($id)
{
$sql = 'DELETE FROM garantiecollege WHERE (id=?)';
$this->executerRequete($sql, array($id));
}
}