This commit is contained in:
Michael Robles
2024-02-03 05:39:59 -07:00
4 changed files with 40 additions and 3 deletions
-2
View File
@@ -158,8 +158,6 @@ namespace compabetov2
{ {
llenarPanel(); llenarPanel();
ImprimirTicketConcluido(envio); ImprimirTicketConcluido(envio);
} }
} }
}); });
+8 -1
View File
@@ -36,6 +36,8 @@ namespace compabetov2
resumen = service.estadisticas(fechaBuscar); resumen = service.estadisticas(fechaBuscar);
List<DetalleVentaModel> productosMes = estadisticasMes(); List<DetalleVentaModel> productosMes = estadisticasMes();
List<DetalleVentaModel> productosDia = estadisticasDia(); List<DetalleVentaModel> productosDia = estadisticasDia();
decimal totalmes = totalMes();
decimal totaldia = totalDia();
Dictionary<string,dynamic> estadisticas = new Dictionary<string, dynamic> Dictionary<string,dynamic> estadisticas = new Dictionary<string, dynamic>
{ {
@@ -43,7 +45,8 @@ namespace compabetov2
{ "productos", productosMes }, { "productos", productosMes },
{ "productoMasVendido", prodctoMasVendido(productosMes) }, { "productoMasVendido", prodctoMasVendido(productosMes) },
{ "mejorVendedor", mejorVenderdorMes() }, { "mejorVendedor", mejorVenderdorMes() },
{ "totalMes", totalMes() }, { "totalMes", totalmes },
{ "totalMesSinEnvio", totalMesSinEnvio(totalmes) },
} }
}, },
{ "dia", new Dictionary<string, dynamic>{ { "dia", new Dictionary<string, dynamic>{
@@ -57,6 +60,10 @@ namespace compabetov2
mostrarDatos(estadisticas); mostrarDatos(estadisticas);
} }
private dynamic totalMesSinEnvio(decimal total)
{
}
private decimal totalMes() private decimal totalMes()
{ {
List<Dictionary<string, dynamic>> mes = resumen["mes"]; List<Dictionary<string, dynamic>> mes = resumen["mes"];
+25
View File
@@ -1163,6 +1163,31 @@ namespace compabetov2.database
} }
} }
public static SQLiteDataReader conseguirEnvioMesDAO(DateTime fecha)
{
SQLiteDataReader reader = null;
var db_conexion = new Conexion();
try
{
SQLiteConnection conexion = db_conexion.get_connection();
conexion.Open();
string sql = "SELECT * FROM envio WHERE fecha LIKE @fecha";
SQLiteCommand command = new SQLiteCommand(sql, conexion);
command.Parameters.AddWithValue("@fecha", $"%{fecha.Month}/{fecha.Year}%");
reader = command.ExecuteReader();
return reader;
}
catch (SQLiteException ex)
{
MessageBox.Show(ex.Message);
return reader;
}
}
public static SQLiteDataReader conseguirDetalleVenta(VentaModel venta) public static SQLiteDataReader conseguirDetalleVenta(VentaModel venta)
{ {
SQLiteDataReader reader = null; SQLiteDataReader reader = null;
+7
View File
@@ -461,5 +461,12 @@ namespace compabetov2.database
return productos; return productos;
} }
public static List<Envio> conseguirEnvioMes(DateTime fecha)
{
List<Envio> envios = new List<Envio>();
return envios;
}
} }
} }