Skip to content

Commit e09486e

Browse files
committed
Subo algunos cambios en el modulo ventas
1 parent f64c314 commit e09486e

File tree

10 files changed

+82
-85
lines changed

10 files changed

+82
-85
lines changed

controllers/ventas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def abm_clientes():
1212
def abm_ventas():
1313
#return dict(message="abm_ventas")
1414
# definir los campos a obtener desde la base de datos:
15-
campos = db.cliente.id_cliente, db.cliente.nombre_de_fantasia, db.cliente.razon_social
15+
campos = db.cliente.id_cliente, db.cliente.nombre_de_fantasia, db.cliente.razon_social, #db.ventas.numero_factura
1616
# definir la condición que deben cumplir los registros:
1717
criterio = db.cliente.id_cliente>0
1818
##criterio &= db.cliente.condicion_frente_al_iva=="Responsable Inscripto"

models/db_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
db.cliente.condicion_frente_al_iva.requires=IS_IN_SET(["Responsable Inscripto","Consumidor Final"])
3636
db.cliente.cuit.requires=IS_NOT_IN_DB(db, "cliente.cuit")
3737
db.cliente.dni.requires=IS_NOT_IN_DB(db, "cliente.dni")
38-
#db.cliente.condicion_frente_al_iva.requires=IS_NOT_EMPTY(error_message='Selecione un campo')
38+
#db.cliente.condicion_frente_al_iva.requires=IS_NOT_EMPTY()
3939
db.cliente.telefono.requires=IS_NOT_EMPTY(error_message='Ingresar el numero Telefonico')
4040
db.cliente.direccion.requires=IS_NOT_EMPTY(error_message='Ingresar la Direccion')
4141
db.cliente.numero.requires=IS_NOT_EMPTY(error_message='Ingresar el Numero')

static/images/background.jpg

-543 KB
Loading

views/default/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{extend 'layout.html'}}
33

44
{{block header}}
5-
<header class="container-fluid background">
5+
<header class="container-fluid background">
66
<div class="jumbotron text-center">
77
{{if response.title:}}
88
<h1>{{=response.title}}

views/ventas/confirmar.html

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
{{extend 'layout.html'}}
22
<h1 align="center">CONFIRMAR</h1>
33
<h4 align="center"> Confirmar venta para {{=reg_cliente.razon_social}}, N° Comprobante {{=nro_cbte}}, Por el importe de $ {{=total}}</h4>
4-
<div class="form-group">
5-
<div class="col-sm-5"></div>
6-
<div class="col-sm-1">
7-
<a href="{{=URL(c="ventas",f="guardado")}}" class="btn btn-default" role="button">ACEPTAR</a>
8-
<a href="{{=URL(c="ventas",f="detalle_ventas")}}" class="btn btn-default" role="button">Volver</a>
9-
</div>
10-
</div>
4+
<form class="form-horizontal" action="{{=URL(c="ventas", f="guardado")}}" enctype="multipart/form-data" method="POST">
5+
<div class="form-group">
6+
<div align="center">
7+
<button type="submit" class="btn btn-default">ACEPTAR</button>
8+
</div>
9+
</div>
10+
</form>
11+
<form class="form-horizontal" action="{{=URL(c="ventas", f="detalle_ventas")}}" enctype="multipart/form-data" method="POST">
12+
<div class="form-group">
13+
<div align="center">
14+
<button type="submit" class="btn btn-default">VOLVER</button>
15+
</div>
16+
</div>
17+
</form>

views/ventas/detalle_ventas.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ <h4><caption>Nro. Comprobante: {{=nro_cbte}}, Fecha: {{=fecha}},
5555
<td align="center">{{=item["precio_venta"] * item["cantidad"] *item["alicuota_iva"]/100.00}}</td>
5656
<td align="center">{{=item["precio_venta"] * item["cantidad"] + item["precio_venta"] * item["cantidad"] *item["alicuota_iva"]/100.00}}</td>
5757
{{subtotal = subtotal + (item["precio_venta"] * item["cantidad"] + item["precio_venta"] * item["cantidad"] *item["alicuota_iva"]/100.00) }}
58-
<td><a class="btn btn-default" role="button" href="{{=URL(c="ventas",f="borrar_item",vars={"id":1})}}">Eliminar</a><a class="btn btn-default" role="button" href="{{=URL(c="ventas",f="detalle_ventas",vars={"id":1})}}">Modificar</a></td>
59-
</td>
58+
<td><form name="limpiar" method="post" action="#">
59+
<input type="text" name="campo" size="40" maxlength="40" Value="Pulsa para limpiar" onclick="this.value=''";>
60+
</form></td>
6061
</tr>
6162
{{pass}}
6263
</tbody>

