extranet/library/Giant/Commandes.php
2011-09-27 15:33:24 +00:00

50 lines
1.5 KiB
PHP

<?php
Class Commandes
{
protected $enumerations = array('Full' => 'FU', 'Compact' => 'CO', 'CreditRecommendation' => 'CR');
public function __construct()
{
}
public function setCommandes($parametres)
{
$commandes = new Application_Model_CommandesGiants();
$data = array( 'login' => $parametres->login,
'date' => $parametres->date,
'typeReport' => $parametres->typeReport,
'price' => $parametres->price,
'pays' => $parametres->pays
);
$commandes->insert($data);
}
public function getCommandesByLogin($login)
{
$commandes = new Application_Model_CommandesGiants();
return ($commandes->getCommandesGiantByLogin($login));
}
public function getCommandesByDate($date)
{
$commandes = new Application_Model_CommandesGiants();
return ($commandes->getCommandesGiantByDate($date));
}
public function getCommandesByLoginAndDate($login, $date)
{
$commandes = new Application_Model_CommandesGiants();
return ($commandes->getCommandesGiantByLoginAndDate($login, $date));
}
public function getCommandeExistToday($login, $date, $type, $pays)
{
$commande = new Application_Model_CommandesGiants();
$result = $commande->getCommandesGiantLoginDateReportType($login, $date, $type, $pays);
if(!empty($result))
return (true);
return (false);
}
}
?>