Skip to content

Commit 2aacaac

Browse files
committed
detalhe ajuste merge
1 parent 4ce57fb commit 2aacaac

File tree

3 files changed

+47
-43
lines changed

3 files changed

+47
-43
lines changed

src/Cnab/Remessa/Cnab240/Banco/Sicredi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ protected function segmentoP(BoletoContract $boleto)
142142
$this->add(119, 126, $boleto->getJurosApos() == 0 ? '00000000' :
143143
$boleto->getDataVencimentoApos()->format('dmY'));
144144
$this->add(127, 141, Util::formatCnab('9', $boleto->getMoraDia(), 15, 2)); //Valor da mora/dia ou Taxa mensal
145-
$this->add(142, 142, '1'); // '1' = Valor Fixo Até a Data Informada
145+
$this->add(142, 142, $boleto->getDesconto() > 0 ? '1' : '0');
146146
$this->add(143, 150, $boleto->getDesconto() > 0 ? $boleto->getDataDesconto()->format('dmY') : '00000000');
147147
$this->add(151, 165, Util::formatCnab('9', $boleto->getDesconto(), 15, 2));
148148
$this->add(166, 180, Util::formatCnab('9', 0, 15, 2));

src/Cnab/Retorno/Cnab240/Detalhe.php

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<?php
12

23
namespace Eduardokum\LaravelBoleto\Cnab\Retorno\Cnab240;
34

@@ -6,12 +7,11 @@
67
use Eduardokum\LaravelBoleto\Contracts\Pessoa as PessoaContract;
78
use Eduardokum\LaravelBoleto\MagicTrait;
89
use Eduardokum\LaravelBoleto\Util;
9-
10-
11-
10+
use Exception;
1211