views/ventas/guardado.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
<h1 align="center">FINALIZADO</h1>
33
<h4 align="center"> Comprobante guardado con exito</h4>
44
<div class="form-group">
5-
<div class="col-sm-6"></div>
6-
<div class="col-sm-1">
5+
<div align="center">
76
<a href="{{=URL(c="ventas",f="vista_previa", args=[id_venta])}}" class="btn btn-default" role="button">Vista Previa</a>
87
</div>
9-
<div class="col-sm-5"></div>
108
</div>

views/ventas/lista_ventas.html

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,39 @@
22
<h1>LISTADO DE VENTAS POR CLIENTE</h1>
33
<form class="form-horizontal">
44
<div class="form-group">
5-
<div class="col-md-8">
5+
<div class="col-md-12">
66
<table class="table table-hover">
77
<caption>{{=titulo}}</caption>
88
<thead>
99
<tr>
1010
<th>Fecha</th>
1111
<th class="">Cliente</th>
1212
<th>Numero de Comprobante</th>
13-
<th>Importe</th>
13+
<th>Tipo de Comprobante</th>
14+
<th>IVA</th>
15+
<th>Importe Total</th>
1416
<th>Tipo de Pago</th>
1517
</tr>
1618
</thead>
1719
<tbody>
1820
<tr>
19-
<th scope="row">01/08/2016</th>
20-
<td>Zia</td>
21-
<td>0001</td>
22-
<td>1600</td>
23-
<td>Credito</td>
24-
<td><a class="btn btn-default" role="button" href="{{=URL(c="ventas",f="vista_previa",vars={"id":1})}}">Vista Del Comprobante</a>
25-
</tr>
26-
<tr>
27-
<th>03/08/2016</th>
28-
<td>Leyendo Vinos</td>
29-
<td>0002</td>
30-
<td>1000</td>
31-
<td>Credito</td>
21+
<th scope="row">01/10/2016</th>
22+
<td>Jorge Benitez</td>
23+
<td>000000001</td>
24+
<td>B</td>
25+
<td>$36.75</td>
26+
<td>$386.75</td>
27+
<td>Efectivo</td>
28+
3229
<td><a class="btn btn-default" role="button" href="{{=URL(c="ventas",f="vista_previa",vars={"id":1})}}">Vista Del Comprobante</a>
3330
</tr>
3431
<tr>
35-
<th scope="row">05/08/2016</th>
36-
<td>Zia</td>
37-
<td>0003</td>
38-
<td>1200</td>
32+
<th>30/10/2016</th>
33+
<td>ZIA </td>
34+
<td>000000001</td>
35+
<td>A</td>
36+
<td>$189</td>
37+
<td>$1790.1</td>
3938
<td>Credito</td>
4039
<td><a class="btn btn-default" role="button" href="{{=URL(c="ventas",f="vista_previa",vars={"id":1})}}">Vista Del Comprobante</a>
4140
</tr>
@@ -48,10 +47,10 @@ <h1>LISTADO DE VENTAS POR CLIENTE</h1>
4847
<table class="table table-bordered">
4948
<tbody>
5049
<tr> <th scope="row">Cantidad de Ventas</th>
51-
<td>3</td>
50+
<td>2</td>
5251
</tr>
5352
<tr> <th scope="row">Valor total del Periodo</th>
54-
<td>3800</td>
53+
<td>2176.85</td>
5554
</tr>
5655
</tbody>
5756
</table>

