예제 #1
0
class Pedidos(models.Model):
    fecha = models.DateTimeField(auto_now_add=True)
    modo_pago = models.CharField(max_length=50)
    para_llevar = models.CharField(max_length=50)
    num_avisador = models.CharField(max_length=50)
    direccion = models.CharField(max_length=150,
                                 default="No hay direccion",
                                 null=True)
    total = models.DecimalField(max_digits=20,
                                decimal_places=2,
                                null=True,
                                default=0.0)
    estado = models.CharField(max_length=10, default="PG_NO")
    entrega = models.DecimalField(max_digits=20,
                                  decimal_places=2,
                                  null=True,
                                  default=0.0)
    cambio = models.DecimalField(max_digits=20,
                                 decimal_places=2,
                                 null=True,
                                 default=0.0)
    modify = models.DateTimeField(auto_now=True)
    servido = models.BooleanField(default=False)

    def __unicode__(self):
        return u"{0} - {1} - {2}".format(self.id, self.estado, self.total)

    class Meta:
        verbose_name = "Pedido"
예제 #2
0
파일: pedidos.py 프로젝트: vallemrv/tpvB3
class LineasPedido(models.Model):
    text = models.CharField(max_length=50)
    des = models.TextField(null=True)
    cant = models.IntegerField()
    precio = models.DecimalField(max_digits=20, decimal_places=2)
    total = models.DecimalField(max_digits=20, decimal_places=2)
    tipo = models.CharField(max_length=50)
    pedidos = models.ForeignKey(Pedidos, on_delete=models.CASCADE)
    modify = models.DateTimeField(auto_now=True)
예제 #3
0
파일: pedidos.py 프로젝트: vallemrv/tpvB3
class Pedidos(models.Model):
    fecha = models.DateTimeField(auto_now_add=True)
    modo_pago = models.CharField(max_length=50)
    para_llevar = models.CharField(max_length=50)
    num_avisador = models.CharField(max_length=50)
    total = models.DecimalField(max_digits=20, decimal_places=2)
    estado = models.CharField(max_length=10, default="PG_NO")
    entrega = models.DecimalField(max_digits=20, decimal_places=2)
    cambio = models.DecimalField(max_digits=20, decimal_places=2)
    modify = models.DateTimeField(auto_now=True)
예제 #4
0
class TestFields(models.Model):
    char = models.CharField(max_length=100)
    text = models.TextField()
    date = models.DateField(auto_now_add=True)
    date_time = models.DateTimeField(auto_now=True)
    boolean = models.BooleanField()
    integer = models.IntegerField()
    decimal = models.DecimalField(5, 2)
예제 #5
0
class LineasPedido(models.Model):
    text = models.CharField(max_length=50)
    des = models.TextField(null=True)
    cant = models.IntegerField()
    precio = models.DecimalField(max_digits=20,
                                 decimal_places=2,
                                 null=True,
                                 default=0.0)
    total = models.DecimalField(max_digits=20,
                                decimal_places=2,
                                null=True,
                                default=0.0)
    tipo = models.CharField(max_length=50)
    pedidos = models.ForeignKey(Pedidos, on_delete=models.CASCADE)
    modify = models.DateTimeField(auto_now=True)
    servido = models.BooleanField(default=False)
    imprimible = models.BooleanField(default=False)

    def __unicode__(self):
        return u"{0} - {1} - {2} - {3}".format(self.cant, self.text,
                                               self.precio, self.total)
예제 #6
0
파일: arqueos.py 프로젝트: vallemrv/tpvB3
class Arqueos(models.Model):
    fecha = models.DateTimeField(auto_now_add=True)
    caja_dia = models.DecimalField(max_digits=20, decimal_places=2)
    efectivo = models.DecimalField(max_digits=20, decimal_places=2)
    cambio = models.DecimalField(max_digits=20, decimal_places=2)
    total_gastos = models.DecimalField(max_digits=20, decimal_places=2)
    tarjeta = models.DecimalField(max_digits=20, decimal_places=2)
    descuadre = models.DecimalField(max_digits=20, decimal_places=2)
    pedidos = models.ManyToManyField("Pedidos")
    pedidosextra = models.ManyToManyField(PedidosExtra)
    gastos = models.ManyToManyField(Gastos)
    conteo = models.ManyToManyField(Conteo)
    modify = models.DateTimeField(auto_now=True)
예제 #7
0
파일: arqueos.py 프로젝트: vallemrv/tpvB3
class PedidosExtra(models.Model):
    importe = models.DecimalField(max_digits=20, decimal_places=2)
    numero_pedido =  models.IntegerField()
    modo_pago =  models.CharField(max_length=50, null=True, blank=True, default="Efectivo")
    modify = models.DateTimeField(auto_now=True)
    estado =  models.CharField(max_length=50, null=True, blank=True, default="no_arqueado")
예제 #8
0
파일: arqueos.py 프로젝트: vallemrv/tpvB3
class Conteo(models.Model):
    can = models.IntegerField()
    tipo =  models.DecimalField(max_digits=20, decimal_places=2)
    total =  models.DecimalField(max_digits=20, decimal_places=2)
    texto_tipo = models.CharField(max_length=100, null=True, blank=True)
    modify = models.DateTimeField(auto_now=True)
예제 #9
0
파일: arqueos.py 프로젝트: vallemrv/tpvB3
class Gastos(models.Model):
    des = models.CharField(max_length=100)
    gasto = models.DecimalField(max_digits=20, decimal_places=2)
    modify = models.DateTimeField(auto_now=True)