lib/br_danfe/issqn.rb in br_danfe-0.0.4 vs lib/br_danfe/issqn.rb in br_danfe-0.0.5
- old
+ new
@@ -1,12 +1,22 @@
module BrDanfe
class Issqn
- def self.render(pdf, xml)
- pdf.ititle 0.42, 10.00, 0.25, 24.64, "issqn.title"
+ Y = 24.60 + SPACE_BETWEEN_GROUPS
- pdf.lbox 0.85, 5.08, 0.25, 25.06, xml, "emit/IM"
- pdf.lbox 0.85, 5.08, 5.33, 25.06, xml, "total/vServ"
- pdf.lbox 0.85, 5.08, 10.41, 25.06, xml, "total/vBCISS"
- pdf.lbox 0.85, 5.28, 15.49, 25.06, xml, "total/ISSTot"
+ def initialize(pdf, xml)
+ @pdf = pdf
+ @xml = xml
+
+ @ltitle = Y - 0.42
+ @l1 = Y
+ end
+
+ def render
+ @pdf.ititle 0.42, 10.00, 0.25, @ltitle, "issqn.title"
+
+ @pdf.lbox LINE_HEIGHT, 5.14, 0.25, @l1, @xml, "emit/IM"
+ @pdf.lbox LINE_HEIGHT, 5.14, 5.39, @l1, @xml, "total/vServ"
+ @pdf.lbox LINE_HEIGHT, 5.14, 10.53, @l1, @xml, "total/vBCISS"
+ @pdf.lbox LINE_HEIGHT, 5.14, 15.67, @l1, @xml, "total/ISSTot"
end
end
end