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

adiciona uma nova opção de template #237

Merged
merged 1 commit into from
Jul 20, 2022

Conversation

antoniospneto
Copy link
Contributor

@antoniospneto antoniospneto commented Jul 19, 2022

Adiciona uma nova opção de modelo para impressão dos boletos.

Esse modelo conta com um recibo para o beneficiário, porém não tem demostrativo.
Os texto grandes são truncados.

Conforme o anexo: boleto.pdf

@@ -119,6 +119,7 @@ module Boleto
module Template
autoload :Base, 'brcobranca/boleto/template/base'
autoload :Rghost, 'brcobranca/boleto/template/rghost'
autoload :Rghost2, 'brcobranca/boleto/template/rghost2'
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.
Layout/TrailingWhitespace: Trailing whitespace detected.

end
end
end

Copy link
Collaborator

Choose a reason for hiding this comment

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

Layout/TrailingWhitespace: Trailing whitespace detected.

doc.graphic do |g|
g.scale(scale, scale)
fator = 1/scale
g.image boleto.logotipo, x: (x*fator), y: (y*fator)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Layout/SpaceAroundOperators: Surrounding space missing for operator *.

def monta_logotipo(doc, boleto, x, y, scale)
doc.graphic do |g|
g.scale(scale, scale)
fator = 1/scale
Copy link
Collaborator

Choose a reason for hiding this comment

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

Layout/SpaceAroundOperators: Surrounding space missing for operator /.

doc.text_area texto_instrucoes, width: 13.547, text_align: :left, x: x, y: y, row_height: '0.4 cm'
end

def monta_logotipo(doc, boleto, x, y, scale)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Naming/UncommunicativeMethodParamName: Method parameter must be at least 3 characters long.

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>"
doc.text_area pagador, width: 18, text_align: :left, x: 2.04611, y: 5.8, 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. [105/80]
Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

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>"
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.

doc.moveto x: 7.26640, y: 10.56058
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>"
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. [124/80]

doc.moveto x: 9.588, y: 11.42
doc.show boleto.aceite, tag: :menor
doc.moveto x: 11.660, y: 11.42
doc.show (boleto.data_processamento.to_s_br if boleto.data_processamento), tag: :menor
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. [98/80]

doc.show boleto.documento_cedente.formata_documento.to_s, tag: :menor
doc.moveto x: 1.112, y: 11.42
doc.show (boleto.data_documento.to_s_br if boleto.data_documento), tag: :menor
doc.moveto x: 4.268, y: 11.42
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.

@kivanio
Copy link
Owner

kivanio commented Jul 20, 2022

@netosjb topissimo \o/ 🥇

@kivanio kivanio merged commit 993304e 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.

4 participants