'Draws the main table containing the data items.'

def draw_course_info(self, y_pos):

    course_items_data = [['', _('Description'), _('Quantity'), _('List    Price\nper    item'), _('Discount\nper    item'), _('Amount'), '']]
    for row_item in self.items_data:
        course_items_data.append(['', Paragraph(row_item['item_description'], getSampleStyleSheet()['Normal']), row_item['quantity'], '{currency}{list_price:.2f}'.format(list_price=row_item['list_price'], currency=self.currency), '{currency}{discount:.2f}'.format(discount=row_item['discount'], currency=self.currency), '{currency}{item_total:.2f}'.format(item_total=row_item['item_total'], currency=self.currency), ''])
    padding_width = (7 * mm)
    desc_col_width = (60 * mm)
    qty_col_width = (26 * mm)
    list_price_col_width = (21 * mm)
    discount_col_width = (21 * mm)
    amount_col_width = (40 * mm)
    course_items_table = Table(course_items_data, [padding_width, desc_col_width, qty_col_width, list_price_col_width, discount_col_width, amount_col_width, padding_width], splitByRow=1, repeatRows=1)
    course_items_table.setStyle(TableStyle([('ALIGN', (3, 1), (5, (-1)), 'RIGHT'), ('ALIGN', (5, 0), (5, 0), 'RIGHT'), ('RIGHTPADDING', (5, 0), (5, (-1)), (7 * mm)), ('ALIGN', (2, 0), (4, 0), 'CENTER'), ('ALIGN', (1, 0), (1, (-1)), 'LEFT'), ('ALIGN', (2, 1), (2, (-1)), 'CENTER'), ('LINEBELOW', (0, 0), ((-1), 0), 1.0, '#cccccc'), ('LINEBELOW', (0, (-1)), ((-1), (-1)), 1.0, '#cccccc'), ('INNERGRID', (1, 1), ((-2), (-1)), 0.5, '#cccccc'), ('VALIGN', (0, 0), ((-1), (-1)), 'MIDDLE'), ('TOPPADDING', (0, 0), ((-1), (-1)), (2 * mm)), ('BOTTOMPADDING', (0, 0), ((-1), (-1)), (2 * mm)), ('TEXTCOLOR', (0, 0), ((-1), (-1)), colors.black)]))
    (rendered_width, rendered_height) = course_items_table.wrap(0, 0)
    table_left_padding = ((self.page_width - rendered_width) / 2)
    split_tables = course_items_table.split(0, self.first_page_available_height)
    if (len(split_tables) > 1):
        split_table = split_tables[0]
        (__, rendered_height) = split_table.wrap(0, 0)
        split_table.drawOn(self.pdf, table_left_padding, (y_pos - rendered_height))
        self.prepare_new_page()
        split_tables = split_tables[1].split(0, self.second_page_available_height)
        while (len(split_tables) > 1):
            split_table = split_tables[0]
            (__, rendered_height) = split_table.wrap(0, 0)
            split_table.drawOn(self.pdf, table_left_padding, (self.second_page_start_y_pos - rendered_height))
            self.prepare_new_page()
            split_tables = split_tables[1].split(0, self.second_page_available_height)
        split_table = split_tables[0]
        (__, rendered_height) = split_table.wrap(0, 0)
        split_table.drawOn(self.pdf, table_left_padding, (self.second_page_start_y_pos - rendered_height))
    else:
        course_items_table.drawOn(self.pdf, table_left_padding, (y_pos - rendered_height))
    if (not self.is_on_first_page()):
        y_pos = self.second_page_start_y_pos
    return ((y_pos - rendered_height) - self.min_clearance)
