Reescrito modeo de TipoEgreso
Ademas los metodos que lo utilizaban para buscar en la base de datos ahora comprueban contra TipoEgreso.EMPTY para evitar buscar cuando se para un TipoEgreso.EMPTY
This commit is contained in:
@@ -172,11 +172,11 @@ public class EstadoResultadoController extends BaseController {
|
||||
|
||||
private void fillGastosGenerales() {
|
||||
TipoEgreso facturaGastosGenerales = DAOManager.getTipoEgresoDAO()
|
||||
.findByNombre("Factura Gastos Generales").get(0);
|
||||
.findByNombre("Factura Gastos Generales").orElse(TipoEgreso.EMPTY);
|
||||
TipoEgreso gastoGeneralConBoleta = DAOManager.getTipoEgresoDAO()
|
||||
.findByNombre("Gasto General Con Boleta").get(0);
|
||||
.findByNombre("Gasto General Con Boleta").orElse(TipoEgreso.EMPTY);
|
||||
TipoEgreso gastoGeneralSinRespaldo = DAOManager.getTipoEgresoDAO()
|
||||
.findByNombre("Gasto General Sin Respaldo").get(0);
|
||||
.findByNombre("Gasto General Sin Respaldo").orElse(TipoEgreso.EMPTY);
|
||||
|
||||
int cuentaCorrienteFactura = this.estadoResultado.getCuentaCorrienteFactura();
|
||||
int cuentaCorrienteBoleta = this.estadoResultado.getCuentaCorrienteBoleta();
|
||||
@@ -201,7 +201,7 @@ public class EstadoResultadoController extends BaseController {
|
||||
}
|
||||
|
||||
private void fillGastosOperacionales() {
|
||||
TipoEgreso tipoPagoPartime = DAOManager.getTipoEgresoDAO().findByNombre("Pago Partime").get(0);
|
||||
TipoEgreso tipoPagoPartime = DAOManager.getTipoEgresoDAO().findByNombre("Pago Partime").orElse(TipoEgreso.EMPTY);
|
||||
|
||||
int costoVenta = this.estadoResultado.getCostoVenta();
|
||||
int remuneraciones = this.estadoResultado.getRemuneraciones();
|
||||
|
||||
Reference in New Issue
Block a user