Para lograrlo se realizo el mismo procedimiento que con el informe de libro de ventas Primero que nada se elmino el objeto de InformeEgresosContent que se tenia porque realmente no aportaba nada, era basicamente lo mismo que el objeto egresos con un campo de fecha añadido y creo que un campo menos. Por lo que se paso a utilizar el objeto de Egresos directamente. Debido a lo anterior no era necesario tener una query especial para juntar los datos, ya que solo eran los egresos de todas las cajas de un tipo en especifico, por lo que solo se hizo una query nueva en el EgresoDAO en el que se satisfacia esta necesidad. Luego fue solo hacer compatible el InformeEgresosToExcel y listo!
115 lines
4.0 KiB
Java
115 lines
4.0 KiB
Java
/*
|
|
* MIT License
|
|
*
|
|
* Copyright (c) 2018-2019 Daniel Cortes
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
* in the Software without restriction, including without limitation the rights
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
* furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in all
|
|
* copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
* SOFTWARE.
|
|
*/
|
|
|
|
package danielcortes.xyz.data;
|
|
|
|
import danielcortes.xyz.models.caja.CajaDAO;
|
|
import danielcortes.xyz.models.caja.SQLiteCajaDAO;
|
|
import danielcortes.xyz.models.calculo_fondo.CalculoFondoDAO;
|
|
import danielcortes.xyz.models.calculo_fondo.SQLiteCalculoFondoDAO;
|
|
import danielcortes.xyz.models.documentos.DocumentosDAO;
|
|
import danielcortes.xyz.models.documentos.SQLiteDocumentosDAO;
|
|
import danielcortes.xyz.models.efectivo.EfectivoDAO;
|
|
import danielcortes.xyz.models.efectivo.SQLiteEfectivoDAO;
|
|
import danielcortes.xyz.models.egreso.EgresoDAO;
|
|
import danielcortes.xyz.models.egreso.SQLiteEgresoDAO;
|
|
import danielcortes.xyz.models.estado_resultado.EstadoResultadoDAO;
|
|
import danielcortes.xyz.models.estado_resultado.SQLiteEstadoResultadoDAO;
|
|
import danielcortes.xyz.models.ingreso.IngresoDAO;
|
|
import danielcortes.xyz.models.ingreso.SQLiteIngresoDAO;
|
|
import danielcortes.xyz.models.tipo_egreso.SQLiteTipoEgresoDAO;
|
|
import danielcortes.xyz.models.tipo_egreso.TipoEgresoDAO;
|
|
import danielcortes.xyz.models.tipo_ingreso.SQLiteTipoIngresoDAO;
|
|
import danielcortes.xyz.models.tipo_ingreso.TipoIngresoDAO;
|
|
import danielcortes.xyz.models.version.SQLiteVersionDAO;
|
|
import danielcortes.xyz.models.version.VersionDAO;
|
|
|
|
public class DAOManager {
|
|
|
|
private static final CajaDAO cajaDAO;
|
|
private static final CalculoFondoDAO calculoFondoDAO;
|
|
private static final DocumentosDAO documentosDAO;
|
|
private static final EfectivoDAO efectivoDAO;
|
|
private static final EgresoDAO egresoDAO;
|
|
private static final IngresoDAO ingresoDAO;
|
|
private static final TipoEgresoDAO tipoEgresoDAO;
|
|
private static final TipoIngresoDAO tipoIngresoDAO;
|
|
private static final EstadoResultadoDAO estadoResultadoDAO;
|
|
private static final VersionDAO versionDAO;
|
|
|
|
static {
|
|
cajaDAO = new SQLiteCajaDAO();
|
|
calculoFondoDAO = new SQLiteCalculoFondoDAO();
|
|
documentosDAO = new SQLiteDocumentosDAO();
|
|
efectivoDAO = new SQLiteEfectivoDAO();
|
|
egresoDAO = new SQLiteEgresoDAO();
|
|
ingresoDAO = new SQLiteIngresoDAO();
|
|
tipoEgresoDAO = new SQLiteTipoEgresoDAO();
|
|
tipoIngresoDAO = new SQLiteTipoIngresoDAO();
|
|
estadoResultadoDAO = new SQLiteEstadoResultadoDAO();
|
|
versionDAO = new SQLiteVersionDAO();
|
|
}
|
|
|
|
public static CajaDAO getCajaDAO() {
|
|
return cajaDAO;
|
|
}
|
|
|
|
public static CalculoFondoDAO getCalculoFondoDAO() {
|
|
return calculoFondoDAO;
|
|
}
|
|
|
|
public static DocumentosDAO getDocumentosDAO() {
|
|
return documentosDAO;
|
|
}
|
|
|
|
public static EfectivoDAO getEfectivoDAO() {
|
|
return efectivoDAO;
|
|
}
|
|
|
|
public static EgresoDAO getEgresoDAO() {
|
|
return egresoDAO;
|
|
}
|
|
|
|
|
|
public static IngresoDAO getIngresoDAO() {
|
|
return ingresoDAO;
|
|
}
|
|
|
|
public static TipoEgresoDAO getTipoEgresoDAO() {
|
|
return tipoEgresoDAO;
|
|
}
|
|
|
|
public static TipoIngresoDAO getTipoIngresoDAO() {
|
|
return tipoIngresoDAO;
|
|
}
|
|
|
|
public static EstadoResultadoDAO getEstadoResultadoDAO() {
|
|
return estadoResultadoDAO;
|
|
}
|
|
|
|
public static VersionDAO getVersionDAO() {
|
|
return versionDAO;
|
|
}
|
|
}
|