giant: formR[pays] = CountryCode
This commit is contained in:
parent
ac9878e254
commit
0374477e88
@ -40,7 +40,7 @@ foreach ($commandes as $c) {
|
||||
->where('OrderId = ?', $c['OrderId'])
|
||||
->fetchOne();
|
||||
|
||||
$soap_client = getClient($pays, 'credit-data');
|
||||
$soap_client = getClient($q->CountryCode, 'credit-data');
|
||||
|
||||
$o = new StdClass;
|
||||
$o->ProviderOrderId = $q->ProviderOrderId;
|
||||
|
@ -5,22 +5,8 @@
|
||||
function getProviderId($pays)
|
||||
{
|
||||
switch ($pays) {
|
||||
case 1: return '001';
|
||||
case 2: return '003';
|
||||
default:
|
||||
print 'Erreur sur le pays';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------- //
|
||||
// getCountryCode
|
||||
// --------------------------------------------------------------------------- //
|
||||
function getCountryCode($pays)
|
||||
{
|
||||
switch ($pays) {
|
||||
case 1: return 'BE';
|
||||
case 2: return 'NL';
|
||||
case 'BE': return '001';
|
||||
case 'NL': return '003';
|
||||
default:
|
||||
print 'Erreur sur le pays';
|
||||
exit;
|
||||
@ -35,8 +21,8 @@ function getClient($pays, $service)
|
||||
$service_header = new StdClass;
|
||||
$service_header->ConsumerId = '006';
|
||||
$service_header->Provider = new StdClass;
|
||||
$service_header->Provider->CountryCode = $pays;
|
||||
$service_header->Provider->ProviderId = getProviderId($pays);
|
||||
$service_header->Provider->CountryCode = getCountryCode($pays);
|
||||
$service_header->TimeStamp = date('Y-m-d\TH:i:s');
|
||||
$service_header->TestIndication = true;
|
||||
|
||||
|
@ -57,12 +57,12 @@ foreach (array('siret',
|
||||
|
||||
<?php
|
||||
if (isset($formR['pays']) == false) {
|
||||
$formR['pays'] = 0;
|
||||
$formR['pays'] = 'FR';
|
||||
}
|
||||
if ($_SESSION['tabInfo']['international_giant'] == 1) {
|
||||
$recherchePaysListe = array('France',
|
||||
'Belgique',
|
||||
'Pays bas');
|
||||
$recherchePaysListe = array('FR' => 'France',
|
||||
'BE' => 'Belgique',
|
||||
'NL' => 'Pays bas');
|
||||
print '<div class="fieldgrp">';
|
||||
print '<label>Pays</label>';
|
||||
print '<select name="formR[pays]">';
|
||||
|
@ -167,7 +167,7 @@ if (isset($_REQUEST['p'])) {
|
||||
// --------------------------------------------------------------------------- //
|
||||
// Giant
|
||||
// --------------------------------------------------------------------------- //
|
||||
if ($typeRech == 'ent' && isset($formR['pays']) && $formR['pays'] > 0) {
|
||||
if ($typeRech == 'ent' && isset($formR['pays']) && $formR['pays'] != 'FR') {
|
||||
include_once('giant/search.php');
|
||||
exit;
|
||||
}
|
||||
|
@ -41,8 +41,8 @@ function giantCopieDuRapport($rapport_a_copier)
|
||||
function giantGetIdentite($pays, $company, $level, $type, $lang)
|
||||
{
|
||||
$c = new Commandes;
|
||||
$c->CountryCode = $pays;
|
||||
$c->ProviderId = getProviderId($pays);
|
||||
$c->CountryCode = getCountryCode($pays);
|
||||
$c->CompanyId = $company;
|
||||
$c->ServiceLevelName = 'Immediate';
|
||||
$c->DataSetType = $type;
|
||||
@ -99,8 +99,8 @@ function giantGetIdentite($pays, $company, $level, $type, $lang)
|
||||
}
|
||||
|
||||
$r = new Rapports;
|
||||
$r->ProviderId = $c->ProviderId;
|
||||
$r->CountryCode = $c->CountryCode;
|
||||
$r->ProviderId = $c->ProviderId;
|
||||
$r->CompanyId = $company;
|
||||
$r->ServiceLevelName = $level;
|
||||
$r->DataSetType = $type;
|
||||
@ -193,8 +193,8 @@ if ($level == 'Immediate') {
|
||||
// Si on a un rapport
|
||||
$rapports = Doctrine_Query::create()
|
||||
->from('Rapports')
|
||||
->andWhere('CountryCode = ?', $pays)
|
||||
->andWhere('ProviderId = ?', getProviderId($pays))
|
||||
->andWhere('CountryCode = ?', getCountryCode($pays))
|
||||
->andwhere('CompanyId = ?', $company)
|
||||
->andWhere('ServiceLevelName = ?', 'Immediate')
|
||||
->andWhere('DataSetType = ?', $type)
|
||||
@ -234,8 +234,8 @@ if ($level == 'Immediate') {
|
||||
$soap_client = getClient($pays, 'credit-data');
|
||||
|
||||
$c = new Commandes;
|
||||
$c->CountryCode = $pays;
|
||||
$c->ProviderId = getProviderId($pays);
|
||||
$c->CountryCode = getCountryCode($pays);
|
||||
$c->CompanyId = $company;
|
||||
$c->CompanyName = companyName($pays, $company);
|
||||
$c->ServiceLevelName = $level;
|
||||
|
Loading…
x
Reference in New Issue
Block a user