From: Vincent Vanwaelscappel Date: Wed, 29 Jun 2022 09:17:49 +0000 (+0200) Subject: wait #5267 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=151878d58aadd269002026da313b500c54abd047;p=dtlc.git wait #5267 @1 --- diff --git a/framework/application/controllers/DevisController.php b/framework/application/controllers/DevisController.php index 33329f8..9efc77c 100644 --- a/framework/application/controllers/DevisController.php +++ b/framework/application/controllers/DevisController.php @@ -45,20 +45,22 @@ class DevisController extends CubeIT_Controller_PageController $this->view->print = isset($_GET['print']); - $currency = 978; - if ($this->view->devis->magasin == 'paris11') { - $this->view->magasin = 11; - $sgc = new CubeIT_Payment_Sogecommerce(); - $this->view->paymentForm = $sgc->getForm($this->view->devis->id, $amounts['ttc'], $currency, $this->view->devis->email, 'fr'); - $this->view->paymentAddForm = ''; - } else { - $this->view->magasin = 15; - $sogenactif = new CubeIT_Payment_Sogenactif(); - $form = $sogenactif->getForm($this->view->devis->id, $amounts['ttc'], $currency, $this->view->devis->email, 'fr'); - $this->view->paymentForm = $form; - $submit = new CubeIT_Form_Element_Html('image'); - $submit->setLabel($this->view->link($this->view->image('/images/devis/cartes.png'), '#', array('class' => 'submit'))); - $this->view->paymentForm->addElement($submit); + if($amounts['ttc']>0) { + $currency = 978; + if ($this->view->devis->magasin == 'paris11') { + $this->view->magasin = 11; + $sgc = new CubeIT_Payment_Sogecommerce(); + $this->view->paymentForm = $sgc->getForm($this->view->devis->id, $amounts['ttc'], $currency, $this->view->devis->email, 'fr'); + $this->view->paymentAddForm = ''; + } else { + $this->view->magasin = 15; + $sogenactif = new CubeIT_Payment_Sogenactif(); + $form = $sogenactif->getForm($this->view->devis->id, $amounts['ttc'], $currency, $this->view->devis->email, 'fr'); + $this->view->paymentForm = $form; + $submit = new CubeIT_Form_Element_Html('image'); + $submit->setLabel($this->view->link($this->view->image('/images/devis/cartes.png'), '#', array('class' => 'submit'))); + $this->view->paymentForm->addElement($submit); + } } diff --git a/framework/application/views/scripts/devis/index.phtml b/framework/application/views/scripts/devis/index.phtml index b6a70d1..f663ccd 100644 --- a/framework/application/views/scripts/devis/index.phtml +++ b/framework/application/views/scripts/devis/index.phtml @@ -125,7 +125,7 @@ echo ''; echo ''; echo ''; -if (!$isFacture) { +if (!$isFacture && $this->paymentForm) { echo '
'; echo '

Payer en ligne grâce au paiement sécurisé Sogenactif


'; // echo '
' . $this->paymentForm1 . '
';