SD-13 Stable before
This commit is contained in:
parent
ca628690ca
commit
22e92d676a
@ -154,9 +154,25 @@ class Achatclient_IndexController extends Zend_Controller_Action
|
|||||||
$this->view->inlineScript()->appendFile($this->theme->pathScript.'/recherche.js', 'text/javascript');
|
$this->view->inlineScript()->appendFile($this->theme->pathScript.'/recherche.js', 'text/javascript');
|
||||||
$this->view->infosfact=$infos['commande'];
|
$this->view->infosfact=$infos['commande'];
|
||||||
$this->view->pbparams=null;
|
$this->view->pbparams=null;
|
||||||
|
$this->view->info='siret';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//Calcul de la TVA
|
//Calcul de la TVA
|
||||||
|
// N° de TVA obligatoire pour la France sauf les dom
|
||||||
|
if(strtoupper($infos['entrep']['Pays'])=="FRANCE" && empty($infos['entrep']['TvaNumero'])){
|
||||||
|
if(substr($infos['entrep']['CP'],0,3)=='971' || substr($infos['entrep']['CP'],0,3)=='972' ||substr($infos['entrep']['CP'],0,3)=='974'){
|
||||||
|
$tva=0.085;
|
||||||
|
}else{
|
||||||
|
$infos['commande']['nb_credit']=$nb_credit;
|
||||||
|
$this->view->message='Merci d\'entrer votre numéro de TVA intracommunautaire';
|
||||||
|
$this->view->inlineScript()->appendFile($this->theme->pathScript.'/recherche.js', 'text/javascript');
|
||||||
|
$this->view->infosfact=$infos['commande'];
|
||||||
|
$this->view->pbparams=null;
|
||||||
|
$this->view->info='tva';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
//Si pays France > TVA = 20,00 %
|
//Si pays France > TVA = 20,00 %
|
||||||
$tva=0.2;
|
$tva=0.2;
|
||||||
//var_dump($infos['entrep']);die;
|
//var_dump($infos['entrep']);die;
|
||||||
@ -171,10 +187,11 @@ class Achatclient_IndexController extends Zend_Controller_Action
|
|||||||
$tva=0.2;
|
$tva=0.2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Si Guadeloupe (971), Martinique (972), La Réunion (974) > TVA = 8,50 %
|
//Si Guadeloupe (971), Martinique (972), La Réunion (974) > TVA = 8,50 %
|
||||||
if(substr($infos['entrep']['CP'],0,3)=='971' || substr($infos['entrep']['CP'],0,3)=='972' ||substr($infos['entrep']['CP'],0,3)=='974'){
|
if(substr($infos['entrep']['CP'],0,3)=='971' || substr($infos['entrep']['CP'],0,3)=='972' ||substr($infos['entrep']['CP'],0,3)=='974'){
|
||||||
$tva=0.085;
|
$tva=0.085;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Calcul des montants
|
//Calcul des montants
|
||||||
$this->tranches[$idClient][$nb_credit]['tva']=$this->tranches[$idClient][$nb_credit]['montantht']*$tva;
|
$this->tranches[$idClient][$nb_credit]['tva']=$this->tranches[$idClient][$nb_credit]['montantht']*$tva;
|
||||||
$this->tranches[$idClient][$nb_credit]['montant']=$this->tranches[$idClient][$nb_credit]['montantht']+$this->tranches[$idClient][$nb_credit]['tva'];
|
$this->tranches[$idClient][$nb_credit]['montant']=$this->tranches[$idClient][$nb_credit]['montantht']+$this->tranches[$idClient][$nb_credit]['tva'];
|
||||||
|
@ -13,6 +13,7 @@ class Achatclient_InextensoController extends Zend_Controller_Action
|
|||||||
|
|
||||||
protected $maxcredit=2000;
|
protected $maxcredit=2000;
|
||||||
|
|
||||||
|
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
if (Zend_Registry::isRegistered('logger')) {
|
if (Zend_Registry::isRegistered('logger')) {
|
||||||
|
@ -65,7 +65,22 @@ class Achatclient_PbanswerController extends Zend_Controller_Action
|
|||||||
}
|
}
|
||||||
$this->redirect("http://".$request->getHttpHost()."/achatclient/?message=".$this->msg);
|
$this->redirect("http://".$request->getHttpHost()."/achatclient/?message=".$this->msg);
|
||||||
}
|
}
|
||||||
|
public function wspoloAction(){
|
||||||
|
$json='[{"nomPartie":"BANQUE POPULAIRE DU MASSIF CENTRAL (BPMC)","qualite":"DE","numero":0,"adresse":{"lignes":["18 BOULEVARD JEAN MOULIN"],"codePostal":"63000","bureauDistributeur":"CLERMONT FERRAND"},"entreprise":{"idDossier":{"codeGreffe":"6303","dossierMillesime":null,"dossierStatut":null,"dossierChrono":"00000"},"nomGreffeImmat":null,"siren":0,"denomination":null,"etatposeSurveillance":null},"nomGreffeImmat":"CLERMONT-FERRAND","representants":[{"qualite":"DE","nom":"ME FRANCOIS-XAVIER DOS SANTOS","numeroPartie":1,"numeroRepresentant":1}]},{"nomPartie":"SARLh DELTA 2 I (SARL)","qualite":"DF","numero":0,"adresse":{"lignes":["18 RUE JEAN CLARET","PARC TECHNOLOGIQUE LA PARDIEU"],"codePostal":"63000","bureauDistributeur":"CLERMONT FERRAND"},"entreprise":{"idDossier":{"codeGreffe":"6303","dossierMillesime":"89","dossierStatut":"B","dossierChrono":"00507"},"nomGreffeImmat":null,"siren":950372318,"denomination":null,"etatposeSurveillance":null},"nomGreffeImmat":"CLERMONT-FERRAND","representants":[{"qualite":"DF","nom":"ME STEPHANE DEBERLE","numeroPartie":1,"numeroRepresentant":1}]},{"nomPartie":"EL MOUDNI SI Mohamed","qualite":"DF","numero":0,"adresse":{"lignes":["7 RUE DU CONSUL"],"codePostal":"63670","bureauDistributeur":"ORCET"},"entreprise":{"idDossier":{"codeGreffe":"6303","dossierMillesime":null,"dossierStatut":null,"dossierChrono":"00000"},"nomGreffeImmat":null,"siren":0,"denomination":null,"etatposeSurveillance":null},"nomGreffeImmat":"CLERMONT-FERRAND","representants":[{"qualite":"DF","nom":"ME STEPHANE DEBERLE","numeroPartie":2,"numeroRepresentant":1}]},{"nomPartie":"SELARL MANDATUM, repr\u00e9sent\u00e9e par Me Rapha\u00ebl PETAVY (INTERVENANTE VOLONTAIRE)","qualite":"DF","numero":0,"adresse":{"lignes":["29 BOULEVARD BERTHELOT"],"codePostal":"63400","bureauDistributeur":"CHAMALIERES"},"entreprise":{"idDossier":{"codeGreffe":"6303","dossierMillesime":null,"dossierStatut":null,"dossierChrono":"00000"},"nomGreffeImmat":null,"siren":0,"denomination":null,"etatposeSurveillance":null},"nomGreffeImmat":"CLERMONT-FERRAND","representants":[{"qualite":"DF","nom":"ME STEPHANE DEBERLE","numeroPartie":3,"numeroRepresentant":1}]}]';
|
||||||
|
$val=json_decode($json);
|
||||||
|
var_dump($val);die;
|
||||||
|
$ws = new Scores_Ws_Client('entreprise', '0.9');
|
||||||
|
$params = new stdClass();
|
||||||
|
$params->companyId = 552144503;
|
||||||
|
$params->tiers = 'DE';
|
||||||
|
$params->p = 0;
|
||||||
|
$params->limit = 10;
|
||||||
|
$params = new stdClass();
|
||||||
|
$params->companyId = 552144503;//siren
|
||||||
|
$infocredit = $ws->getGreffeAffaireList($params);
|
||||||
|
|
||||||
|
var_dump($infocredit);die;
|
||||||
|
}
|
||||||
private function error($ligne=0,$message=""){
|
private function error($ligne=0,$message=""){
|
||||||
switch($ligne){
|
switch($ligne){
|
||||||
case "index":
|
case "index":
|
||||||
|
@ -11,6 +11,7 @@ alert{
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<?php if(empty($this->pbparams)):?>
|
<?php if(empty($this->pbparams)):?>
|
||||||
|
<?php if($this->info=='siret'):?>
|
||||||
<div id="center">
|
<div id="center">
|
||||||
<h1>ACHAT de CREDITS <small>Informations complémentaires</small></h1>
|
<h1>ACHAT de CREDITS <small>Informations complémentaires</small></h1>
|
||||||
<h2><?=$this->message ?></h2>
|
<h2><?=$this->message ?></h2>
|
||||||
@ -42,6 +43,17 @@ $(function(){
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php echo $this->inlineScript(); ?>
|
<?php echo $this->inlineScript(); ?>
|
||||||
|
<?php endif;?>
|
||||||
|
<?php if($this->info=='tva'):?>
|
||||||
|
<div id="center">
|
||||||
|
<a href="<?=$this->url(array('controller'=>'index', 'action'=>'contact'))?>">
|
||||||
|
Le numero de TVA intracommunautaire n'a pas été trouvé pour votre société.
|
||||||
|
<br>Merci de contacter le service comptable.
|
||||||
|
<br>
|
||||||
|
<a href="<?=$this->url(array('controller'=>'index', 'action'=>'contact'))?>">
|
||||||
|
<button name="contact" id="contact" class="button ui-button ui-corner-all ui-widget" role="button">Nous contacter</button>
|
||||||
|
</a>
|
||||||
|
<?php endif;?>
|
||||||
<?php else:?>
|
<?php else:?>
|
||||||
<div id="center">
|
<div id="center">
|
||||||
<h1>ACHAT de CREDITS <small>Confirmation</small></h1>
|
<h1>ACHAT de CREDITS <small>Confirmation</small></h1>
|
||||||
|
Loading…
Reference in New Issue
Block a user