br_danfe 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,45 +1,109 @@
1
1
  module BrDanfe
2
2
  class Emit
3
- def self.render(pdf, xml)
4
- if BrDanfe.options.logo_path.empty?
5
- pdf.ibox 3.92, 8.46, 0.25, 2.80, "", xml["emit/xNome"], {size: 12, align: :center, border: 0, style: :bold}
6
- self.render_address(pdf, xml, 2.54)
3
+ def initialize(pdf, xml, logo_path)
4
+ @pdf = pdf
5
+ @xml = xml
6
+ @logo_path = logo_path
7
+ end
8
+
9
+ def render
10
+ address_box
11
+ danfe_box
12
+ access_key_box
13
+ sefaz_box
14
+ operationkind_box
15
+ protocol_box
16
+ ie_box
17
+ ie_st_box
18
+ cnpj_box
19
+ end
20
+
21
+ private
22
+ def address_box
23
+ @pdf.ibox 3.92, 8.46, 0.25, 2.54
24
+
25
+ @pdf.ibox 3.92, 8.46, 0.25, 2.80, "", @xml["emit/xNome"],
26
+ { size: 12, align: :center, border: 0, style: :bold }
27
+
28
+ if @logo_path.empty?
29
+ @pdf.ibox 3.92, 8.46, 0.75, 4, "", address, { align: :left, border: 0 }
7
30
  else
8
- pdf.ibox 3.92, 8.46, 0.25, 2.54
9
- pdf.ibox 3.92, 8.46, 0.25, 2.80, "", xml["emit/xNome"], {size: 12, align: :center, border: 0, style: :bold}
10
- self.render_address(pdf, xml, 4)
11
- pdf.image BrDanfe.options.logo_path, at: [0.5.cm, Helper.invert(4.cm)], width: 2.cm
31
+ @pdf.ibox 3.92, 8.46, 2.75, 4, "", address,
32
+ { size: 8, align: :left, border: 0 }
33
+
34
+ @pdf.image @logo_path, at: [0.5.cm, Helper.invert(4.cm)],
35
+ width: 2.cm
12
36
  end
37
+ end
13
38
 
14
- pdf.ibox 3.92, 2.08, 8.71, 2.54
39
+ def address
40
+ formatted = @xml["enderEmit/xLgr"] + ", " + @xml["enderEmit/nro"] + "\n"
41
+ formatted += @xml["enderEmit/xBairro"] + " - " + cep + "\n"
42
+ formatted += @xml["enderEmit/xMun"] + "/" + @xml["enderEmit/UF"] + "\n"
43
+ formatted += phone + " " + @xml["enderEmit/email"]
15
44
 
16
- pdf.ibox 0.60, 2.08, 8.71, 2.54, "", "DANFE", {size: 12, align: :center, border: 0, style: :bold}
17
- pdf.ibox 1.20, 2.08, 8.71, 3.14, "", I18n.t("danfe.others.danfe"), {size: 8, align: :center, border: 0}
18
- pdf.ibox 0.60, 2.08, 8.71, 4.34, "", "#{xml['ide/tpNF']} - " + (xml["ide/tpNF"] == "0" ? I18n.t("danfe.ide.tpNF.entry") : I18n.t("danfe.ide.tpNF.departure")), {size: 8, align: :center, border: 0}
45
+ formatted
46
+ end
47
+
48
+ def phone
49
+ Phone.format(@xml["enderEmit/fone"])
50
+ end
51
+
52
+ def cep
53
+ Cep.format(@xml["enderEmit/CEP"])
54
+ end
55
+
56
+ def danfe_box
57
+ @pdf.ibox 3.92, 2.08, 8.71, 2.54
19
58
 
20
- pdf.ibox 1.00, 2.08, 8.71, 4.94, "",
21
- I18n.t("danfe.ide.document", nNF: xml["ide/nNF"], serie: xml["ide/serie"]), {size: 8, align: :center, valign: :center, border: 0, style: :bold}
59
+ @pdf.ibox 0.60, 2.08, 8.71, 2.54, "", "DANFE",
60
+ { size: 12, align: :center, border: 0, style: :bold }
22
61
 
