Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagovsk committed Sep 28, 2017
1 parent 9c0b80c commit a04e92d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/br_invoices_pdf/cfe/renderer/header.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ def execute(pdf, data)
end

def identificator(data)
return 'CONSUMIDOR NAO IDENTIFICADO' if data[:cpf].nil? && data[:cnpj].nil?
value = data[:cpf].nil? ? format_cnpj(data[:cnpj]) : format_cpf(data[:cpf])
'CONSUMIDOR: ' + value
cpf = data[:cpf]
cnpj = data[:cnpj]
return 'CONSUMIDOR NAO IDENTIFICADO' if cpf && cnpj
'CONSUMIDOR: ' + cpf ? format_cnpj(cnpj) : format_cpf(cpf)
end
private_class_method :identificator

Expand Down

0 comments on commit a04e92d

Please sign in to comment.