Correção QRCODE holerite
This commit is contained in:
BIN
Imagens para implantação /Imagem colada (16).png
Normal file
BIN
Imagens para implantação /Imagem colada (16).png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
@@ -75,7 +75,7 @@ module Pdf
|
|||||||
at: [16, @pdf.cursor - 10], size: 10, style: :bold
|
at: [16, @pdf.cursor - 10], size: 10, style: :bold
|
||||||
@pdf.text_box moeda(total),
|
@pdf.text_box moeda(total),
|
||||||
at: [16, @pdf.cursor - 24], size: 22, style: :bold
|
at: [16, @pdf.cursor - 24], size: 22, style: :bold
|
||||||
@pdf.move_down 64
|
@pdf.move_down 58
|
||||||
|
|
||||||
# Detalhamento: total de entregas e veículos atendidos no período
|
# Detalhamento: total de entregas e veículos atendidos no período
|
||||||
total_entregas = @entregas.count
|
total_entregas = @entregas.count
|
||||||
@@ -84,10 +84,14 @@ module Pdf
|
|||||||
@pdf.text "Total de entregas: #{total_entregas}", size: 9
|
@pdf.text "Total de entregas: #{total_entregas}", size: 9
|
||||||
@pdf.text "Veículos atendidos: #{veiculos.any? ? veiculos.join(', ') : '—'}", size: 9
|
@pdf.text "Veículos atendidos: #{veiculos.any? ? veiculos.join(', ') : '—'}", size: 9
|
||||||
@pdf.fill_color '000000'
|
@pdf.fill_color '000000'
|
||||||
@pdf.move_down 8
|
@pdf.move_down 6
|
||||||
|
|
||||||
# QR Code de login rápido
|
# QR Code de login rápido. O Prawn não pagina imagem sozinho: se faltar
|
||||||
desenhar_qrcode if @user_motorista&.login_token.present?
|
# espaço, garantimos uma nova página para o QR não sumir no rodapé.
|
||||||
|
if @user_motorista&.login_token.present?
|
||||||
|
@pdf.start_new_page if @pdf.cursor < 180
|
||||||
|
desenhar_qrcode
|
||||||
|
end
|
||||||
|
|
||||||
assinaturas(motorista: @motorista)
|
assinaturas(motorista: @motorista)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user