Example #1
0
 def altarep(self, widget):
     self.reparaciones = []
     self.matrir = self.entmatri.get_text()
     var = self.matrir
     self.fecha = self.entfecha.get_text()
     self.concepto = self.entconcepto.get_text()
     self.unidades = self.entunidades.get_text()
     self.preciou = self.entpreciou.get_text()
     self.total = float(self.unidades) * float(self.preciou)
     if self.chkrevision.get_active():
         self.reparaciones.append(self.revision)    
     if self.chkmotor.get_active():
         self.reparaciones.append(self.motor)
     if self.chkchapa.get_active():
         self.reparaciones.append(self.chapa)
             
     var_repar = ' - '.join(self.reparaciones)
     filar = (self.matrir, self.fecha, self.concepto, self.unidades, self.preciou, self.total, var_repar)
     
     if self.matrir != "" or self.fecha != "":
         conexion.insertarr(filar)
         self.listrepara.clear()
         self.listarreparaciones(var)
         moduloscli.limpiarr(self.entconcepto, self.entunidades, self.entpreciou)
     else:
         print "algun error"
Example #2
0
    def modifr(self, widget):
        self.reparaciones = []
        self.rcodigo = self.lblid.get_text()
        self.matrir = self.entmatri.get_text()
        var = self.matrir
        self.fecha = self.entfecha.get_text()
        self.concepto = self.entconcepto.get_text()
        self.unidades = self.entunidades.get_text()
        self.preciou = self.entpreciou.get_text()
        if self.chkrevision.get_active():
            self.reparaciones.append(self.revision)
        if self.chkmotor.get_active():
            self.reparaciones.append(self.motor)
        if self.chkchapa.get_active():
            self.reparaciones.append(self.chapa)

        if self.matrir != "" or self.fecha != "":
            var_repar = ' - '.join(self.reparaciones)
            conexion.modificar(self.rcodigo, self.fecha, self.concepto,
                               self.unidades, self.preciou, var_repar)
            self.listrepara.clear()
            self.listarreparaciones(var)
            moduloscli.limpiarr(self.entconcepto, self.entunidades,
                                self.entpreciou)
        else:
            print "algun error"
Example #3
0
 def verfactura(self, widget):
     total = 0.0
     iva = 0.0
     TOT = 0.0
     fmatri = self.entmatri.get_text()
     fdata = self.entfecha.get_text()
     if fmatri != "" or fdata != "":
         listaf = conexion.listarf(fmatri, fdata)
         self.listrepara.clear()
         for registrof in listaf:
             total = total + registrof[6]
             self.listrepara.append(registrof)
         iva = float(total) * 0.21
         TOT = float(iva) + float(total)    
         self.lbltotal.set_text(str(total))
         self.lbliva.set_text(str(iva))
         self.lblTOT.set_text(str(TOT))
     else:
         print "matricula y fecha son obligatorios"
     moduloscli.limpiarr(self.entconcepto, self.entunidades, self.entpreciou)