diff --git a/Imagens para implantação /Imagem colada (16).png b/Imagens para implantação /Imagem colada (16).png new file mode 100644 index 0000000..c531d4d Binary files /dev/null and b/Imagens para implantação /Imagem colada (16).png differ diff --git a/app/services/pdf/holerite_pdf.rb b/app/services/pdf/holerite_pdf.rb index 5c400c2..df83379 100644 --- a/app/services/pdf/holerite_pdf.rb +++ b/app/services/pdf/holerite_pdf.rb @@ -75,7 +75,7 @@ module Pdf at: [16, @pdf.cursor - 10], size: 10, style: :bold @pdf.text_box moeda(total), 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 total_entregas = @entregas.count @@ -84,10 +84,14 @@ module Pdf @pdf.text "Total de entregas: #{total_entregas}", size: 9 @pdf.text "Veículos atendidos: #{veiculos.any? ? veiculos.join(', ') : '—'}", size: 9 @pdf.fill_color '000000' - @pdf.move_down 8 + @pdf.move_down 6 - # QR Code de login rápido - desenhar_qrcode if @user_motorista&.login_token.present? + # QR Code de login rápido. O Prawn não pagina imagem sozinho: se faltar + # 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) end