23
- pdf.ibox 2.20, 10.02, 10.79, 2.54
24
- pdf.ibarcode 1.50, 8.00, 10.9010, 4.44, xml["chNFe"]
25
- pdf.ibox 0.85, 10.02, 10.79, 4.74, I18n.t("danfe.chNFe"), xml["chNFe"].gsub(/(\d)(?=(\d\d\d\d)+(?!\d))/, "\\1 "), {style: :bold, align: :center}
26
- pdf.ibox 0.85, 10.02, 10.79, 5.60 , "", I18n.t("danfe.others.sefaz"), {align: :center, size: 8}
27
- pdf.lbox 0.85, 10.54, 0.25, 6.46, xml, "ide/natOp"
28
- pdf.ibox 0.85, 10.02, 10.79, 6.46, I18n.t("danfe.infProt"), xml["infProt/nProt"] + " " + Helper.format_date(xml["infProt/dhRecbto"]) , {align: :center}
62
+ @pdf.ibox 1.20, 2.08, 8.71, 3.14, "", I18n.t("danfe.others.danfe"),
63
+ { size: 8, align: :center, border: 0 }
29
64
 
30
- pdf.ibox 0.85, 6.86, 0.25, 7.31, I18n.t("danfe.emit.IE"), Ie.format(xml["emit/IE"], xml["enderEmit/UF"])
31
- pdf.ibox 0.85, 6.86, 7.11, 7.31, I18n.t("danfe.emit.IE_ST"), Ie.format(xml["emit/IE_ST"], xml["enderEmit/UF"])
32
- pdf.ibox 0.85, 6.84, 13.97, 7.31, I18n.t("danfe.emit.CNPJ"), Cnpj.format(xml["emit/CNPJ"])
65
+ @pdf.ibox 0.60, 2.08, 8.71, 4.34, "", "#{@xml['ide/tpNF']} - " + (@xml["ide/tpNF"] == "0" ? I18n.t("danfe.ide.tpNF.entry") : I18n.t("danfe.ide.tpNF.departure")),
66
+ { size: 8, align: :center, border: 0 }
67
+
68
+ @pdf.ibox 1.00, 2.08, 8.71, 4.94, "",
69
+ I18n.t("danfe.ide.document", nNF: @xml["ide/nNF"], serie: @xml["ide/serie"]),
70
+ { size: 8, align: :center, valign: :center, border: 0, style: :bold }
33
71
  end
34
72
 
35
- private
36
- def self.render_address(pdf, xml, y)
37
- pdf.ibox 3.92, 8.46, 0.25, y, "",
38
- "\n" + xml["enderEmit/xLgr"] + ", " + xml["enderEmit/nro"] + "\n" +
39
- xml["enderEmit/xBairro"] + " - " + Cep.format(xml["enderEmit/CEP"]) + "\n" +
40
- xml["enderEmit/xMun"] + "/" + xml["enderEmit/UF"] + "\n" +
41
- Phone.format(xml["enderEmit/fone"]) + " " + xml["enderEmit/email"],
42
- { align: :center, valign: :center }
43
- end
73
+ def access_key_box
74
+ @pdf.ibox 2.20, 10.02, 10.79, 2.54
75
+ @pdf.ibarcode 1.50, 8.00, 10.9010, 4.44, @xml["chNFe"]
76
+ @pdf.ibox 0.85, 10.02, 10.79, 4.74, I18n.t("danfe.chNFe"), @xml["chNFe"].gsub(/(\d)(?=(\d\d\d\d)+(?!\d))/, "\\1 "),
77
+ { style: :bold, align: :center }
78
+ end
79
+
80
+ def sefaz_box
81
+ @pdf.ibox 0.85, 10.02, 10.79, 5.60 , "", I18n.t("danfe.others.sefaz"),
82
+ { align: :center, size: 8 }
83
+ end
84
+
85
+ def operationkind_box
86
+ @pdf.lbox 0.85, 10.54, 0.25, 6.46, @xml, "ide/natOp"
87
+ end
88
+
89
+ def protocol_box
90
+ @pdf.ibox 0.85, 10.02, 10.79, 6.46, I18n.t("danfe.infProt"), @xml["infProt/nProt"] + " " + Helper.format_date(@xml["infProt/dhRecbto"]), { align: :center }
91
+ end
92
+
93
+ def ie_box
94
+ ie(0.25, "IE")
95
+ end
96
+
97
+ def ie_st_box
98
+ ie(7.11, "IE_ST")
99
+ end
100
+
101
+ def ie(x, field)
102
+ @pdf.ibox 0.85, 6.86, x, 7.31, I18n.t("danfe.emit.#{field}"), Ie.format(@xml["emit/#{field}"], @xml["enderEmit/UF"])
103
+ end
104
+
105
+ def cnpj_box
106
+ @pdf.ibox 0.85, 6.84, 13.97, 7.31, I18n.t("danfe.emit.CNPJ"), Cnpj.format(@xml["emit/CNPJ"])
107
+ end
44
108
  end
