Skip to content

Commit

Permalink
Merge pull request #28 from pdvend/hotfix/cfe_emission_time
Browse files Browse the repository at this point in the history
Hotfix/cfe emission time
  • Loading branch information
romarioclacino committed Jan 17, 2018
2 parents cd5e92a + 96a2f08 commit 86384bf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/br_invoices_pdf/cfe/renderer/taxes_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def execute(pdf, data)

def date_values(pdf, data)
time = data[:emission_date] + data[:emission_hour]
pdf.text(Date.parse(time).strftime('%d/%m/%Y %H:%M:%S'), align: :center)
pdf.text(Time.parse(time).strftime('%d/%m/%Y %H:%M:%S'), align: :center)
end
private_class_method :date_values

Expand Down
2 changes: 1 addition & 1 deletion lib/br_invoices_pdf/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module BrInvoicesPdf
VERSION = '0.2.10'
VERSION = '0.2.11'
end
2 changes: 1 addition & 1 deletion spec/lib/br_invoices_pdf/cfe/renderer/taxes_info_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
let(:emission_hour) { '131313' }
let(:base_renderer) { BrInvoicesPdf::Cfe::Renderer::BaseRenderer }
let(:width) { 100 }
let(:formated_time) { Date.parse(emission_date + emission_hour).strftime('%d/%m/%Y %H:%M:%S') }
let(:formated_time) { Time.parse(emission_date + emission_hour).strftime('%d/%m/%Y %H:%M:%S') }
let(:taxes_info) { "Informação dos tributos totais incidentes (Lei Federal 12.741/2012):\n R$ 12,00\n\n" }
before do
allow_any_instance_of(base_renderer).to receive(:box).and_yield
Expand Down

0 comments on commit 86384bf

Please sign in to comment.