br_danfe 0.6.0 → 0.6.1

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: afcc9cb13aa2c93eff94a506523e99185e29f423
4
- data.tar.gz: 3835b5f1bf54d9cacb301822c68e39f19c9e48bb
3
+ metadata.gz: f1033989799c07866763f69b6a90e5ab582e7f84
4
+ data.tar.gz: f7d4bf7dbdfb38cb263d6975d13c436fda9c4fd5
5
5
  SHA512:
6
- metadata.gz: 31c9b78fa9f090c018b9c1bf48cd37acb24660c9b0cef2cb0a28d782fc36499c2fd3927568cd61aba7569465dde455641a84cb3df8cdd407f558cdd7bbd997f5
7
- data.tar.gz: f76caec577b0268553880aa4672fbcd5a42e0652d2f34a3f5f8927e293460fed531da799dc94a90031f9e6ea9377df44ee10d26a1b1a8fb2ff9b4a171579e6f5
6
+ metadata.gz: 0224b05d141117d8f5a03aebeee1371b31f31a6ecd3789abff021d5f82aa98adb254d2261d745ff609a1595749a9b17e560443dab8cedb8ac950e0950e983d81
7
+ data.tar.gz: 8943a9c5e02e9847f30860b6e8a840e48b3c73b3d471767c1298946beae9845d799296323a8069a05a9e2e7cb3540c874dc7db816ab1ab79d04f4ef7e80a4f74
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- br_danfe (0.6.0)
4
+ br_danfe (0.6.1)
5
5
  barby (= 0.5.1)
6
6
  br_documents (>= 0.0.8)
7
7
  i18n
@@ -12,9 +12,9 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- activemodel (5.0.0.1)
16
- activesupport (= 5.0.0.1)
17
- activesupport (5.0.0.1)
15
+ activemodel (5.0.1)
16
+ activesupport (= 5.0.1)
17
+ activesupport (5.0.1)
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
19
  i18n (~> 0.7)
20
20
  minitest (~> 5.1)
@@ -27,18 +27,18 @@ GEM
27
27
  columnize (~> 0.8)
28
28
  debugger-linecache (~> 1.2)
29
29
  slop (~> 3.6)
30
- codeclimate-test-reporter (1.0.3)
30
+ codeclimate-test-reporter (1.0.5)
31
31
  simplecov
32
32
  columnize (0.9.0)
33
- concurrent-ruby (1.0.2)
33
+ concurrent-ruby (1.0.4)
34
34
  debugger-linecache (1.2.0)
35
- diff-lcs (1.2.5)
35
+ diff-lcs (1.3)
36
36
  docile (1.1.5)
37
- i18n (0.7.0)
38
- json (1.8.3)
37
+ i18n (0.8.0)
38
+ json (1.8.6)
39
39
  mini_portile2 (2.1.0)
40
40
  minitest (5.10.1)
41
- nokogiri (1.6.8.1)
41
+ nokogiri (1.7.0.1)
42
42
  mini_portile2 (~> 2.1.0)
43
43
  pdf-core (0.6.1)
44
44
  prawn (2.1.0)
@@ -101,13 +101,13 @@ pt-BR:
101
101
  CFOP: "CFOP"
102
102
  uCom: "UNID"
103
103
  qCom: "QUANT"
104
- vUnCom: "VALOR UNIT"
105
- vProd: "VALOR TOT"
104
+ vUnCom: "VL UNIT"
105
+ vProd: "VL TOTAL"
106
106
  xProdST: "ST: MVA: %{pMVAST}% * Alíq: %{pICMSST}% * BC: %{vBCST} * Vlr: %{vICMSST}"
107
107
  xProdFCI: "FCI: %{nFCI}"
108
108
  ICMS:
109
109
  CST: "CST"
110
- vBC: "BASE CÁLC"
110
+ vBC: "BC ICMS"
111
111
  vICMS: "VL ICMS"
112
112
  pICMS: "% ICMS"
113
113
  IPI:
@@ -12,12 +12,12 @@ module BrDanfe
12
12
  cell_style: { padding: 2, border_width: 0 }
13
13
  }
14
14
 