45
109
  end
@@ -22,7 +22,7 @@ module BrDanfe
22
22
  formated_date
23
23
  end
24
24
 
25
- def self.without_fiscal_value?(xml)
25
+ def self.has_no_fiscal_value?(xml)
26
26
  homologation?(xml) || unauthorized?(xml)
27
27
  end
28
28
 
@@ -4,65 +4,17 @@ module BrDanfe
4
4
  uf = uf.upcase
5
5
 
6
6
  if ["AL", "AP", "MA", "ES", "MS", "PI", "TO"].include?(uf)
7
- formated_ie = ie
7
+ formatted = ie
8
+ elsif ["CE", "PB", "RR", "SE"].include?(uf)
9
+ formatted = ie.sub(/(\d{8})(\d{1})/, "\\1-\\2")
10
+ elsif ["AM", "GO"].include?(uf)
11
+ formatted = ie.sub(/(\d{2})(\d{3})(\d{3})(\d{1})/, "\\1.\\2.\\3-\\4")
12
+ else
13
+ masks = IeMasks.new
14
+ formatted = masks.send("apply_mask_for_#{uf.downcase}", ie)
8
15
  end
9
16
 
10
- if ["CE", "PB", "RR", "SE"].include?(uf)
11
- formated_ie = ie.sub(/(\d{8})(\d{1})/, "\\1-\\2")
12
- end
13
-
14
- if ["AM", "GO"].include?(uf)
15
- formated_ie = ie.sub(/(\d{2})(\d{3})(\d{3})(\d{1})/, "\\1.\\2.\\3-\\4")
16
- end
17
-
18
- case uf
19
- when "SP"
20
- if ie.length == 12
21
- formated_ie = ie.sub(/(\d{3})(\d{3})(\d{3})(\d{3})/, "\\1.\\2.\\3.\\4")
22
- else
23
- formated_ie = ie.sub(/(\w{1})(\d{8})(\d{1})(\d{3})/, "\\1-\\2.\\3/\\4")
24
- end
25
- when "BA"
26
- if ie.length == 8
27
- formated_ie = ie.sub(/(\d{6})(\d{2})/, "\\1-\\2")
28
- else
29
- formated_ie = ie.sub(/(\d{7})(\d{2})/, "\\1-\\2")
30
- end
31
- when "RO"
32
- if ie.length == 9
33
- formated_ie = ie.sub(/(\d{3})(\d{5})(\d{1})/, "\\1.\\2-\\3")
34
- else
35
- formated_ie = ie.sub(/(\d{13})(\d{1})/, "\\1-\\2")
36
- end
37
- when "RN"
38
- if ie.length == 9
39
- formated_ie = ie.sub(/(\d{2})(\d{3})(\d{3})(\d{1})/, "\\1.\\2.\\3-\\4")
40
- else
41
- formated_ie = ie.sub(/(\d{2})(\d{1})(\d{3})(\d{3})(\d{1})/, "\\1.\\2.\\3.\\4-\\5")
42
- end
43
- when "AC"
44
- formated_ie = ie.sub(/(\d{2})(\d{3})(\d{3})(\d{3})(\d{2})/, "\\1.\\2.\\3/\\4-\\5")
45
- when "DF"
46
- formated_ie = ie.sub(/(\d{11})(\d{2})/, "\\1-\\2")
47
- when "MG"
48
- formated_ie = ie.sub(/(\d{3})(\d{3})(\d{3})(\d{4})/, "\\1.\\2.\\3/\\4")
49
- when "MT"
50
- formated_ie = ie.sub(/(\d{10})(\d{1})/, "\\1-\\2")
51
- when "RJ"
52
- formated_ie = ie.sub(/(\d{2})(\d{3})(\d{2})(\d{1})/, "\\1.\\2.\\3-\\4")
53
- when "PR"
54
- formated_ie = ie.sub(/(\d{8})(\d{2})/, "\\1-\\2")
55
- when "RS"
56
- formated_ie = ie.sub(/(\d{3})(\d{7})/, "\\1/\\2")
57
- when "PE"
58
- formated_ie = ie.sub(/(\d{7})(\d{2})/, "\\1-\\2")
59
- when "PA"
60
- formated_ie = ie.sub(/(\d{2})(\d{6})(\d{1})/, "\\1-\\2-\\3")
61
- when "SC"
62
- formated_ie = ie.sub(/(\d{3})(\d{3})(\d{3})/, "\\1.\\2.\\3")
63
- end
64
-
65
- formated_ie
17
+ formatted
66
18
  end
