Merge correction graydon
This commit is contained in:
parent
6d97e638e0
commit
941ed33cae
@ -36,7 +36,7 @@ $report = $q->fetchOne();
|
||||
|
||||
//@TODO : si le rapport existe déjà ou que la date n'est pas très éloigné
|
||||
if($report==FALSE){
|
||||
|
||||
$firephp->info('Pas en cache');
|
||||
//Vérifier si le rapport en ligne à déjà été demandé
|
||||
$q = Doctrine_Query::create()
|
||||
->from('Commandes')
|
||||
@ -46,13 +46,19 @@ if($report==FALSE){
|
||||
$report = new Report();
|
||||
$report = $commandes->Report;
|
||||
if($commandes == FALSE && !isset($report->id)){
|
||||
$xml = getIdentite($companyProductIdentifier, $path.'/'.$fileName);
|
||||
$xml = getIdentite($CompanyProductIdentifier, $path.'/'.$fileName);
|
||||
//La commande à déjà été demandé
|
||||
}else{
|
||||
$xml = $report->content;
|
||||
}
|
||||
//Le rapport est disponible
|
||||
}else{
|
||||
|
||||
$country = Doctrine_Query::create()
|
||||
->from('Country')
|
||||
->where('graydon_country = ?', $pays)
|
||||
->fetchOne();
|
||||
|
||||
//Enregistrement d'une fausse commande dans la bdd
|
||||
$commandes = new Commandes();
|
||||
$commandes->reference = $placeOrderResult->OrderStatus->OrderReference;
|
||||
@ -67,14 +73,7 @@ if($report==FALSE){
|
||||
$commandes->transactionidentifier = $transactionIdentifier;
|
||||
$commandes->user = $tabInfo['login'];
|
||||
$commandes->mode = $_SESSION['graydon']['mode'];
|
||||
|
||||
$country = Doctrine_Query::create()
|
||||
->from('Country')
|
||||
->where('graydon_country = ?', $pays)
|
||||
->fetchOne();
|
||||
|
||||
$commandes->Country = $country;
|
||||
|
||||
$commandes->save();
|
||||
$firephp->log($commandes->toArray(),'dataCommandes');
|
||||
$commandes_id = $commandes->id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user