-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
Conversation
@@ -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' |
There was a problem hiding this comment.
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 | ||
|
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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>" |
There was a problem hiding this comment.
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>" |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
@netosjb topissimo \o/ 🥇 |
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