2011-08-25 10:57:37 +02:00
|
|
|
<?php
|
|
|
|
Class Commandes
|
|
|
|
{
|
2011-09-06 14:40:31 +02:00
|
|
|
protected $enumerations = array('Full' => 'FU', 'Compact' => 'CO', 'CreditRecommendation' => 'CR');
|
2011-08-25 10:57:37 +02:00
|
|
|
|
|
|
|
public function __construct()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setCommandes($parametres)
|
|
|
|
{
|
2011-09-27 17:33:24 +02:00
|
|
|
$commandes = new Application_Model_CommandesGiants();
|
2011-08-25 10:57:37 +02:00
|
|
|
$data = array( 'login' => $parametres->login,
|
|
|
|
'date' => $parametres->date,
|
|
|
|
'typeReport' => $parametres->typeReport,
|
|
|
|
'price' => $parametres->price,
|
2011-08-25 11:02:36 +02:00
|
|
|
'pays' => $parametres->pays
|
2011-08-25 10:57:37 +02:00
|
|
|
);
|
|
|
|
$commandes->insert($data);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getCommandesByLogin($login)
|
|
|
|
{
|
2011-09-27 17:33:24 +02:00
|
|
|
$commandes = new Application_Model_CommandesGiants();
|
2011-08-25 10:57:37 +02:00
|
|
|
return ($commandes->getCommandesGiantByLogin($login));
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getCommandesByDate($date)
|
|
|
|
{
|
2011-09-27 17:33:24 +02:00
|
|
|
$commandes = new Application_Model_CommandesGiants();
|
2011-08-25 10:57:37 +02:00
|
|
|
return ($commandes->getCommandesGiantByDate($date));
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getCommandesByLoginAndDate($login, $date)
|
|
|
|
{
|
2011-09-27 17:33:24 +02:00
|
|
|
$commandes = new Application_Model_CommandesGiants();
|
2011-08-25 10:57:37 +02:00
|
|
|
return ($commandes->getCommandesGiantByLoginAndDate($login, $date));
|
|
|
|
}
|
|
|
|
|
2011-09-06 14:40:31 +02:00
|
|
|
public function getCommandeExistToday($login, $date, $type, $pays)
|
2011-08-25 10:57:37 +02:00
|
|
|
{
|
2011-09-27 17:33:24 +02:00
|
|
|
$commande = new Application_Model_CommandesGiants();
|
2011-09-06 14:40:31 +02:00
|
|
|
$result = $commande->getCommandesGiantLoginDateReportType($login, $date, $type, $pays);
|
2011-08-25 10:57:37 +02:00
|
|
|
if(!empty($result))
|
|
|
|
return (true);
|
|
|
|
return (false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-09-27 17:33:24 +02:00
|
|
|
?>
|