Sha256: 87f0904ea60eeb9ced5cc4182805f04d4cd502b9baf57a0a29bd480dbb4a6845

Contents?: true

Size: 586 Bytes

Versions: 25

Compression:

Stored size: 586 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

25 entries across 25 versions & 1 rubygems

Version Path
br_danfe-0.11.1 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.11.0 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.10.1 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.10.0 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.8.0 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.7.7 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.7.6 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.7.5 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.7.4 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.7.3 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.7.2 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.7.1 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.7.0 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.6.1 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.6.0 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.5.2 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.5.1 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.5.0 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.4.3 lib/br_danfe/danfe_lib/ticket.rb
br_danfe-0.4.2 lib/br_danfe/danfe_lib/ticket.rb