Sha256: 9a3634fdec302ab1575b8d0f59b3a713fd3a4d296bc4e3e02974650ea7c402f3

Contents?: true

Size: 540 Bytes

Versions: 4

Compression:

Stored size: 540 Bytes

Contents

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

    def render
      @pdf.ibox 0.85, 16.10, 0.25, 0.42, I18n.t("danfe.ticket.xNome", xNome: @xml["emit/xNome"])
      @pdf.ibox 0.85, 4.10, 0.25, 1.27, I18n.t("danfe.ticket.received_at")
      @pdf.ibox 0.85, 12.00, 4.35, 1.27, I18n.t("danfe.ticket.receiver")
      @pdf.ibox 1.70, 4.50, 16.35, 0.42, "", I18n.t("danfe.ticket.document", nNF: @xml["ide/nNF"], serie: @xml["ide/serie"]), {align: :center, valign: :center}
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
br_danfe-0.0.9 lib/br_danfe/ticket.rb
br_danfe-0.0.8 lib/br_danfe/ticket.rb
br_danfe-0.0.7 lib/br_danfe/ticket.rb
br_danfe-0.0.6 lib/br_danfe/ticket.rb