Skip to content

Commit

Permalink
fix emission type when xml not return this value
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagovsk committed Aug 30, 2018
1 parent a513b69 commit dae9fa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/br_invoices_pdf/nfce/parser/emission_details.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def contingency_params(xml)
emission_path = emission_root_path(xml)

hash = {
type: EMISSION_TYPES[locate_element(xml, "#{emission_path}/tpEmis").to_sym],
type: EMISSION_TYPES[(locate_element(xml, "#{emission_path}/tpEmis") || '1').to_sym],
number: locate_element(xml, "#{emission_path}/nNF"),
serie: locate_element(xml, "#{emission_path}/serie"),
emission_timestamp: locate_element_to_date(xml, "#{emission_path}/dhEmi"),
Expand Down

0 comments on commit dae9fa3

Please sign in to comment.