Sha256: 9650e18a7211132c2d90b6116d1b7c50ac72faeae2ef48d381ad4f745d975e4a

Contents?: true

Size: 581 Bytes

Versions: 2

Compression:

Stored size: 581 Bytes

Contents

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

      def generate
        authorization
      end

      private

      def authorization
        title = 'Protocolo de autorização'
        protocol = @xml['infProt/nProt'] + ' - ' + Helper.format_datetime(@xml['infProt/dhRecbto'], with_time_zone: true)

        @pdf.text_box(title, size: 9, align: :left, style: :bold, at: [0, 510])
        @pdf.text_box(protocol, size: 11, align: :left, at: [0, 500])
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
br_danfe-0.17.0 lib/br_danfe/mdfe_lib/authorization_protocol.rb
br_danfe-0.16.0 lib/br_danfe/mdfe_lib/authorization_protocol.rb