def OnPrint( self, evt ): this_time = datetime.datetime.now().strftime("%d/%m/%y") nombre = "ventas"+this_time+".pdf " #import pdb;pdb.set_trace() if self.desde == None or self.hasta == None: wx.MessageBox('Primero debe seleccionar un rango para el reporte', 'Error al generar el reporte', wx.OK | wx.ICON_ERROR) else: dlg = wx.FileDialog( self, message="Choose a file", defaultFile=nombre, wildcard="*.pdf", style=wx.OPEN | wx.MULTIPLE | wx.CHANGE_DIR ) if dlg.ShowModal() == wx.ID_OK: paths = dlg.GetPaths() path = None for path in paths: path = path dlg.Destroy() RPTR = Reporter( path, (self.desde, self.hasta), "ganancia" ) RPTR.doReport()
def onPrint( self, evt ): dlg = wx.FileDialog( self, message="Choose a file", defaultFile="reporte-tifosi.pdf", wildcard="*.pdf", style=wx.OPEN | wx.MULTIPLE | wx.CHANGE_DIR ) if dlg.ShowModal() == wx.ID_OK: paths = dlg.GetPaths() path = None for path in paths: path = path dlg.Destroy() RPTR = Reporter( path, self.DBM.getProductos(), "stock" ) RPTR.doReport()