1312
class Detalhe implements DetalheContract
1413
{
14+
1515
use MagicTrait;
1616

1717
/**
@@ -139,7 +139,7 @@ public function hasOcorrencia()
139139
{
140140
$ocorrencias = func_get_args();
141141

142-
if (count($ocorrencias) == 0 && !empty($this->getOcorrencia())) {
142+
if (count($ocorrencias) == 0 && ! empty($this->getOcorrencia())) {
143143
return true;
144144
}
145145

@@ -299,7 +299,7 @@ public function getDataVencimento($format = 'd/m/Y')
299299
}
300300

301301
/**
302-
* @param $dataVencimento
302+
* @param $dataVencimento
303303
*
304304
* @param string $format
305305
*
@@ -325,7 +325,7 @@ public function getDataCredito($format = 'd/m/Y')
325325
}
326326

327327
/**
328-
* @param $dataCredito
328+
* @param $dataCredito
329329
*
330330
* @param string $format
331331
*
@@ -351,7 +351,7 @@ public function getDataOcorrencia($format = 'd/m/Y')
351351
}
352352

353353
/**
354-
* @param $dataOcorrencia
354+
* @param $dataOcorrencia
355355
*
356356
* @param string $format
357357
*
@@ -553,7 +553,7 @@ public function getValorOutrosCreditos()
553553
}
554554

555555
/**
556-
* @param string $valorTarifa
556+
* @param string $valorOutrosCreditos
557557
*
558558
* @return $this
559559
*/
@@ -576,11 +576,12 @@ public function getPagador()
576576
* @param $pagador
577577
*
578578
* @return $this
579-
* @throws \Exception
579+
* @throws Exception
580580
*/
581581
public function setPagador($pagador)
582582
{
583583
Util::addPessoa($this->pagador, $pagador);
584+
584585
return $this;
585586
}
586587

@@ -631,24 +632,24 @@ public function getError()
631632
public function setError($error)
632633
{
633634
$this->ocorrenciaTipo = self::OCORRENCIA_ERRO;
634-
$this->error = $error;
635+
$this->error = $error;
635636

636637
return $this;
637638
}
638639

639-
/**
640-
* @return string
641-
*/
640+
/**
641+
* @return string
642+
*/
642643
public function getRejeicao()
643644
{
644645
return $this->rejeicao;
645646
}
646647

647648
/**
648-
* @param string $ocorrenciaTipo
649-
*
650-
* @return Detalhe
651-
*/
649+
* @param string $rejeicao
650+
*
651+
* @return Detalhe
652+
*/
652653
public function setRejeicao($rejeicao)
653654
{
654655
$this->rejeicao = $rejeicao;

src/Cnab/Retorno/Cnab400/Detalhe.php

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
namespace Eduardokum\LaravelBoleto\Cnab\Retorno\Cnab400;
34

45
use Carbon\Carbon;
@@ -7,6 +8,7 @@
78

89
class Detalhe implements DetalheContract
910
{
11+
1012
use MagicTrait;
1113

1214
/**
@@ -104,7 +106,7 @@ public function getCarteira()
104106
}
105107

106108
/**
107-
* @param string $nossoNumero
109+
* @param string $carteira
108110
*
109111
* @return Detalhe
110112
*/
@@ -189,6 +191,7 @@ public function getCodigoLiquidacao()
189191
* Setter for codigoLiquidacao
190192
*
191193
* @param string $codigoLiquidacao
194+
*
192195
* @return Detalhe
193196
*/
194197
public function setCodigoLiquidacao($codigoLiquidacao)
@@ -205,7 +208,7 @@ public function hasOcorrencia()
205208
{
206209
$ocorrencias = func_get_args();
207210

208-
if (count($ocorrencias) == 0 && !empty($this->getOcorrencia())) {
211+
if (count($ocorrencias) == 0 && ! empty($this->getOcorrencia())) {
209212
return true;
210213
}
211214

@@ -288,8 +291,8 @@ public function setOcorrenciaTipo($ocorrenciaTipo)
288291
public function getDataOcorrencia($format = 'd/m/Y')
289292
{
290293
return $this->dataOcorrencia instanceof Carbon
291-
? $format === false ? $this->dataOcorrencia : $this->dataOcorrencia->format($format)
292-
: null;
294+
? $format === false ? $this->dataOcorrencia : $this->dataOcorrencia->format($format)
295+
: null;
293296
}
294297

295298
/**
@@ -304,25 +307,25 @@ public function setDataOcorrencia($dataOcorrencia, $format = 'dmy')
304307
return $this;
305308
}
306309

307-
/**
308-
* @return string
309-
*/
310-
public function getRejeicao()
311-
{
312-
return $this->rejeicao;
313-
}
310+
/**
311+
* @return string
312+
*/
313+
public function getRejeicao()
314+
{
315+
return $this->rejeicao;
316+
}
314317

315-
/**
316-
* @param string $ocorrenciaTipo
317-
*
318-
* @return Detalhe
319-
*/
320-
public function setRejeicao($rejeicao)
321-
{
322-
$this->rejeicao = $rejeicao;
318+
/**
319+
* @param string $rejeicao
320+
*
321+
* @return Detalhe
322+
*/
323+
public function setRejeicao($rejeicao)
324+
{
325+
$this->rejeicao = $rejeicao;
323326

324-
return $this;
325-
}
327+
return $this;
328+
}
326329

327330
/**
328331
* @param string $format
@@ -332,8 +335,8 @@ public function setRejeicao($rejeicao)
332335
public function getDataVencimento($format = 'd/m/Y')
333336
{
334337
return $this->dataVencimento instanceof Carbon
335-
? $format === false ? $this->dataVencimento : $this->dataVencimento->format($format)
336-
: null;
338+
? $format === false ? $this->dataVencimento : $this->dataVencimento->format($format)
339+
: null;
337340
}
338341

339342
/**
@@ -356,8 +359,8 @@ public function setDataVencimento($dataVencimento, $format = 'dmy')
356359
public function getDataCredito($format = 'd/m/Y')
357360
{
358361
return $this->dataCredito instanceof Carbon
359-
? $format === false ? $this->dataCredito : $this->dataCredito->format($format)
360-
: null;
362+
? $format === false ? $this->dataCredito : $this->dataCredito->format($format)
363+
: null;
361364
}
362365

363366
/**

0 commit comments

Comments
 (0)