importe funcional sin haber hecho pruebas exaustivas

This commit is contained in:
carlos
2024-06-11 20:46:33 -06:00
25 changed files with 462 additions and 125 deletions
+18 -1
View File
@@ -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);
});