br_invoices_pdf 0.2.21 → 0.2.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96f8353dce0017f81b7d006e4486cb6e834f0849
4
- data.tar.gz: 40369409ecc5499d782ed7ddf482ca5099d26dcf
3
+ metadata.gz: eb69bab668fd1a482a8b9ae5137f8e5be01ddae1
4
+ data.tar.gz: 0b181f5e7684a9c2449d3fdf0e9a9a6e48ef47b3
5
5
  SHA512:
6
- metadata.gz: 27e5500e75eb4215536d036b960225b9d765cc5be3d4b0896e2a083fdb050741edaae0bca7bb94859f3a6dbe9ee33434ebdd9da1ef4ba4d3482976e533d8076f
7
- data.tar.gz: 29438183a215ee3a6c0c03dc021c5044cf9161ec1409055da2aae613943bd4d3d469cb3754cebb148c4f0061009a1118f10be90e1b333cf94a429d2a66551d0f
6
+ metadata.gz: d43a9c4355407927bac60d98e8a0e1afe3eaaecda42c8dd9463de0acca2868b42905f99a1bcd4a636919021bde3ac05e806c8662a23f10a3d20f8e94e6c267fe
7
+ data.tar.gz: 396c412360088e6819bcec997f734e0c6a4fbbb3ae34d8456c895599e8f40c6af6c27c3299f8d57ecf685e807e9e20cabaa9d6cd39cd52ea3b00ac12def06d75
@@ -8,14 +8,9 @@ module BrInvoicesPdf
8
8
 
9
9
  module_function
10
10
 
11
- FIELDS = { code: 'cProd',
12
- description: 'xProd',
13
- cfop: 'CFOP',
14
- quantity: 'qCom',
15
- unit_label: 'uCom',
16
- total_value: 'vProd',
17
- unit_value: 'vUnCom',
18
- item_value: 'vItem' }.freeze
11
+ FIELDS = { code: 'cProd', description: 'xProd', cfop: 'CFOP',
12
+ quantity: 'qCom', unit_label: 'uCom', total_value: 'vProd',
13
+ unit_value: 'vUnCom', item_value: 'vItem' }.freeze
19
14
 
20
15
  def execute(xml)
21
16
  node_products = xml.locate('infCFe/det')
@@ -29,7 +24,11 @@ module BrInvoicesPdf
29
24
 
30
25
  def product_by(element)
31
26
  FIELDS
32
- .map { |(key, field)| [key, node_locate(element, field).force_encoding('WINDOWS-1252').encode('UTF-8')] }
27
+ .map do |(key, field)|
28
+ [key, node_locate(element, field).force_encoding('windows-1252')
29
+ .force_encoding('UTF-8')
30
+ .encode('UTF-8')]
31
+ end
33
32
  .to_h
34
33
  end
35
34
  private_class_method :product_by
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BrInvoicesPdf
4
- VERSION = '0.2.21'
4
+ VERSION = '0.2.22'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: br_invoices_pdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.21
4
+ version: 0.2.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thiago Ribeiro
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-11-15 00:00:00.000000000 Z
12
+ date: 2019-01-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: barby