15
- @pdf.font_size(6) do
15
+ @pdf.font_size(6.5) do
16
16
  @pdf.bounding_box [0.75.cm, Helper.invert(19.59.cm)], width: 19.57.cm, height: 6.07.cm do
17
17
  @pdf.table products, options do |table|
18
18
  table.column(6..13).style(align: :right)
19
19
  table.column(0..13).border_width = 0.3
20
- table.column(0..13).border_lines = [:dotted]
20
+ table.column(0..13).border_lines = [:solid]
21
21
  table.column(0..13).borders = [:bottom]
22
22
  end
23
23
  end
@@ -25,6 +25,7 @@ module BrDanfe
25
25
  end
26
26
 
27
27
  private
28
+
28
29
  def products
29
30
  @xml.collect("xmlns", "det") { |det| product(det) }
30
31
  end
@@ -54,20 +55,20 @@ module BrDanfe
54
55
 
55
56
  def column_widths
56
57
  {
57
- 0 => 1.50.cm,
58
- 1 => 4.40.cm,
59
- 2 => 1.30.cm,
60
- 3 => 0.80.cm,
61
- 4 => 1.00.cm,
62
- 5 => 1.00.cm,
63
- 6 => 1.30.cm,
64
- 7 => 1.50.cm,
65
- 8 => 1.50.cm,
66
- 9 => 1.50.cm,
58
+ 0 => 1.60.cm,
59
+ 1 => 6.10.cm,
60
+ 2 => 1.05.cm,
61
+ 3 => 0.60.cm,
62
+ 4 => 0.70.cm,
63
+ 5 => 1.05.cm,
64
+ 6 => 1.20.cm,
65
+ 7 => 1.20.cm,
66
+ 8 => 1.20.cm,
67
+ 9 => 1.20.cm,
67
68
  10 => 1.00.cm,
68
69
  11 => 1.00.cm,
69
70
  12 => 0.90.cm,
70
- 13 => 0.86.cm
71
+ 13 => 0.76.cm
71
72
  }
72
73
  end
73
74
  end
@@ -13,20 +13,20 @@ module BrDanfe
13
13
  def render
14
14
  @pdf.ititle 0.42, 10.00, 0.75, @ltitle, "det.title"
15
15
 
16
- column(1.50, 0.75, "prod.cProd")
17
- column(4.40, 2.25, "prod.xProd")
18
- column(1.30, 6.65, "prod.NCM")
19
- column(0.80, 7.95, "ICMS.CST")
20
- column(1.00, 8.75, "prod.CFOP")
21
- column(1.00, 9.75, "prod.uCom")
22
- column(1.30, 10.75, "prod.qCom")
23
- column(1.50, 12.05, "prod.vUnCom")
24
- column(1.50, 13.55, "prod.vProd")
25
- column(1.50, 15.05, "ICMS.vBC")
26
- column(1.00, 16.55, "ICMS.vICMS")
27
- column(1.00, 17.55, "IPI.vIPI")
28
- column(0.90, 18.55, "ICMS.pICMS")
29
- column(0.86, 19.45, "IPI.pIPI")
16
+ column(1.60, 0.75, "prod.cProd")
17
+ column(6.10, 2.35, "prod.xProd")
18
+ column(1.05, 8.45, "prod.NCM")
19
+ column(0.60, 9.50, "ICMS.CST")
20
+ column(0.70, 10.10, "prod.CFOP")
21
+ column(1.05, 10.80, "prod.uCom")
22
+ column(1.20, 11.85, "prod.qCom")
23
+ column(1.20, 13.05, "prod.vUnCom")
24
+ column(1.20, 14.25, "prod.vProd")
25
+ column(1.20, 15.45, "ICMS.vBC")
26
+ column(1.00, 16.65, "ICMS.vICMS")
27
+ column(1.00, 17.65, "IPI.vIPI")
28
+ column(0.90, 18.65, "ICMS.pICMS")
29
+ column(0.76, 19.55, "IPI.pIPI")
30
30
 
31
31
  @pdf.horizontal_line 0.75.cm, 20.31.cm, at: Helper.invert(19.59.cm)
32
32
  end
@@ -1,3 +1,3 @@
1
1
  module BrDanfe
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end