File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,9 +23,8 @@ typedef struct IngresodeVentas
2323 float TotalaPagar ;
2424 bool full ;
2525 unsigned id_producto_deseado ; //guarda el id que el user ingreso
26-
27- } facturas ;
2826
27+ } facturas ;
2928
3029enum options_modulo_ventas
3130{
@@ -103,7 +102,7 @@ void cash_register(facturas Facturas);
103102 * @return true el usuario ha salido del modulo y se va al menu inicial del programa
104103 * @return false no se ejecutara la funcion
105104 */
106- bool go_back ();//TODO ver si esto funcionara o solo dejar el menu
105+ bool go_back (); //TODO ver si esto funcionara o solo dejar el menu
107106
108107/**
109108 * @brief Imprime las opciones del usuario
@@ -113,11 +112,12 @@ bool go_back();//TODO ver si esto funcionara o solo dejar el menu
113112 */
114113bool ventas_menu ();
115114
116-
117115/**
118116 * @brief Imprime el encabezado del modulo ventas opcion 1
119117 *
120118 */
121119void print_factura ();
122120
123- #endif //VENTA_H
121+ int obtener_ventas_suma ();
122+
123+ #endif //VENTA_H
Original file line number Diff line number Diff line change @@ -22,6 +22,18 @@ struct products;
2222//TODO para que le pase cantidad a Facturas.cantidad y asi poder
2323//TODO pasarselo a venta_return_contabilidad.
2424
25+ int obtener_ventas_suma ()
26+ {
27+ int sum = 0 ;
28+ for (size_t i = 0 ; i < MAX_FACTURAS ; i ++ )
29+ {
30+ if (Facturas [i ].full )
31+ sum += Facturas [i ].Total ;
32+ }
33+
34+ return sum ;
35+ }
36+
2537void llenar_facturas (unsigned id , unsigned cantidad )
2638{
2739 bool temp = true;
@@ -280,8 +292,8 @@ bool ventas_menu()
280292 break ;
281293
282294 case DELETE_ORDERS :
283- for (;venta_return_contabilidad ();)
284- ;
295+ for (; venta_return_contabilidad ();)
296+ ;
285297 return ventas_menu ();
286298 break ;
287299
You can’t perform that action at this time.
0 commit comments