From 4631d4e457c0a705608cc5f13384ffebdcd06901 Mon Sep 17 00:00:00 2001 From: vinicius Date: Thu, 30 Aug 2018 15:58:58 -0300 Subject: [PATCH] =?UTF-8?q?[FIX]=20#000=20-alterando=20valida=C3=A7=C3=B5e?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Cnab/Cnab400/Bradesco/Transacao.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Cnab/Cnab400/Bradesco/Transacao.php b/src/Cnab/Cnab400/Bradesco/Transacao.php index 7c949a6..d412fad 100755 --- a/src/Cnab/Cnab400/Bradesco/Transacao.php +++ b/src/Cnab/Cnab400/Bradesco/Transacao.php @@ -831,7 +831,7 @@ public function getNomePagador() public function setNomePagador($nomePagador) { $this->nomePagador = str_pad( - substr($nomePagador, 0, 40), + mb_strtoupper(mb_substr($nomePagador, 0, 40)), 40, ' ', STR_PAD_RIGHT @@ -852,7 +852,7 @@ public function getEnderecoPagador() public function setEnderecoPagador($enderecoPagador) { $this->enderecoPagador = str_pad( - substr($enderecoPagador, 0, 40), + mb_strtoupper(mb_substr($enderecoPagador, 0, 40)), 40, ' ', STR_PAD_RIGHT @@ -1004,9 +1004,8 @@ public function getTransacaoToString() . $this->getPrimeiraMensagem() . $this->getCep() . $this->getSufixoCep() - . ($this->getSacador() ? : $this->getSegundaMensagem()) - . $this->getSequencialRegistro() - ; + . ($this->getSacador() ?: $this->getSegundaMensagem()) + . $this->getSequencialRegistro(); if (mb_strlen($stringTransacao) != 400) { throw new \Exception(