Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajustes para o modelo 2 do Boleto. #239

Merged
merged 1 commit into from
Jul 20, 2022
Merged

Conversation

antoniospneto
Copy link
Contributor

pequenos fix para melhorar a segunda opção de modelo (rghost2)

  1. aumentando o tamanho do campo para agencia/conta do beneficiário.
  2. vencimento e valor colocados em negritos
  3. sacado avalista, alterado o limite para trucar o texto para que não corte o CPF/CNPJ.

if avalista
doc.text_area "<menor>#{truncar(avalista, 59)}</menor>", width: 12.312, text_align: :left, x: 2.04611, y: 4.3, row_height: '0.4 cm'
doc.text_area "<menor2>#{avalista}</menor2>", width: 12.312, text_align: :left, x: 2.04611, y: 4.3, row_height: '0.4 cm'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [134/80]
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

doc.text_area pagador, width: 18, text_align: :left, x: 2.04611, y: 5.8, row_height: '0.4 cm'
avalista = "#{boleto.avalista} - #{boleto.avalista_documento}" if boleto.avalista && boleto.avalista_documento
avalista = "#{truncar(boleto.avalista,46)} - CPF/CNPJ: #{boleto.avalista_documento.formata_documento.to_s}" if boleto.avalista && boleto.avalista_documento
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/SpaceAfterComma: Space missing after comma.
Metrics/LineLength: Line is too long. [168/80]
Lint/StringConversionInInterpolation: Redundant use of Object#to_s in interpolation.

@@ -207,11 +206,11 @@ def modelo_generico_rodape(doc, boleto)
doc.show boleto.especie
monta_instrucoes(doc, boleto, 0.8, 9.8)
pagador = "<menor>#{truncar(boleto.sacado,75)} - CPF/CNPJ: #{boleto.sacado_documento.formata_documento}</menor>"
pagador += "\n<menor>#{boleto.sacado_endereco.to_s}</menor>"
pagador += "\n<menor>#{boleto.sacado_endereco.to_s}</menor>" if boleto.sacado_endereco
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint/StringConversionInInterpolation: Redundant use of Object#to_s in interpolation.
Metrics/LineLength: Line is too long. [98/80]

doc.text_area "<menor>#{boleto.agencia_conta_boleto}</menor>", width: 5.786, text_align: :center, x: 14.47271, y: 12.26921
doc.text_area "<menor>#{boleto.nosso_numero_boleto}</menor>", width: 5.786, text_align: :center, x: 14.47271, y: 11.42254
doc.text_area "<menor>#{boleto.valor_documento.to_currency}</menor>", width: 5.5, text_align: :right, x: 14.47271, y: 10.56926
doc.text_area "<menor_bold>#{boleto.valor_documento.to_currency}</menor_bold>", width: 5.5, text_align: :right, x: 14.47271, y: 10.56926
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [149/80]
Layout/ExtraSpacing: Unnecessary spacing detected.

@@ -173,10 +172,10 @@ def modelo_generico_cabecalho(doc, boleto)
# Monta o corpo e rodapé do layout do boleto
def modelo_generico_rodape(doc, boleto)
monta_logotipo(doc, boleto, 0.782, 13.9, 0.85)
doc.text_area "<menor>#{boleto.data_vencimento.to_s_br if boleto.data_vencimento}</menor>", width: 5.786, text_align: :center, x: 14.47271, y: 13.11587
doc.text_area "<menor_bold>#{boleto.data_vencimento.to_s_br if boleto.data_vencimento}</menor_bold>", width: 5.786, text_align: :center, x: 14.47271, y: 13.11587
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/SafeNavigation: Use safe navigation (&.) instead of checking if an object exists before calling the method.
Metrics/LineLength: Line is too long. [173/80]

@@ -151,14 +152,12 @@ def modelo_generico_cabecalho(doc, boleto)
doc.show boleto.codigo_barras.linha_digitavel, tag: :menor_bold
doc.moveto x: 1.121, y: 18.924
doc.show truncar(boleto.cedente, 47), tag: :menor
doc.moveto x: 9.8, y: 18.924
doc.moveto x: 9.9, y: 18.924
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Layout/ExtraSpacing: Unnecessary spacing detected.

@@ -111,12 +111,13 @@ def modelo_generico_multipage(boletos, options = {})

# Define o template a ser usado no boleto
def modelo_generico_template(doc, _boleto, template_path)
doc.define_template(:template, template_path, x: '0.732 cm', y: '2.060 cm')
doc.define_template(:template, template_path, x: '0.732 cm', y: '3.48 cm')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Metrics/LineLength: Line is too long. [86/80]

@kivanio kivanio merged commit 2874475 into kivanio:master Jul 20, 2022
mrbongiolo pushed a commit to mrbongiolo/brcobranca that referenced this pull request Sep 17, 2022
lbarbieri-esl pushed a commit to dnicolau/brcobranca that referenced this pull request Apr 3, 2023
lbarbieri-esl pushed a commit to dnicolau/brcobranca that referenced this pull request Apr 13, 2023
lbarbieri-esl pushed a commit to dnicolau/brcobranca that referenced this pull request May 10, 2023
lbarbieri-esl pushed a commit to dnicolau/brcobranca that referenced this pull request May 30, 2023
lbarbieri-esl pushed a commit to dnicolau/brcobranca that referenced this pull request May 30, 2023
jhenrique-esl pushed a commit to dnicolau/brcobranca that referenced this pull request May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants