Sha256: c4bbb703d6a4f38fa28b0117956172bac34b6a4117fa0444f50f0b22bbf65eb7

Contents?: true

Size: 624 Bytes

Versions: 3

Compression:

Stored size: 624 Bytes

Contents

module BrDanfe
  module DanfeLib
    class Ticket
      def initialize(pdf, xml)
        @pdf = pdf
        @xml = xml
      end

      def render
        @pdf.ibox 0.85, 15.60, 0.75, 1.85, I18n.t('danfe.ticket.xNome', xNome: @xml['emit/xNome'])
        @pdf.ibox 0.85, 3.85, 0.75, 2.7, I18n.t('danfe.ticket.received_at')
        @pdf.ibox 0.85, 11.75, 4.60, 2.7, I18n.t('danfe.ticket.receiver')
        @pdf.ibox 1.70, 4.00, 16.35, 1.85, '',
                  I18n.t('danfe.ticket.document', nNF: @xml['ide/nNF'], serie: @xml['ide/serie']),
                  { align: :center, valign: :center }
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
br_danfe-0.12.1 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.12.0 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.11.2 lib/br_danfe/danfe_lib/ticket.rb