garant/Modele/Periodicite.php
2025-12-05 10:57:03 +00:00

74 lines
1.8 KiB
PHP
Executable File

<?php
require_once 'Framework/Modele.php';
class Periodicite extends Modele
{
public function getListe()
{
if (est_anglophone())
{
$sql = 'SELECT codePeriodicite as `code`, libelleEng as libelle FROM periodicite order by libelle';
}
else
{
$sql = 'SELECT codePeriodicite as `code`, libelle FROM periodicite order by ordre';
}
$liste = $this->executerRequete($sql);
return $liste->fetchAll(PDO::FETCH_ASSOC);
}
public function getListeFiltrer()
{
if (est_anglophone())
{
$sql = 'SELECT codePeriodicite as `code`, libelleEng as libelle FROM periodicite
WHERE codePeriodicite NOT IN ("L","P") order by libelle';
}
else
{
$sql = 'SELECT codePeriodicite as `code`, libelle FROM periodicite
WHERE codePeriodicite NOT IN ("L","P") order by ordre';
}
$liste = $this->executerRequete($sql);
return $liste->fetchAll(PDO::FETCH_ASSOC);
}
public function getPeriodiciteFactureGarant()
{
if (est_anglophone())
{
$sql = 'SELECT codePeriodicite as `code`, libelleEng as libelle FROM periodicitefacturegarant order by libelle';
}
else
{
$sql = 'SELECT codePeriodicite as `code`, libelle FROM periodicitefacturegarant order by ordre';
}
$liste = $this->executerRequete($sql);
return $liste->fetchAll(PDO::FETCH_ASSOC);
}
public function getTypeConvention()
{
if (est_anglophone())
{
$sql = 'SELECT codeConvention as `code`, libelleEng as libelle FROM typeconventiongarant order by ordre;';
}
else
{
$sql = 'SELECT codeConvention as `code`, libelle FROM typeconventiongarant order by ordre;';
}
$liste = $this->executerRequete($sql);
return $liste->fetchAll(PDO::FETCH_ASSOC);
}
}