-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmenu.py
More file actions
188 lines (149 loc) · 5.55 KB
/
Copy pathmenu.py
File metadata and controls
188 lines (149 loc) · 5.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
import clientes
import vendedores
import operaciones
from terminal import limpiarTerminal
def mainMenu(cuentas):
opcion = selectMainMenu()
if (opcion == 1):
menuClientes(cuentas)
if (opcion == 2):
menuVendedores(cuentas)
if (opcion == 3):
menuOperaciones(cuentas)
if (opcion == 4):
menuReportes(cuentas)
# Limpiamos la terminal
limpiarTerminal()
def selectMainMenu():
# Limpiamos la terminal
limpiarTerminal()
# Seleccione una opción
print(" Seleccione una opción para comenzar ".center(80,'-'))
print("1. Ingreso al Módulo de Clientes")
print("2. Ingreso al Módulo de Vendedores")
print("3. Ingreso al Módulo de Operaciones")
print("4. Reportes")
print("5. Salir del Sistema")
while True:
# Manejo de Excepciones
# Solo podemos ingresar números...
try:
opcion = int(input("Seleccione una opción: "))
except ValueError: # El usuario ingresó algo distinto a un número, mostramos el error y continuamos
print('La opción para comenzar debe ser un número.')
else:
if (opcion >= 1 and opcion <= 5):
# La opción está entre 1 y 5, rompemos el ciclo y continuamos
break;
return opcion
def menuClientes(cuentas):
# Limpiamos la terminal
limpiarTerminal()
# Seleccione una opción
print(" Módulo de Clientes ".center(80,'-'))
print("1. Carga de Clientes")
print("2. Consultar Clientes")
print("3. Generar Clientes al Azar")
print("4. Volver al Menú Principal")
while True:
# Manejo de Excepciones
# Solo podemos ingresar números...
try:
opcion = int(input("Seleccione una opción: "))
except ValueError: # El usuario ingresó algo distinto a un número, mostramos el error y continuamos
print('La opción para comenzar debe ser un número.')
else:
if (opcion >= 1 and opcion <= 4):
# La opción está entre 1 y 4, rompemos el ciclo y continuamos
break;
if opcion == 1:
clientes.cargaClientes()
if opcion == 2:
clientes.consultarCliente()
if opcion == 3:
clientes.generarClientesRandom()
mainMenu(cuentas)
def menuVendedores(cuentas):
# Limpiamos la terminal
limpiarTerminal()
# Seleccione una opción
print(" Módulo de Vendedores ".center(80,'-'))
print("1. Cuentas Corrientes por Vendedor")
print("2. Volver al Menú Principal")
while True:
# Manejo de Excepciones
# Solo podemos ingresar números...
try:
opcion = int(input("Seleccione una opción: "))
except ValueError: # El usuario ingresó algo distinto a un número, mostramos el error y continuamos
print('La opción para comenzar debe ser un número.')
else:
if (opcion >= 1 and opcion <= 2):
# La opción está entre 1 y 2, rompemos el ciclo y continuamos
break;
if opcion == 1:
vendedores.cuentasCorrientesVendedor(cuentas)
mainMenu(cuentas)
def menuOperaciones(cuentas):
# Limpiamos la terminal
limpiarTerminal()
# Seleccione una opción
print(" Módulo de Operaciones ".center(80,'-'))
print("1. Carga de Operaciones")
print("2. Generar Operaciones al Azar")
print("3. Volver al Menú Principal")
while True:
# Manejo de Excepciones
# Solo podemos ingresar números...
try:
opcion = int(input("Seleccione una opción: "))
except ValueError: # El usuario ingresó algo distinto a un número, mostramos el error y continuamos
print('La opción para comenzar debe ser un número.')
else:
if (opcion >= 1 and opcion <= 3):
# La opción está entre 1 y 3, rompemos el ciclo y continuamos
break;
if opcion == 1:
operaciones.cargaOperaciones(cuentas)
if opcion == 2:
operaciones.generarOperacionesRandom()
mainMenu(cuentas)
def menuReportes(cuentas):
# Limpiamos la terminal
limpiarTerminal()
# Seleccione una opción
print(" Módulo de Reportes ".center(80,'-'))
print("1. Totales de Ventas por Vendedor")
print("2. Cantidad de Compras por Clientes")
print("3. Clientes Deudores")
print("4. Informe de Movimientos filtrados por Facturas y Recibos")
print("5. Informe de Movimientos filtrados por Cliente y Vendedor")
print("6. Vista de Cuenta Corriente por Cliente")
print("7. Calcular el Total Operativo")
print("8. Volver al Menú Principal")
while True:
# Manejo de Excepciones
# Solo podemos ingresar números...
try:
opcion = int(input("Seleccione una opción: "))
except ValueError: # El usuario ingresó algo distinto a un número, mostramos el error y continuamos
print('La opción para comenzar debe ser un número.')
else:
if (opcion >= 1 and opcion <= 8):
# La opción está entre 1 y 8, rompemos el ciclo y continuamos
break;
if opcion == 1:
vendedores.ventasVendedores()
if opcion == 2:
clientes.clientesCompras()
if opcion == 3:
clientes.clientesDeudores()
if opcion == 4:
operaciones.reporteFacturasRecibos()
if opcion == 5:
operaciones.reporteClienteVendedor(cuentas)
if opcion == 6:
operaciones.cuentaCorriente()
if opcion == 7:
operaciones.totalOperativo()
mainMenu(cuentas)