67
19
  end
68
20
  end
@@ -0,0 +1,75 @@
1
+ module BrDanfe
2
+ class IeMasks
3
+ def apply_mask_for_sp(ie)
4
+ if ie.length == 12
5
+ ie.sub(/(\d{3})(\d{3})(\d{3})(\d{3})/, "\\1.\\2.\\3.\\4")
6
+ else
7
+ ie.sub(/(\w{1})(\d{8})(\d{1})(\d{3})/, "\\1-\\2.\\3/\\4")
8
+ end
9
+ end
10
+
11
+ def apply_mask_for_ba(ie)
12
+ if ie.length == 8
13
+ ie.sub(/(\d{6})(\d{2})/, "\\1-\\2")
14
+ else
15
+ ie.sub(/(\d{7})(\d{2})/, "\\1-\\2")
16
+ end
17
+ end
18
+
19
+ def apply_mask_for_ro(ie)
20
+ if ie.length == 9
21
+ ie.sub(/(\d{3})(\d{5})(\d{1})/, "\\1.\\2-\\3")
22
+ else
23
+ ie.sub(/(\d{13})(\d{1})/, "\\1-\\2")
24
+ end
25
+ end
26
+
27
+ def apply_mask_for_rn(ie)
28
+ if ie.length == 9
29
+ ie.sub(/(\d{2})(\d{3})(\d{3})(\d{1})/, "\\1.\\2.\\3-\\4")
30
+ else
31
+ ie.sub(/(\d{2})(\d{1})(\d{3})(\d{3})(\d{1})/, "\\1.\\2.\\3.\\4-\\5")
32
+ end
33
+ end
34
+
35
+ def apply_mask_for_ac(ie)
36
+ ie.sub(/(\d{2})(\d{3})(\d{3})(\d{3})(\d{2})/, "\\1.\\2.\\3/\\4-\\5")
37
+ end
38
+
39
+ def apply_mask_for_df(ie)
40
+ ie.sub(/(\d{11})(\d{2})/, "\\1-\\2")
41
+ end
42
+
43
+ def apply_mask_for_mg(ie)
44
+ ie.sub(/(\d{3})(\d{3})(\d{3})(\d{4})/, "\\1.\\2.\\3/\\4")
45
+ end
46
+
47
+ def apply_mask_for_mt(ie)
48
+ ie.sub(/(\d{10})(\d{1})/, "\\1-\\2")
49
+ end
50
+
51
+ def apply_mask_for_rj(ie)
52
+ ie.sub(/(\d{2})(\d{3})(\d{2})(\d{1})/, "\\1.\\2.\\3-\\4")
53
+ end
54
+
55
+ def apply_mask_for_pr(ie)
56
+ ie.sub(/(\d{8})(\d{2})/, "\\1-\\2")
57
+ end
58
+
59
+ def apply_mask_for_rs(ie)
60
+ ie.sub(/(\d{3})(\d{7})/, "\\1/\\2")
61
+ end
62
+
63
+ def apply_mask_for_pe(ie)
64
+ ie.sub(/(\d{7})(\d{2})/, "\\1-\\2")
65
+ end
66
+
67
+ def apply_mask_for_pa(ie)
68
+ ie.sub(/(\d{2})(\d{6})(\d{1})/, "\\1-\\2-\\3")
69
+ end
70
+
71
+ def apply_mask_for_sc(ie)
72
+ ie.sub(/(\d{3})(\d{3})(\d{3})/, "\\1.\\2.\\3")
73
+ end
74
+ end
75
+ end
@@ -1,53 +1,73 @@
1
1
  module BrDanfe
2
2
  class Infadic
3
- def self.render(pdf, xml, nVol)
4
- pdf.ititle 0.42, 10.00, 0.25, 25.91, "infAdic.title"
3
+ def initialize(pdf, xml)
4
+ @pdf = pdf
5
+ @xml = xml
6
+ end
7
+
8
+ def render(nVol)
9
+ @pdf.ititle 0.42, 10.00, 0.25, 25.91, "infAdic.title"
5
10
 
