Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MatCRL committed Jan 6, 2025
1 parent 0f5e36a commit 335cbdc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/br_danfe/danfe_lib/nfe_lib/infadic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,12 @@ def dup_content

@xml.collect('xmlns', 'dup') do |det|
dup += 1
value = "#{det.css('nDup').text} - #{format_dup_date(det, det.css('dVenc').text)} - R$ #{BrDanfe::Helper.numerify(det.css('vDup').text.to_f)}"

if dup == 13
value_dups.push("Faturas: #{det.css('nDup').text} - #{format_dup_date(det, det.css('dVenc').text)} - R$ #{BrDanfe::Helper.numerify(det.css('vDup').text.to_f)}")
value_dups.push("Faturas: #{value}")
elsif dup > 13
value_dups.push("#{det.css('nDup').text} - #{format_dup_date(det, det.css('dVenc').text)} - R$ #{BrDanfe::Helper.numerify(det.css('vDup').text.to_f)}")
value_dups.push(value.to_s)
end
end

Expand Down

0 comments on commit 335cbdc

Please sign in to comment.