views/ventas/lista_ventas_por_cliente.html

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,32 @@
22
<h1>LISTADO DE VENTAS POR CLIENTE</h1>
33
<form class="form-horizontal">
44
<div class="form-group">
5-
<div class="col-md-8">
5+
<div class="col-md-12">
66
<table class="table table-hover">
77
<caption>{{=titulo}}</caption>
88
<thead>
99
<tr>
1010
<th>Fecha</th>
1111
<th class="">Cliente</th>
1212
<th>Numero de Comprobante</th>
13-
<th>Importe</th>
13+
<th>Tipo de Comprobante</th>
14+
<th>IVA</th>
15+
<th>Importe Total</th>
1416
<th>Tipo de Pago</th>
1517
</tr>
1618
</thead>
1719
<tbody>
1820
<tr>
19-
<th scope="row">01/08/2016</th>
20-
<td>Zia</td>
21-
<td>0001</td>
22-
<td>1600</td>
23-
<td>Credito</td>
24-
<td><a class="btn btn-default" role="button" href="{{=URL(c="ventas",f="vista_previa",vars={"id":1})}}">Vista Del Comprobante</a>
25-
</tr>
26-
<tr>
27-
<th>03/08/2016</th>
28-
<td>Leyendo Vinos</td>
29-
<td>0002</td>
30-
<td>1000</td>
31-
<td>Credito</td>
32-
<td><a class="btn btn-default" role="button" href="{{=URL(c="ventas",f="vista_previa",vars={"id":1})}}">Vista Del Comprobante</a>
33-
</tr>
34-
<tr>
35-
<th scope="row">05/08/2016</th>
36-
<td>Zia</td>
37-
<td>0003</td>
38-
<td>1200</td>
21+
<th>30/10/2016</th>
22+
<td>ZIA </td>
23+
<td>000000001</td>
24+
<td>A</td>
25+
<td>$189</td>
26+
<td>$1790.1</td>
3927
<td>Credito</td>
4028
<td><a class="btn btn-default" role="button" href="{{=URL(c="ventas",f="vista_previa",vars={"id":1})}}">Vista Del Comprobante</a>
4129
</tr>
30+
4231
</tbody>
4332
</table>
4433
</div>
@@ -48,10 +37,10 @@ <h1>LISTADO DE VENTAS POR CLIENTE</h1>
4837
<table class="table table-bordered">
4938
<tbody>
5039
<tr> <th scope="row">Cantidad de Ventas</th>
51-
<td>3</td>
40+
<td>1</td>
5241
</tr>
5342
<tr> <th scope="row">Valor total del Periodo</th>
54-
<td>3800</td>
43+
<td>$1790.1</td>
5544
</tr>
5645
</tbody>
5746
</table>

