def addNota(self,ide=-1): #Esta funcion es llamada para agregar una nota con su numero de id if ide==-1: ide=str(self.leNumero.text()) self.leNumero.clear() if len(ide)>0: try: a=self.tmp['notas'].index(ide) except: Res=NotaViewer(self.parent,ide) nota=Res.getDatos() app=self.verDetalle(ide) if app!=0: if nota!=False: self.tmp['notas'].append(ide) self.tmp['clientes'].append(nota['cliente']) self.tmp['total']+=float(nota['total']) self.nctotal.setText("Total: %s"%self.tmp['total']) self.ncnotas.setText("Nota(s): %s "%','.join(self.tmp['notas'])) self.leNumero.setFocus(True) else: self.ncrecibo.setFocus(True)
def verDetalle(self,ide=-1): if ide==-1: ide=str(self.twNotas.item(self.twNotas.currentRow(),0).text()) Res=NotaViewer(self.parent,ide) Res.show()