importe funcional sin haber hecho pruebas exaustivas
This commit is contained in:
+18
-1
@@ -116,11 +116,20 @@ namespace compabetov2
|
||||
btnVer.Click += new EventHandler(delegate (object sender, EventArgs e)
|
||||
{
|
||||
List<DetalleCuentaModel> detalles = service.conseguirDetalleCuante(cuenta.id);
|
||||
List<DetalleImporteCuenta> importes = service.conseguirImportesCuenta(cuenta.id);
|
||||
string mensaje = $"Cliente: {cuenta.cliente}\n";
|
||||
foreach (DetalleCuentaModel detalle in detalles)
|
||||
{
|
||||
mensaje += $"{detalle.producto.nombre} - {detalle.cantidad}\n";
|
||||
}
|
||||
|
||||
decimal totalImporte = 0;
|
||||
foreach (DetalleImporteCuenta importe in importes)
|
||||
{
|
||||
totalImporte += importe.cantidad * importe.precioImporte;
|
||||
}
|
||||
mensaje += $"Importe: {totalImporte}\n";
|
||||
|
||||
MessageBox.Show(mensaje);
|
||||
});
|
||||
|
||||
@@ -139,7 +148,8 @@ namespace compabetov2
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
List<DetalleCuentaModel> detalles = service.conseguirDetalleCuante(cuenta.id);
|
||||
if (service.saldarCuenta(cuenta, detalles))
|
||||
List<DetalleImporteCuenta> importes = service.conseguirImportesCuenta(cuenta.id);
|
||||
if (service.saldarCuenta(cuenta, detalles, importes))
|
||||
{
|
||||
llenarPanel();
|
||||
}
|
||||
@@ -196,11 +206,18 @@ namespace compabetov2
|
||||
btnVer.Click += new EventHandler(delegate (object sender, EventArgs e)
|
||||
{
|
||||
List<DetalleCuentaModel> detalles = service.conseguirDetalleCuante(cuenta.id);
|
||||
List<DetalleImporteCuenta> importes = service.conseguirImportesCuenta(cuenta.id);
|
||||
string mensaje = $"Cliente: {cuenta.cliente}\n";
|
||||
foreach (DetalleCuentaModel detalle in detalles)
|
||||
{
|
||||
mensaje += $"{detalle.producto.nombre} - {detalle.cantidad}\n";
|
||||
}
|
||||
decimal totalImporte = 0;
|
||||
foreach (DetalleImporteCuenta importe in importes)
|
||||
{
|
||||
totalImporte += importe.cantidad * importe.precioImporte;
|
||||
}
|
||||
mensaje += $"Importe: {totalImporte}\n";
|
||||
MessageBox.Show(mensaje);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user