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

31 lines
905 B
PHP

<?php
Class Rapports
{
protected $enumerations = array('Full' => 'FU', 'Compact' => 'CO', 'CreditRecommendation' => 'CR');
public function __construct($countryCode, $TestIndication)
{
}
public function setReport($companyId, $type, $pays, $reportSerial)
{
$report = new Application_Model_RapportsGiants();
$datas = array('companyId' => $companyId,
'date' => date('Y-m-d'),
'pays' => $pays,
'type' => $this->enumerations[$type],
'report' => $reportSerial
);
$report->insert($datas);
return ($reportSerial);
}
public function getRapportExist($companyId, $type)
{
$rapports = new Application_Model_RapportsGiants();
$id = $rapports->getReportByIdAndType($companyId, $this->enumerations[$type]);
return ($id);
}
}
?>