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 +4 -4
- data/Gemfile.lock +10 -10
- data/config/locales/pt-BR.yml +3 -3
- data/lib/br_danfe/danfe_lib/det_body.rb +14 -13
- data/lib/br_danfe/danfe_lib/det_header.rb +14 -14
- data/lib/br_danfe/version.rb +1 -1
- data/spec/fixtures/nfe/lib/det_body#render-csosn.pdf +197 -260
- data/spec/fixtures/nfe/lib/det_body#render-cst.pdf +116 -144
- data/spec/fixtures/nfe/lib/det_body#render-fci.pdf +53 -74
- data/spec/fixtures/nfe/lib/det_body#render-icms_st.pdf +53 -74
- data/spec/fixtures/nfe/lib/det_body#render-quantity_with_custom_precision.pdf +48 -62
- data/spec/fixtures/nfe/lib/det_body#render-unit_price_with_custom_precision.pdf +48 -62
- data/spec/fixtures/nfe/lib/det_header#render.pdf +35 -35
- data/spec/fixtures/nfe/v2.00/custom_options.fixture.pdf +179 -221
- data/spec/fixtures/nfe/v2.00/nfe_simples_nacional.xml.fixture.pdf +177 -219
- data/spec/fixtures/nfe/v2.00/nfe_with_extra_volumes.xml.fixture.pdf +882 -1092
- data/spec/fixtures/nfe/v2.00/nfe_with_fci.xml.fixture.pdf +107 -128
- data/spec/fixtures/nfe/v2.00/nfe_with_ns.xml.fixture.pdf +882 -1092
- data/spec/fixtures/nfe/v2.00/nfe_without_ns.xml.fixture.pdf +206 -248
- data/spec/fixtures/nfe/v3.10/nfe_simples_nacional.xml.fixture.pdf +453 -593
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1033989799c07866763f69b6a90e5ab582e7f84
|
4
|
+
data.tar.gz: f7d4bf7dbdfb38cb263d6975d13c436fda9c4fd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
16
|
-
activesupport (= 5.0.
|
17
|
-
activesupport (5.0.
|
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.
|
30
|
+
codeclimate-test-reporter (1.0.5)
|
31
31
|
simplecov
|
32
32
|
columnize (0.9.0)
|
33
|
-
concurrent-ruby (1.0.
|
33
|
+
concurrent-ruby (1.0.4)
|
34
34
|
debugger-linecache (1.2.0)
|
35
|
-
diff-lcs (1.
|
35
|
+
diff-lcs (1.3)
|
36
36
|
docile (1.1.5)
|
37
|
-
i18n (0.
|
38
|
-
json (1.8.
|
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.
|
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)
|
data/config/locales/pt-BR.yml
CHANGED
@@ -101,13 +101,13 @@ pt-BR:
|
|
101
101
|
CFOP: "CFOP"
|
102
102
|
uCom: "UNID"
|
103
103
|
qCom: "QUANT"
|
104
|
-
vUnCom: "
|
105
|
-
vProd: "
|
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: "
|
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 = [:
|
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.
|
58
|
-
1 =>
|
59
|
-
2 => 1.
|
60
|
-
3 => 0.
|
61
|
-
4 =>
|
62
|
-
5 => 1.
|
63
|
-
6 => 1.
|
64
|
-
7 => 1.
|
65
|
-
8 => 1.
|
66
|
-
9 => 1.
|
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.
|
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.
|
17
|
-
column(
|
18
|
-
column(1.
|
19
|
-
column(0.
|
20
|
-
column(
|
21
|
-
column(1.
|
22
|
-
column(1.
|
23
|
-
column(1.
|
24
|
-
column(1.
|
25
|
-
column(1.
|
26
|
-
column(1.00, 16.
|
27
|
-
column(1.00, 17.
|
28
|
-
column(0.90, 18.
|
29
|
-
column(0.
|
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
|
data/lib/br_danfe/version.rb
CHANGED