6
11
  if nVol > 1
7
- self.render_extra_volumes(pdf, xml)
12
+ render_extra_volumes
8
13
  else
9
- pdf.ibox 3.07, 12.93, 0.25, 26.33, I18n.t("danfe.infAdic.infCpl"), xml["infAdic/infCpl"], {size: 6, valign: :top}
14
+ @pdf.ibox 3.07, 12.93, 0.25, 26.33, I18n.t("danfe.infAdic.infCpl"), @xml["infAdic/infCpl"], { size: 6, valign: :top }
10
15
  end
11
16
 
12
- pdf.ibox 3.07, 7.62, 13.17, 26.33, I18n.t("danfe.infAdic.reserved")
17
+ @pdf.ibox 3.07, 7.62, 13.17, 26.33, I18n.t("danfe.infAdic.reserved")
13
18
  end
14
19
 
15
20
  private
16
- def self.render_extra_volumes(pdf, xml)
17
- pdf.ibox 3.07, 12.93, 0.25, 26.33, I18n.t("danfe.infAdic.infCpl"), "", {size: 8, valign: :top}
18
- pdf.ibox 3.07, 12.93, 0.25, 26.60, "", I18n.t("danfe.infAdic.vol.title"), {size: 5, valign: :top, border: 0}
21
+ def render_extra_volumes
22
+ @pdf.ibox 3.07, 12.93, 0.25, 26.33, I18n.t("danfe.infAdic.infCpl"), "", { size: 8, valign: :top }
23
+ @pdf.ibox 3.07, 12.93, 0.25, 26.60, "", I18n.t("danfe.infAdic.vol.title"), { size: 5, valign: :top, border: 0 }
19
24
 
20
25
  volumes = 0
21
26
  y = 26.67
22
- xml.collect("xmlns", "vol") do |det|
27
+ @xml.collect("xmlns", "vol") do |det|
23
28
  volumes += 1
24
29
  if volumes > 1
25
- self.render_extra_volume(pdf, det, y + 0.10)
30
+ render_extra_volume(det, y + 0.10)
26
31
  y += 0.15
27
32
  end
28
33
  end
29
34
 
30
- pdf.ibox 2.07, 12.93, 0.25, y + 0.30, "", I18n.t("danfe.infAdic.others"), { size: 6, valign: :top, border: 0 }
31
- pdf.ibox 2.07, 12.93, 0.25, y + 0.50, "", xml["infAdic/infCpl"], { size: 5, valign: :top, border: 0 }
32
- end
33
-
34
- def self.render_extra_volume(pdf, xml, y)
35
- normal = { size: 4, border: 0 }
36
- italic = normal.merge({ style: :italic })
37
- decimal = italic.merge({ decimals: 3 })
38
-
39
- pdf.ibox 0.35, 0.70, 0.25, y, "", I18n.t("danfe.infAdic.vol.qVol"), normal
40
- pdf.ibox 0.35, 0.70, 0.90, y, "", xml.css("qVol").text, italic
41
- pdf.ibox 0.35, 0.50, 1.35, y, "", I18n.t("danfe.infAdic.vol.esp"), normal
42
- pdf.ibox 0.35, 3.00, 1.75, y, "", xml.css("esp").text, italic
43
- pdf.ibox 0.35, 0.70, 4.15, y, "", I18n.t("danfe.infAdic.vol.marca"), normal
44
- pdf.ibox 0.35, 2.00, 4.75, y, "", xml.css("marca").text, italic
45
- pdf.ibox 0.35, 1.00, 6.10, y, "", I18n.t("danfe.infAdic.vol.nVol"), normal
46
- pdf.ibox 0.35, 1.00, 6.70, y, "", xml.css("nVol").text, italic
47
- pdf.ibox 0.35, 1.30, 7.00, y, "", I18n.t("danfe.infAdic.vol.pesoB"), normal
48
- pdf.inumeric 0.35, 1.30, 7.00, y, "", xml.css("pesoB").text, decimal
49
- pdf.ibox 0.35, 0.90, 8.50, y, "", I18n.t("danfe.infAdic.vol.pesoL"), normal
50
- pdf.inumeric 0.35, 1.50, 8.50, y, "", xml.css("pesoL").text, decimal
35
+ @pdf.ibox 2.07, 12.93, 0.25, y + 0.30, "", I18n.t("danfe.infAdic.others"), { size: 6, valign: :top, border: 0 }
36
+ @pdf.ibox 2.07, 12.93, 0.25, y + 0.50, "", @xml["infAdic/infCpl"], { size: 5, valign: :top, border: 0 }
37
+ end
38
+
39
+ def render_extra_volume(det, y)
40
+ render_field "qVol", det, 0.70, 0.25, 0.70, 0.90, y, :text
41
+ render_field "esp", det, 0.50, 1.35, 3.00, 1.75, y, :text
42
+ render_field "marca", det, 0.70, 4.15, 2.00, 4.75, y, :text
43
+ render_field "nVol", det, 1.00, 6.10, 1.00, 6.70, y, :text
44
+ render_field "pesoB", det, 1.30, 7.00, 1.30, 7.00, y, :numeric
45
+ render_field "pesoL", det, 0.90, 8.50, 1.50, 8.50, y, :numeric
46
+ end
47
+
48
+ def render_field(field, det, w1, x1, w2, x2, y, kind)
49
+ label = I18n.t("danfe.infAdic.vol.#{field}")
50
+ value = det.css(field).text
51
+
52
+ @pdf.ibox 0.35, w1, x1, y, "", label, style_normal
53
+
54
+ if kind == :numeric
55
+ @pdf.inumeric 0.35, w2, x2, y, "", value, style_decimal
56
+ else
57
+ @pdf.ibox 0.35, w2, x2, y, "", value, style_italic
58
+ end
59
+ end
60
+
61
+ def style_normal
62
+ { size: 4, border: 0 }
63
+ end
64
+
65
+ def style_italic
66
+ style_normal.merge({ style: :italic })
67
+ end
68
+
69
+ def style_decimal
70
+ style_italic.merge({ decimals: 3 })
51
71
  end
