Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fhferreira authored Jan 4, 2017
1 parent 8fd2f06 commit 3245dca
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ class BoletoService {
$countBoleto=0;
foreach ($boletos as $countBoleto => $boletoArr) {

$date = isset($boletoArr->periodoBarras[1]) ? $boletoArr->periodoBarras[1]: $boletoArr->periodoBarras[0];
$dtVencimento = date('dmY', strtotime($date));
$dtVencimento = date('dmY', strtotime($boletoArr->dtVencimento));
$emissao = date('dmY');
$hora = date('His');

Expand All @@ -80,14 +79,8 @@ class BoletoService {
15,
'0',
STR_PAD_RIGHT);
$message3 = isset($boletoArr->periodoBarras[1]) ? sprintf("Data: %s à %s",
$boletoArr->periodoBarras[0],
$boletoArr->periodoBarras[1]
) : $boletoArr->periodoBarras[0];
$message4 = isset($boletoArr->intervaloBarras[1]) ? sprintf("Barra: %s à %s",
$boletoArr->intervaloBarras[0],
$boletoArr->intervaloBarras[1]
) : $boletoArr->intervaloBarras[0];
           $message3 = "Mensagem 3";
$message4 = "Mensagem 4";

$tamanho = 40;
$endereco = $boletoArr->endereco;
Expand Down Expand Up @@ -136,16 +129,17 @@ class BoletoService {
'cidade' => $boletoArr->cidade,
'uf' => $boletoArr->uf,
],
'segmentR' => [
               //É necessário verificar a ordem das mensagens e quais são as que sobrescrevem outras.
               'segmentR' => [
'informacao_3' => $message3,
'informacao_4' => $message4,
],
'segmentS' => [
'informacao_5' => $message3,
'informacao_6' => $message4,
'informacao_7' => 'Telefones para Contato: (16) 99999-9999',
'informacao_8' => $mes . '/' . $ano . ' de vencimento',
                   'informacao_9' => 'Pagavel até o dia o ultimo dia do mes',
'informacao_7' => "Mensagem 7",
'informacao_8' => "Mensagem 8",
                   'informacao_9' => "Mensagem 9",
]
]);

Expand Down

0 comments on commit 3245dca

Please sign in to comment.