def build_info_box
      issue_date_present = !@document.issue_date.empty?

      if issue_date_present
        @pdf.text_box(
          @labels[:issue_date],
          size: 11,
          at: [x(284), y(498) - @push_down],
          width: x(240)
        )
        @pdf.text_box(
          @document.issue_date,
          size: 13,
          at: [x(384), y(498) - @push_down],
          width: x(146),
          align: :right
        )
      end

      if used? @labels[:sublabels][:issue_date]
        position = issue_date_present ? 483 : 498

        @pdf.text_box(
          @labels[:sublabels][:issue_date],
          size: 10,
          at: [x(284), y(position) - @push_down],
          width: x(240)
        )
      end

      due_date_present = !@document.due_date.empty?

      if due_date_present
        position = issue_date_present ? 478 : 493
        position -= 10 if used? @labels[:sublabels][:issue_date]

        @pdf.text_box(
          @labels[:due_date],
          size: 11,
          at: [x(284), y(position) - @push_down],
          width: x(240)
        )
        @pdf.text_box(
          @document.due_date,
          size: 13,
          at: [x(384), y(position) - @push_down],
          width: x(146),
          align: :right
        )
      end

      if used? @labels[:sublabels][:due_date]
        position = issue_date_present ? 463 : 478
        position -= 10 if used? @labels[:sublabels][:issue_date]

        @pdf.text_box(
          @labels[:sublabels][:due_date],
          size: 10,
          at: [x(284), y(position) - @push_down],
          width: x(240)
        )
      end

      if issue_date_present || due_date_present
        height = (issue_date_present && due_date_present) ? 75 : 60
        height = @payment_box_height if @payment_box_height > height

        @pdf.stroke_rounded_rectangle([x(274), y(508) - @push_down], x(266), height, 6)
      end
    end
def build_info_box
      issue_date_present = !@document.issue_date.empty?

      if issue_date_present
        @pdf.text_box(
          @labels[:issue_date],
          size: 11,
          at: [x(284), y(498) - @push_down],
          width: x(240)
        )
        @pdf.text_box(
          @document.issue_date,
          size: 13,
          at: [x(384), y(498) - @push_down],
          width: x(146),
          align: :right
        )
      end

      if used? @labels[:sublabels][:issue_date]
        position = issue_date_present ? 483 : 498

        @pdf.text_box(
          @labels[:sublabels][:issue_date],
          size: 10,
          at: [x(284), y(position) - @push_down],
          width: x(240)
        )
      end

      due_date_present = !@document.due_date.empty?

      if due_date_present
        position = issue_date_present ? 478 : 493
        position -= 10 if used? @labels[:sublabels][:issue_date]

        @pdf.text_box(
          @labels[:due_date],
          size: 11,
          at: [x(284), y(position) - @push_down],
          width: x(240)
        )
        @pdf.text_box(
          @document.due_date,
          size: 13,
          at: [x(384), y(position) - @push_down],
          width: x(146),
          align: :right
        )
      end

      if used? @labels[:sublabels][:due_date]
        position = issue_date_present ? 463 : 478
        position -= 10 if used? @labels[:sublabels][:issue_date]

        @pdf.text_box(
          @labels[:sublabels][:due_date],
          size: 10,
          at: [x(284), y(position) - @push_down],
          width: x(240)
        )
      end

      if issue_date_present || due_date_present
        height = (issue_date_present && due_date_present) ? 75 : 60
        height = @payment_box_height if @payment_box_height > height

        @pdf.stroke_rounded_rectangle([x(274), y(508) - @push_down], x(266), height, 6)
      end
    end
Build the following info box:

    --------------------------------
   | Issue date:          03/03/2016|
   | Issue date sublabel            |
   | Due date:            03/03/2016|
   | Due date sublabel              |
    --------------------------------