示例#1
0
 def export_xls(self):
     # TODO A
     # from Common.exports_xlsx import export_dynamic_data
     from Common.exports_xls import export_dynamic_data
     from Common.cel import cel
     table = self.table_show
     hheaders = table.hheaders[:-1]
     endrowx = len(hheaders) - 1
     dict_data = {
         'file_name': "facture.xls",
         'headers': hheaders,
         'data': table.get_table_items(),
         "extend_rows": [(3, table.montant_ht)],
         'sheet': self.title,
         'title': self.title,
         'widths': table.stretch_columns,
         "date": self.invoice.date.strftime(u'%x'),
         "others": [
             (4, 4, 0, 2, "Doit: {}".format(self.invoice.client)),
             (45, 45, 0, endrowx,
              "Arrêté la présente facture à la somme de : {} FCFA".format(cel(table.montant_ht))),
             (50, 50, 0, 0, "Pour acquit"),
             (50, 50, endrowx, endrowx, "Le fournisseur")],
         'exclude_row': len(table.data) - 2,
     }
     export_dynamic_data(dict_data)
示例#2
0
 def export_xls(self):
     dict_data = {
         'file_name': "inventaire.xls",
         'headers': self.invent_table.hheaders,
         'data': self.invent_table.data,
         'sheet': self.title,
         'widths': self.invent_table.stretch_columns,
         "date": "Du " + self.on_date.text() + " au " + self.end_date.text()
     }
     export_dynamic_data(dict_data)
示例#3
0
文件: apricot.py 项目: Ciwara/GCiss
 def export_xls(self):
     from Common.exports_xls import export_dynamic_data
     dict_data = {
         'file_name': "arivage.xls",
         'headers': self.table_op.hheaders,
         'data': self.table_op.data,
         "extend_rows": [(3, self.table_op.amount_ht), ],
         'sheet': self.title,
         'title': self.title,
         'widths': self.table_op.stretch_columns,
         "date": self.date_.text()
     }
     export_dynamic_data(dict_data)
示例#4
0
文件: buy_show.py 项目: Ciwara/GCiss
    def export_xls(self):
        from Common.exports_xls import export_dynamic_data

        table = self.table_show
        hheaders = table.hheaders[:-1]
        dict_data = {
            "file_name": "arivage.xls",
            "headers": hheaders,
            "data": self.table_show.data,
            "extend_rows": [(4, self.table_show.v_amount_tt), (5, ""), (6, self.table_show.b_f_tt)],
            "sheet": self.title,
            "title": self.title,
            "widths": self.table_show.stretch_columns,
            "date": self.buy.date.strftime("%x"),
            "exclude_row": len(table.data) - 2,
        }
        export_dynamic_data(dict_data)
示例#5
0
文件: inventory.py 项目: Ciwara/GCiss
 def export_xls(self):
     from Common.exports_xls import export_dynamic_data
     table = self.invent_table
     hheaders = table.hheaders
     dict_data = {
         'file_name': "Inventaire.xls",
         'headers': hheaders,
         'data': table.data,
         "extend_rows": [(3, table.sum_totals), ],
         'sheet': self.title,
         'title': self.title,
         'widths': table.stretch_columns,
         "date": "Du {} au {}".format(
             date_to_datetime(self.on_date.text()).strftime(u'%d/%m/%Y'),
             date_to_datetime(self.end_date.text()).strftime(u'%d/%m/%Y'))
     }
     export_dynamic_data(dict_data)
示例#6
0
文件: stats.py 项目: Ciwara/GCiss
 def export_xls(self):
     dict_data = {
         'file_name': "semaine.xls",
         'headers': self.table_rpt.hheaders,
         'data': self.table_rpt.data,
         "extend_rows": [(1, self.table_rpt.total_sum_d1),
                         (2, self.table_rpt.total_sum_d2),
                         (3, self.table_rpt.total_sum_d3),
                         (4, self.table_rpt.total_sum_d4),
                         (5, self.table_rpt.total_sum_d5),
                         (6, self.table_rpt.total_sum_d6),
                         (7, self.table_rpt.totals), ],
         'sheet': self.title,
         'title': self.title,
         'widths': self.table_rpt.stretch_columns,
         "date": self.table_rpt.date_on.strftime(u"%x") + " au " + self.table_rpt.date_end.strftime(u"%x")
     }
     export_dynamic_data(dict_data)