diff --git a/includes/giant/search.php b/includes/giant/search.php index 0b0ace8b6..506331686 100644 --- a/includes/giant/search.php +++ b/includes/giant/search.php @@ -2,16 +2,29 @@ // --------------------------------------------------------------------------- // // Recherche Giant // --------------------------------------------------------------------------- // +$pays = $formR['pays']; + define('NUM_ROWS', 10); define('MAX_ROWS', 200); -$gServiceHeader = new StdClass; -$gServiceHeader->ConsumerId = '006'; -$gServiceHeader->Provider = new StdClass; -$gServiceHeader->Provider->ProviderId = '001'; -$gServiceHeader->Provider->CountryCode = 'BE'; -$gServiceHeader->TimeStamp = date('Y-m-d\TH:i:s'); -$gServiceHeader->TestIndication = true; +$gServiceHeader = new StdClass; +$gServiceHeader->ConsumerId = '006'; +$gServiceHeader->Provider = new StdClass; +switch ($pays) { +case 1: + $gServiceHeader->Provider->ProviderId = '001'; + $gServiceHeader->Provider->CountryCode = 'BE'; + break; +case 2: + $gServiceHeader->Provider->ProviderId = '003'; + $gServiceHeader->Provider->CountryCode = 'NL'; + break; +default: + print 'Erreur sur le pays'; + exit; +} +$gServiceHeader->TimeStamp = date('Y-m-d\TH:i:s'); +$gServiceHeader->TestIndication = true; $soap_header = new SoapHeader('http://services.giant-net.com/'. @@ -29,7 +42,7 @@ $o = new StdClass; $o->IncludePhoneticMatches = 'false'; if (empty($siret) == false) { $o->Query = new StdClass; - $o->Query->VatNumber = $siret; + $o->Query->CompanyId = $siret; $o->IncludeSuggestions = 'false'; $fonction = 'AdvancedSearch'; } else { diff --git a/includes/recherche/recherche_ent.php b/includes/recherche/recherche_ent.php index ade8d6eb5..b4cefd3fa 100644 --- a/includes/recherche/recherche_ent.php +++ b/includes/recherche/recherche_ent.php @@ -61,7 +61,8 @@ if (isset($formR['pays']) == false) { } if ($_SESSION['tabInfo']['international_giant'] == 1) { $recherchePaysListe = array('France', - 'Belgique'); + 'Belgique', + 'Pays bas'); print '
'; print ''; print '