importe funcional sin haber hecho pruebas exaustivas
This commit is contained in:
+13
-3
@@ -68,9 +68,10 @@ namespace compabetov2
|
||||
private void llenarPanel()
|
||||
{
|
||||
panelEnvio.Controls.Clear();
|
||||
List<Envio> envios = service.conseguirEnvio();
|
||||
foreach(Envio envio in envios)
|
||||
List<Dictionary<string, dynamic>> envios_importes_list = service.conseguirEnvio();
|
||||
foreach(Dictionary<string, dynamic> envio_importes in envios_importes_list)
|
||||
{
|
||||
Envio envio = envio_importes["envio"];
|
||||
if (envio.estado.Equals("EN PROCESO"))
|
||||
{
|
||||
TableLayoutPanel carta = new TableLayoutPanel();
|
||||
@@ -133,11 +134,20 @@ namespace compabetov2
|
||||
{
|
||||
List<DetalleEnvioModel> detalles = service.conseguirDetalleEnvio(envio.id);
|
||||
string mensaje = "";
|
||||
decimal cantidadImportes = 0;
|
||||
foreach (DetalleEnvioModel detalle in detalles)
|
||||
{
|
||||
mensaje += $"{detalle.producto.nombre} - {detalle.cantidad}\n";
|
||||
|
||||
foreach(DetalleImporteEnvio importe in envio_importes["importes"])
|
||||
{
|
||||
cantidadImportes = importe.cantidad * importe.precioImporte;
|
||||
}
|
||||
|
||||
}
|
||||
mensaje += $"Importe: {cantidadImportes}\n";
|
||||
mensaje += $"Total: {envio.total}";
|
||||
|
||||
MessageBox.Show(mensaje);
|
||||
});
|
||||
|
||||
@@ -156,7 +166,7 @@ namespace compabetov2
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
List<DetalleEnvioModel> detalles = service.conseguirDetalleEnvio(envio.id);
|
||||
if (service.concluirEnvio(envio, detalles))
|
||||
if (service.concluirEnvio(envio, detalles, envio_importes["importes"]))
|
||||
{
|
||||
llenarPanel();
|
||||
ImprimirTicketConcluido(envio);
|
||||
|
||||
Reference in New Issue
Block a user