Example #1
0
 protected function paymentInformation()
 {
     $multiplier = 0;
     if ($this->order->getDueDate()) {
         $this->image->text('', 1445, 710 + $multiplier * 55, function (Font $font) {
             $font->color($this->template->getPrimaryColor());
             $font->file($this->template->getIconFont());
             $font->size(37);
         });
         $this->image->text($this->translate('dueDate') . ':', 1520, 705 + $multiplier * 55, function (Font $font) {
             $font->color($this->template->getPrimaryColor());
             $font->size(27);
             $font->file($this->template->getFont());
         });
         $this->image->text($this->order->getDueDate()->format('d/m/Y'), 1850, 705 + $multiplier * 55, function (Font $font) {
             $font->size(27);
             $font->file($this->template->getFont());
             $font->color($this->template->getFontColor());
         });
         $multiplier++;
     }
     if ($this->order->getAccount()->getAccountNumber()) {
         $this->image->text('', 1445, 710 + $multiplier * 55, function (Font $font) {
             $font->color($this->template->getPrimaryColor());
             $font->file($this->template->getIconFont());
             $font->size(37);
         });
         $this->image->text($this->translate('accountNumber') . ':', 1520, 705 + $multiplier * 55, function (Font $font) {
             $font->color($this->template->getPrimaryColor());
             $font->size(27);
             $font->file($this->template->getFont());
         });
         $this->image->text($this->order->getAccount()->getAccountNumber(), 1850, 705 + $multiplier * 55, function (Font $font) {
             $font->size(27);
             $font->file($this->template->getFont());
             $font->color($this->template->getFontColor());
         });
         $multiplier++;
     }
     if ($this->order->getAccount()->getIBan()) {
         $this->image->text('', 1445, 710 + $multiplier * 55, function (Font $font) {
             $font->color($this->template->getPrimaryColor());
             $font->file($this->template->getIconFont());
             $font->size(37);
         });
         $this->image->text(Strings::upper($this->translate('iban')) . ':', 1520, 705 + $multiplier * 55, function (Font $font) {
             $font->color($this->template->getPrimaryColor());
             $font->size(27);
             $font->file($this->template->getFont());
         });
         $this->image->text($this->order->getAccount()->getIBan(), 1850, 705 + $multiplier * 55, function (Font $font) {
             $font->size(27);
             $font->file($this->template->getFont());
             $font->color($this->template->getFontColor());
         });
         $multiplier++;
     }
     if ($this->order->getAccount()->getSwift()) {
         $this->image->text('', 1445, 710 + $multiplier * 55, function (Font $font) {
             $font->color($this->template->getPrimaryColor());
             $font->file($this->template->getIconFont());
             $font->size(37);
         });
         $this->image->text(Strings::upper($this->translate('swift')) . ':', 1520, 705 + $multiplier * 55, function (Font $font) {
             $font->color($this->template->getPrimaryColor());
             $font->size(27);
             $font->file($this->template->getFont());
         });
         $this->image->text($this->order->getAccount()->getSwift(), 1850, 705 + $multiplier * 55, function (Font $font) {
             $font->size(27);
             $font->file($this->template->getFont());
             $font->color($this->template->getFontColor());
         });
         $multiplier++;
     }
     if ($this->order->getPayment()->getVariableSymbol()) {
         $this->image->text('', 1455, 710 + $multiplier * 55, function (Font $font) {
             $font->color($this->template->getPrimaryColor());
             $font->file($this->template->getIconFont());
             $font->size(37);
         });
         $this->image->text($this->translate('varSymbol') . ':', 1520, 705 + $multiplier * 55, function (Font $font) {
             $font->color($this->template->getPrimaryColor());
             $font->size(27);
             $font->file($this->template->getFont());
         });
         $this->image->text($this->order->getPayment()->getVariableSymbol(), 1850, 705 + $multiplier * 55, function (Font $font) {
             $font->size(27);
             $font->file($this->template->getFont());
             $font->color($this->template->getFontColor());
         });
         $multiplier++;
     }
     if ($this->order->getPayment()->getConstantSymbol()) {
         $this->image->text('', 1455, 710 + $multiplier * 55, function (Font $font) {
             $font->color($this->template->getPrimaryColor());
             $font->file($this->template->getIconFont());
             $font->size(37);
         });
         $this->image->text($this->translate('constSymbol') . ':', 1520, 705 + $multiplier * 55, function (Font $font) {
             $font->color($this->template->getPrimaryColor());
             $font->size(27);
             $font->file($this->template->getFont());
         });
         $this->image->text($this->order->getPayment()->getConstantSymbol(), 1850, 705 + $multiplier * 55, function (Font $font) {
             $font->size(27);
             $font->file($this->template->getFont());
             $font->color($this->template->getFontColor());
         });
         $multiplier++;
     }
     $this->image->text('', 1445, 710 + $multiplier * 55, function (Font $font) {
         $font->color($this->template->getPrimaryColor());
         $font->file($this->template->getIconFont());
         $font->size(37);
     });
     $this->image->text($this->translate('totalPrice') . ':', 1520, 705 + $multiplier * 55, function (Font $font) {
         $font->color($this->template->getPrimaryColor());
         $font->size(27);
         $font->file($this->template->getFont());
     });
     $this->image->text($this->formatNumber($this->getTotalPrice(TRUE)) . ' ' . $this->order->getPayment()->getCurrency(), 1850, 705 + $multiplier * 55, function (Font $font) {
         $font->size(27);
         $font->file($this->template->getFont());
         $font->color($this->template->getFontColor());
     });
 }