views/ventas/vista_previa.html

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ <h1>VISTA PREVIA DEL COMPROBANTE</h1>
66
<h2><IMG SRC="http://www.hersis.cl/servicios/servicio_tecnico.png" WIDTH=178 HEIGHT=180 /> C.V Technical Service</h2>
77
</div>
88
<div class="col-xs-6 text-right">
9-
<h1>Factura Tipo: {{=venta.tipo_factura}}</h1>
10-
<h1><small>{{=venta.numero_factura}}</small></h1>
11-
<h1><small>Fecha: {{=venta.fecha}}</small></h1>
9+
<h1>Factura Tipo: A</h1>
10+
<h1><small>00001</small></h1>
11+
<h1><small>Fecha: 30/10/2016</small></h1>
1212
</div>
1313
</div>
1414
<div class="form-group">
@@ -17,15 +17,18 @@ <h1><small>Fecha: {{=venta.fecha}}</small></h1>
1717
<div class="panel panel-default">
1818
<div class="panel-heading">
1919
<h4>De: <a href="#">Claudia Vargas</a></h4></div>
20-
<div class="panel-body">Dirección detalles más detalles</div>
20+
<div class="panel-body">DOMICILIO: Equiza 1234</div>
21+
<div class="panel-body">LOCALIDAD: Gonzalez Catan</div>
22+
<div class="panel-body">CUIT: 24-29-951753-5</div>
23+
<div class="panel-body">Inicio Actividades: 03/04/2016</div>
2124
</div>
2225
</div>
2326
<div class="col-xs-2"></div>
2427
<div class="col-xs-5">
2528
<div class="panel panel-default">
2629
<div class="panel-heading">
27-
<h4>Para : <a href="#">{{=cliente.razon_social}}</a></h4></div>
28-
<div class="panel-body">DOMICILIO: {{=cliente.direccion}} {{=cliente.numero}}</div>
30+
<h4>Para : <a href="#">ZIA0- Technical Service</a></h4></div>
31+
<div class="panel-body">DOMICILIO: Alsina 1175</div>
2932
<div class="panel-body">LOCALIDAD: Pontevedra</div>
3033
<div class="panel-body">COND. I.V.A: Responsable Inscripto</div>
3134
<div class="panel-body">CUIT o DNI: 20-33465017-1</div>
@@ -43,19 +46,19 @@ <h4>Para : <a href="#">{{=cliente.razon_social}}</a></h4></div>
4346
<th><h4>Detalle</h4></th>
4447
<th><h4>Cantidad</h4></th>
4548
<th><h4>Precio Unitario</h4></th>
46-
<th><h4>Total</h4></th>
49+
<th><h4>Sub-Total</h4></th>
4750
</tr>
4851
</thead>
4952
<tbody>
50-
{{for item in items:}}
53+
5154
<tr>
52-
<td>{{=item.detalle_ventas.id_producto}}</td>
53-
<td>{{=item.producto.detalle_producto}}</td>
54-
<td class=" text-center ">{{=item.detalle_ventas.cantidad}}</td>
55-
<td class=" text-right ">${{=item.producto.precio_vente}}</td>
56-
<td class=" text-right ">${{=item.producto.precio_venta * item.detalle_ventas.cantidad}}</td>
55+
<td>1</td>
56+
<td>Memoria Ram 16Gb</td>
57+
<td class=" text-center ">2</td>
58+
<td class=" text-right ">$900</td>
59+
<td class=" text-right ">$1800</td>
5760
</tr>
58-
{{pass}}
61+
5962
</tbody>
6063
</table>
6164
</div>
@@ -67,34 +70,34 @@ <h4>Para : <a href="#">{{=cliente.razon_social}}</a></h4></div>
6770
<table class="table table-bordered">
6871
<thead>
6972
<tr>
70-
<th><h5><B>TOTAL BRUTO</B></h5></th>
71-
<th><h5>Descuento "(10%)" </h5></th>
72-
<th><h5>Descuento "(15%)" </h5></th>
73-
<th><h5>Descuento "(20%)" </h5></th>
74-
<th><h5><B>SUB TOTAL</B></h5></th>
73+
<th><h5><B> SUB-TOTAL</B></h5></th>
7574
<th><h5>Impuesto IVA "(10.5%)" </h5></th>
7675
<th><h5>Impuesto IVA "(21%)" </h5></th>
76+
<th><h5><B>SUB TOTAL+IVA</B></h5></th>
77+
<th><h5>Descuento "(10%)"</h5></th>
78+
<th><h5>Descuento "(15%)" </h5></th>
79+
<th><h5>Descuento "(20%)"</h5></th>
7780
<th><h5><B>TOTAL</B></h5></th>
7881
</tr>
7982
</thead>
8083
<tbody>
8184
<tr>
82-
<td class=" text-right "><B>$3800</B></td>
83-
<td class=" text-right ">$800</td>
85+
<td class=" text-right "><B>$1800</B></td>
86+
<td class=" text-right ">$189.0</td>
8487
<td class=" text-right ">$0</td>
88+
<td class=" text-right "><B>$1989.0</B></td>
89+
<td class=" text-right ">$198.9</td>
8590
<td class=" text-right ">$0</td>
86-
<td class=" text-right "><B>$3000</B></td>
87-
<td class=" text-right ">$390</td>
8891
<td class=" text-right ">$0</td>
89-
<td class=" text-right "><B>$3390</B></td>
92+
<td class=" text-right "><B>$1790.1</B></td>
9093
</tr>
9194
</tbody>
9295
</table>
9396
</div>
9497
</div>
9598
<div class="form-group">
9699
<div class="col-xs-5">
97-
<h2><IMG SRC="http://www.codigodebarras.com/UserFiles/Image/JPG/CB.jpg" WIDTH=500 HEIGHT=100 /> </h2>
100+
<h2><IMG SRC="http://www.equipospro.com.ar/como_pagar/codigo_barras_pago_facil_archivos/codigo_barras.gif" WIDTH=500 HEIGHT=100 /> </h2>
98101
</div>
99102
</div>
100103
</form>

0 commit comments

Comments
 (0)