403 lines
13 KiB
PHP
403 lines
13 KiB
PHP
<?php
|
|
if (!$_SESSION['connected']) die();
|
|
|
|
require_once(realpath(dirname(__FILE__).'/../../includes/').'/utils.php');
|
|
|
|
$siret=trim(preg_replace('/[^0-9]/', '', $_REQUEST['siret']));
|
|
if (strlen($siret)<>0 && strlen($siret)<>9 && strlen($siret)<>14) die('Paramètres incorrects !');
|
|
|
|
$idEntreprise=trim(preg_replace('/[^0-9]/', '', $_REQUEST['idEntreprise']))*1; // Si id=0 alors non communiqué
|
|
if (($siret*1)==0 && $idEntreprise==0) die('Paramètres incorrects !');
|
|
$siren=substr($siret,0,9);
|
|
|
|
|
|
if($_REQUEST['siren']){
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
try {
|
|
$O = $client->getIdentite($siret, $idEntreprise);
|
|
$etab = $O['result'];
|
|
$firephp->log($etab,'etab');
|
|
} catch (SoapFault $fault) {
|
|
require_once 'soaperror.php';
|
|
processSoapFault($client,$fault,$tabInfo);
|
|
die();
|
|
}
|
|
|
|
$tabInfo=$_SESSION['tabInfo'];
|
|
|
|
try {
|
|
$O = $client->getInfosLogin($tabInfo['login']);
|
|
$user = $O['result'];
|
|
$firephp->log($user,'user');
|
|
} catch (SoapFault $fault) {
|
|
|
|
}
|
|
|
|
?>
|
|
<style>
|
|
#center { background: #ffffff; width:580px; padding:5px; }
|
|
#center h1 { margin:5px; padding:5px; background: #606060; color:#ffffff; font: 600 1.4em arial, verdana, sans-serif; }
|
|
#center h2 { margin:5px; padding:5px; background: #00008c; color:#ffffff; font: bold 1.2em arial, verdana, sans-serif; }
|
|
|
|
.infoTitle {clear:both; float:left; width:180px; margin-left:30px; padding:0 10px 0 0;}
|
|
.infoData {float:left; width:320px; margin:2px 0;}
|
|
|
|
form { }
|
|
form em { color:#FF0000;}
|
|
fieldset {border:0; margin:0; padding:0;}
|
|
fieldset legend{ padding:0 0 0 10px;}
|
|
.fieldgrp{clear:both; width:100%; margin-bottom:.5em; overflow:hidden;}
|
|
.fieldgrp:after{content:"."; display:block; clear:both; visibility:hidden; line-height:0; height:0; }
|
|
.fieldgrp label{font-weight:bold; margin-left:30px; width:180px; clear:both; padding:0 10px 0 0;line-height:22px;_padding-top:3px; float:left; display:block; font-size:108%;}
|
|
.fieldgrp label span{font-weight:normal;}
|
|
.fieldgrp label abbr{color:#4B911C; font-size:120%; vertical-align:middle;}
|
|
.field {width:320px; float:left; padding:0 10px 0 0;line-height:22px;_padding-top:3px;}
|
|
.field .longfield{width:215px;}
|
|
.field .longfield-select{width:220px;}
|
|
.field .smallfield{width:95px;}
|
|
.field .medfield{width:110px;}
|
|
.field input, .field select{ font-size:110%; margin:2px 0; }
|
|
.field input[type="radio"] { margin:0 5px 0 5px; }
|
|
div.submit{ margin-left:200px; padding-left:0px; margin-top:1em; }
|
|
div.submit p.submit-button{margin-top:0;}
|
|
div.submit p.details{font-size:85%;color:#666;margin:0;}
|
|
div.submit p.required-note{margin-top:1em;}
|
|
div.submit p.required-note span{color:#4B911C;_color:#666;font-size:170%;vertical-align:top;}
|
|
|
|
#autreProfil {display:none;}
|
|
#autrePrecisions {display:none;}
|
|
#fournisseur {display:none;}
|
|
#credit {display:none;}
|
|
#impayees {display:none;}
|
|
#retardpaiement {display:none;}
|
|
#litige {display:none;}
|
|
|
|
</style>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
$("#profil").change(function() {
|
|
var val = $("#profil").val();
|
|
if (val == 'Autre'){
|
|
$("#autreProfil").css('display','block');
|
|
}else{
|
|
$("#autreProfil").css('display','none');
|
|
}
|
|
});
|
|
$("#precision").change(function() {
|
|
var val = $("#precision").val();
|
|
if (val == '5'){
|
|
$("#autrePrecisions").css('display','block');
|
|
}else{
|
|
$("#autrePrecisions").css('display','none');
|
|
}
|
|
if (val == '3' || val == '4'){
|
|
$("#fournisseur").css('display','block');
|
|
}else{
|
|
$("#fournisseur").css('display','none');
|
|
}
|
|
if (val == '1'){
|
|
$("#credit").css('display','block');
|
|
}else{
|
|
$("#credit").css('display','none');
|
|
}
|
|
});
|
|
|
|
$('input[type=radio][name=InfoEnq[ImpayeesChoix]]').change(function(){
|
|
var val = $(this).attr('value');
|
|
alert(val);
|
|
if (val == 'oui'){
|
|
$("#impayees").css('display','block');
|
|
}else{
|
|
$("#impayees").css('display','none');
|
|
}
|
|
});
|
|
|
|
$('input[type=radio][name=InfoEnq[RetardPaiementChoix]]').change(function(){
|
|
var val = $(this).attr('value');
|
|
if (val == 'oui'){
|
|
$("#retardpaiement").css('display','block');
|
|
}else{
|
|
$("#retardpaiement").css('display','none');
|
|
}
|
|
});
|
|
|
|
$('input[type=radio][name=InfoEnq[LitigeChoix]]').change(function(){
|
|
var val = $(this).attr('value');
|
|
if (val == 'oui'){
|
|
$("#litige").css('display','block');
|
|
}else{
|
|
$("#litige").css('display','none');
|
|
}
|
|
});
|
|
|
|
$('input[type=text][name=InfoEnq[Encours]]').blur(function(){
|
|
var val = $(this).val();
|
|
if ( val > 20000){
|
|
$('input[type=radio][name=InfoEnq[Type]]').val('gold').attr('checked', 'check');
|
|
}else{
|
|
$('input[type=radio][name=InfoEnq[Type]]').val('premier').attr('checked', 'check');
|
|
}
|
|
});
|
|
|
|
|
|
});
|
|
</script>
|
|
|
|
<div id="center">
|
|
|
|
<h1 class="titre">ENQUÊTE COMMERCIALE</h1>
|
|
|
|
<form action="./?page=enquetec&siret=<?php print $siret;?>&idEntreprise=<?php print $idEntreprise;?>" method="POST" enctype="multipart/form-data">
|
|
|
|
<h2>Entreprise concernée : </h2>
|
|
|
|
<div class="infoTitle StyleInfoLib">Numéro identifiant Siren</div>
|
|
<div class="infoData">
|
|
<?php print substr($etab['Siren'],0,3).' '.substr($etab['Siren'],3,3).' '.substr($etab['Siren'],6,3); ?>
|
|
<input type="hidden" name="siren" value="<?php print $etab['Siren']; ?>"/>
|
|
</div>
|
|
|
|
<div class="infoTitle StyleInfoLib">Numéro identifiant Siret</div>
|
|
<div class="infoData"><?php print substr($etab['Siren'],0,3).' '.substr($etab['Siren'],3,3).' '.substr($etab['Siren'],6,3).' <i>'.substr($etab['Siret'],9,5).'</i>' ?></div>
|
|
|
|
<div class="infoTitle StyleInfoLib">Numéro de TVA Intracom.</div>
|
|
<div class="infoData"><?php print substr($etab['TvaNumero'],0,2).' '.substr($etab['TvaNumero'],2,2).' '.substr($etab['TvaNumero'],-9); ?></div>
|
|
|
|
<div class="infoTitle StyleInfoLib">Raison Sociale</div>
|
|
<div class="infoData"><?php print $etab['Nom']; ?></div>
|
|
|
|
<div class="infoTitle StyleInfoLib">Adresse</div>
|
|
<div class="infoData"><?php print $etab['Adresse']; ?></div>
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Téléphone <?php if (trim($etab['Tel'])==''){?><font color="Red">*</font><?php }?> / Fax</label>
|
|
<div class="field">
|
|
<?php if (trim($etab['Tel'])!=''){ print $etab['Tel']; }else{?><input type="text" name="InfoEnq[Entrep][Tel]"/><?php } ?> <b>/</b>
|
|
<?php if (trim($etab['Fax'])!=''){ print $etab['Fax']; }else{?><input type="text" name="InfoEnq[Entrep][Fax]"/><?php } ?>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if (trim($etab['Tel'])!=''){?>
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib"> Autre téléphone :</label>
|
|
<div class="field"><input type="text" name="InfoEnq[Entrep][AutreTel]"/> </div>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">E-mail</label>
|
|
<div class="field"><?php if (trim($etab['Mail'])!=''){ print $etab['Mail']; }else{?><input type="text" name="InfoEnq[Entrep][Mail]"/><?php }?></div>
|
|
</div>
|
|
|
|
<?php if (trim($etab['Mail'])!=''){ ?>
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Autre e-mail</label>
|
|
<div class="field"><input type="text" name="InfoEnq[Entrep][AutreMail]"/></div>
|
|
</div>
|
|
<?php }?>
|
|
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Site Web</label>
|
|
<div class="field"><?php if (trim($etab['Web'])!=''){ print $etab['Web']; }else{?><input type="text" name="InfoEnq[Entrep][Web]"/><?php }?></div>
|
|
</div>
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Domiciliation bancaire</label>
|
|
<div class="field">
|
|
<input type="text" name="InfoEnq[Entrep][Rib][Banque]" maxlength="5" size="5"/>
|
|
<input type="text" name="InfoEnq[Entrep][Rib][Guichet]" maxlength="5" size="5"/>
|
|
<input type="text" name="InfoEnq[Entrep][Rib][Compte]" maxlength="11" size="11"/>
|
|
<input type="text" name="InfoEnq[Entrep][Rib][Cle]" maxlength="2" size="2"/>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Encours</label>
|
|
<div class="field"><input type="text" name="InfoEnq[Encours]"/> €</div>
|
|
</div>
|
|
|
|
<h2>Demandeur : </h2>
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Votre profil <font color="Red">*</font>:</label>
|
|
<div class="field">
|
|
<select id="profil" name="InfoUser[Profil]">
|
|
<option value="Achats">Service Achats</option>
|
|
<option value="Commerce">Commerce</option>
|
|
<option value="Recouvrement">Recouvrement</option>
|
|
<option value="Contentieux">Contentieux</option>
|
|
<option value="Autre">Autre</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="autreProfil" class="fieldgrp">
|
|
<label class="StyleInfoLib">Précisez :</label>
|
|
<div class="field"><input type="text" name="InfoUser[ProfilAutre]" value="" /></div>
|
|
</div>
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Votre Identité :</label>
|
|
<div class="field"><input type="text" name="InfoUser[Identite]" value="<?php print $user['nom'].' '.$user['prenom']; ?>"/></div>
|
|
</div>
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Téléphone <font color="Red">*</font>:</label>
|
|
<div class="field"><input type="text" name="InfoUser[Tel]" value="<?php print $user['tel']; ?>" /></div>
|
|
</div>
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">E-mail <font color="Red">*</font>:</label>
|
|
<div class="field"><input type="text" name="InfoUser[Email]" value="<?php print $user['mail']; ?>"/></div>
|
|
</div>
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Fax :</label>
|
|
<div class="field"><input type="text" name="InfoUser[Fax]" value="<?php print $user['fax']; ?>"/></div>
|
|
</div>
|
|
|
|
<h2>Enquête : </h2>
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Type d'enquête</label>
|
|
<div class="field">
|
|
<input type="radio" name="InfoEnq[Type]" value="premier">PREMIER (24 h - encours inférieur à 20K€)</input>
|
|
<br/>
|
|
<input type="radio" name="InfoEnq[Type]" value="gold">GOLD (72 h - encours supérieur à 20K€)</input>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Précisions sur la demande</label>
|
|
<div class="field">
|
|
<select id="precision" name="InfoEnq[Precisions]">
|
|
<option value="">Choisissez...</option>
|
|
<option value="1">Enquête sur un client (contrôle crédit)</option>
|
|
<option value="2">Enquête sur un prospect (ouverture de compte)</option>
|
|
<option value="3">Enquête sur un fournisseur stratégique</option>
|
|
<option value="4">Enquête sur un fournisseur non stratégique</option>
|
|
<option value="5">Autre type d'enquête (Précisez...)</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="fournisseur" class="fieldgrp">
|
|
<label class="StyleInfoLib">Montant du CA réalisé avec le fournisseur :</label>
|
|
<div class="field"><input type="text" name="InfoEnq[Precisions][MontantCA]" value="" /> €</div>
|
|
</div>
|
|
|
|
<div id="credit" class="fieldgrp">
|
|
<label class="StyleInfoLib">Motif du contrôle :</label>
|
|
<div class="field"><textarea type="text" name="InfoEnq[Precisions][Motif]"></textarea></div>
|
|
</div>
|
|
|
|
<div id="autrePrecisions" class="fieldgrp">
|
|
<label class="StyleInfoLib">Précisez :</label>
|
|
<div class="field"><textarea name="InfoEnq[Precisions][Autre]"></textarea></div>
|
|
</div>
|
|
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Ancienneté de la relation :</label>
|
|
<div class="field">
|
|
<input type="radio" name="InfoEnq[Anciennete]" value="Mois">Mois</input>
|
|
<input type="radio" name="InfoEnq[Anciennete]" value="Annees">Années</input>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Impayées :</label>
|
|
<div class="field">
|
|
<input type="radio" name="InfoEnq[ImpayeesChoix]" value="oui">Oui</input>
|
|
<input type="radio" name="InfoEnq[ImpayeesChoix]" value="non" checked="ckeck">Non</input>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="impayees">
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Montant :</label>
|
|
<div class="field"><input type="text" name="InfoEnq[Impayees][Montant]" value=""/> €</div>
|
|
</div>
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Nombre :</label>
|
|
<div class="field"><input type="text" name="InfoEnq[Impayees][Nombre]"/></div>
|
|
</div>
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Date :</label>
|
|
<div class="field"><input type="text" name="InfoEnq[Impayees][Date]"/> (Format : JJ/MM/AAAA)</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Retard de paiement :</label>
|
|
<div class="field">
|
|
<input type="radio" name="InfoEnq[RetardPaiementChoix]" value="oui">Oui</input>
|
|
<input type="radio" name="InfoEnq[RetardPaiementChoix]" value="non" checked="ckeck">Non</input>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div id="retardpaiement">
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Montant :</label>
|
|
<div class="field"><input type="text" name="InfoEnq[RetardPaiement][Montant]" value=""/> €</div>
|
|
</div>
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Nombre :</label>
|
|
<div class="field"><input type="text" name="InfoEnq[RetardPaiement][Nombre]"/></div>
|
|
</div>
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Date :</label>
|
|
<div class="field"><input type="text" name="InfoEnq[RetardPaiement][Date]"/> (Format : JJ/MM/AAAA)</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Litiges techniques ou commerciaux :</label>
|
|
<div class="field">
|
|
<input type="radio" name="InfoEnq[LitigeChoix]" value="oui">Oui</input>
|
|
<input type="radio" name="InfoEnq[LitigeChoix]" value="non" checked="ckeck">Non</input>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div id="litige">
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Précisions :</label>
|
|
<div class="field">
|
|
<textarea name="InfoEnq[Litige][Precisions]"></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="fieldgrp">
|
|
<label class="StyleInfoLib">Observations ou questions spéciales</label>
|
|
<div class="field"><textarea name="InfoEnq[Observation]"></textarea></div>
|
|
</div>
|
|
|
|
<div class="submit"><p class="submit-button"><input type="submit" value="Envoyer" /></p></div>
|
|
|
|
</form>
|
|
</div>
|
|
|
|
<?php
|
|
}
|
|
?>
|