52
72
  end
53
73
  end
@@ -1,3 +1,3 @@
1
1
  module BrDanfe
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -1,23 +1,29 @@
1
1
  module BrDanfe
2
2
  class Vol
3
- def self.render(pdf, xml)
3
+ def initialize(pdf, xml)
4
+ @pdf = pdf
5
+ @xml = xml
6
+ end
7
+
8
+ def render
4
9
  nVol = 0
5
10
 
6
- xml.collect("xmlns", "vol") do |det|
11
+ @xml.collect("xmlns", "vol") do |det|
7
12
  nVol += 1
8
- if nVol < 2
9
- pdf.ibox 0.85, 2.92, 0.25, 16.60, I18n.t("danfe.vol.qVol"), det.css("qVol").text
10
- pdf.ibox 0.85, 3.05, 3.17, 16.60, I18n.t("danfe.vol.esp"), det.css("esp").text
11
- pdf.ibox 0.85, 3.05, 6.22, 16.60, I18n.t("danfe.vol.marca"), det.css("marca").text
12
- pdf.ibox 0.85, 4.83, 9.27, 16.60, I18n.t("danfe.vol.nVol")
13
- pdf.inumeric 0.85, 3.43, 14.10, 16.60, "vol.pesoB", det.css("pesoB").text, {decimals: 3}
14
- pdf.inumeric 0.85, 3.30, 17.53, 16.60, "vol.pesoL", det.css("pesoL").text, {decimals: 3}
15
- else
16
- break
17
- end
13
+ render_vol(det) if nVol < 2
18
14
  end
19
15
 
20
16
  nVol
21
17
  end
18
+
19
+ private
20
+ def render_vol(det)
21
+ @pdf.ibox 0.85, 2.92, 0.25, 16.60, I18n.t("danfe.vol.qVol"), det.css("qVol").text
22
+ @pdf.ibox 0.85, 3.05, 3.17, 16.60, I18n.t("danfe.vol.esp"), det.css("esp").text
23
+ @pdf.ibox 0.85, 3.05, 6.22, 16.60, I18n.t("danfe.vol.marca"), det.css("marca").text
24
+ @pdf.ibox 0.85, 4.83, 9.27, 16.60, I18n.t("danfe.vol.nVol")
25
+ @pdf.inumeric 0.85, 3.43, 14.10, 16.60, "vol.pesoB", det.css("pesoB").text, { decimals: 3 }
26
+ @pdf.inumeric 0.85, 3.30, 17.53, 16.60, "vol.pesoL", det.css("pesoL").text, { decimals: 3 }
27
+ end
22
28
  end
23
29
  end