Skip to content

Commit

Permalink
DOING: add elements in pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagovsk committed Jul 3, 2017
1 parent 3cbf628 commit 69e3786
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions lib/br_invoices_pdf/cfe/renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,36 @@ module Renderer

def pdf(data, options)
Prawn::Document.new(options) do |pdf|
## constroi o pdf
pdf.text data.to_s
pdf.text data[:company_attributes][:company_name]
pdf.text data[:company_attributes][:trading_name]
pdf.text 'CNPJ:' + data[:company_attributes][:cnpj]
pdf.text 'IE:' data[:company_attributes][:ie]
pdf.text 'IM:' + data[:company_attributes][:im]
pdf.text data[:company_attributes][:address][:public_place]
pdf.text data[:company_attributes][:address][:number]
pdf.text data[:company_attributes][:address][:complement]
pdf.text data[:company_attributes][:address][:city]
pdf.text data[:company_attributes][:address][:neighborhood]
pdf.text data[:company_attributes][:address][:cep]
pdf.text '========================================================='
pdf.text 'Extrato 0'
pdf.text 'CUPOM FISCAL ELETRONICO - SAT'
pdf.text '========================================================='
pdf.text 'CONSUMIDOR OU CONSUMIDOR NAO IDENTIFICADO'#TODO
pdf.text '========================================================='
pdf.text 'produtos'
pdf.text '========================================================='
pdf.text 'venda'
pdf.text 'obs do fisco'
pdf.text '========================================================='
pdf.text 'valor aproximado dos tribustos deste cupom...'
pdf.text '========================================================='
pdf.text 'numero do sat'
pdf.text 'data e hora'
pdf.text 'numero de serie'
pdf.text 'codigo de barras 1'
pdf.text 'codigo de barras 2'
pdf.text 'qrcode'
end
end
end
Expand Down

0 comments on commit 69e3786

Please sign in to comment.