def _setup(self): self._header_font = xlwt.Font() self._header_font.bold = True self._header_style = xlwt.XFStyle() self._header_style.font = self._header_font self._style_date = xlwt.XFStyle() self._style_date.num_format_str = get_date_format() self._style_general = xlwt.XFStyle() self._style_general.num_format_str = 'general' self._style_number = xlwt.XFStyle() self._style_number.num_format_str = get_number_format()
) from stoqlib.lib.message import warning from stoqlib.lib.translation import stoqlib_gettext as _ HEADER_TOP_STYLE = xlwt.easyxf( STYLE_WHITE + get_style_color("gray80") + "borders: left thick, right thick, bottom thick;" + "alignment: horizontal right;" ) HEADER_LEFT_STYLE = xlwt.easyxf( STYLE_WHITE + get_style_color("gray80") + "borders: right thick, top thick, bottom thick;" ) AVERAGE_STYLE = xlwt.easyxf( STYLE_BOLD + STYLE_THICK_BORDERS + get_style_color("light_turquoise"), num_format_str=get_number_format() ) SUM_STYLE = xlwt.easyxf( STYLE_BOLD + STYLE_THICK_BORDERS + get_style_color("pale_blue"), num_format_str=get_number_format() ) NUMBER_STYLE = xlwt.easyxf(STYLE_THICK_BORDERS, num_format_str=get_number_format()) class FinancialIntervalReport(object): def __init__(self, store, year): self.exporter = None self.store = store self.year = year def _prepare_items(self, items, account, start, end): total = account.get_total_for_interval(start, end)
write_app_hyperlink, write_app_logo) from stoqlib.lib.message import warning from stoqlib.lib.translation import stoqlib_gettext as _ HEADER_TOP_STYLE = xlwt.easyxf( STYLE_WHITE + get_style_color("gray80") + "borders: left thick, right thick, bottom thick;" + "alignment: horizontal right;") HEADER_LEFT_STYLE = xlwt.easyxf( STYLE_WHITE + get_style_color("gray80") + "borders: right thick, top thick, bottom thick;") AVERAGE_STYLE = xlwt.easyxf( STYLE_BOLD + STYLE_THICK_BORDERS + get_style_color("light_turquoise"), num_format_str=get_number_format()) SUM_STYLE = xlwt.easyxf( STYLE_BOLD + STYLE_THICK_BORDERS + get_style_color("pale_blue"), num_format_str=get_number_format()) NUMBER_STYLE = xlwt.easyxf( STYLE_THICK_BORDERS, num_format_str=get_number_format()) class FinancialIntervalReport(object): def __init__(self, store, year): self.exporter = None self.store = store self.year = year def _prepare_items(self, items, account, start, end):