Se simplificaron algunos nombres de clases
Los insertObject, insertDefaultObject, updateObject y deleteObject fueron simplificados a solo insert, insertDefault, update y delete
This commit is contained in:
BIN
dist/Programa Caja.jar
vendored
BIN
dist/Programa Caja.jar
vendored
Binary file not shown.
@@ -235,7 +235,7 @@ public class ArqueoController extends BaseController {
|
|||||||
this.efectivo.setCincoMil(cincoMil);
|
this.efectivo.setCincoMil(cincoMil);
|
||||||
this.efectivo.setDiezMil(diezMil);
|
this.efectivo.setDiezMil(diezMil);
|
||||||
this.efectivo.setVeinteMil(veinteMil);
|
this.efectivo.setVeinteMil(veinteMil);
|
||||||
DAOManager.getEfectivoDAO().updateEfectivo(efectivo);
|
DAOManager.getEfectivoDAO().update(efectivo);
|
||||||
|
|
||||||
this.updateResumenEfectivo();
|
this.updateResumenEfectivo();
|
||||||
this.updateResumenArqueo();
|
this.updateResumenArqueo();
|
||||||
@@ -254,7 +254,7 @@ public class ArqueoController extends BaseController {
|
|||||||
this.documentos.setTarjetas(tarjetas);
|
this.documentos.setTarjetas(tarjetas);
|
||||||
this.documentos.setCheques(cheques);
|
this.documentos.setCheques(cheques);
|
||||||
this.documentos.setRetiros(retiros);
|
this.documentos.setRetiros(retiros);
|
||||||
DAOManager.getDocumentosDAO().updateDocumentos(documentos);
|
DAOManager.getDocumentosDAO().update(documentos);
|
||||||
|
|
||||||
this.updateResumenDocumentos();
|
this.updateResumenDocumentos();
|
||||||
this.updateResumenArqueo();
|
this.updateResumenArqueo();
|
||||||
|
|||||||
@@ -110,11 +110,11 @@ public class CajasController {
|
|||||||
|
|
||||||
Efectivo efectivo = new Efectivo();
|
Efectivo efectivo = new Efectivo();
|
||||||
efectivo.setCaja(c);
|
efectivo.setCaja(c);
|
||||||
DAOManager.getEfectivoDAO().insertDefaultEfectivo(efectivo);
|
DAOManager.getEfectivoDAO().insertDefault(efectivo);
|
||||||
|
|
||||||
Documentos documentos = new Documentos();
|
Documentos documentos = new Documentos();
|
||||||
documentos.setCaja(c);
|
documentos.setCaja(c);
|
||||||
DAOManager.getDocumentosDAO().insertDefaultDocumentos(documentos);
|
DAOManager.getDocumentosDAO().insertDefault(documentos);
|
||||||
return c;
|
return c;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public class CalcularFondoController extends BaseController {
|
|||||||
if (selectedID >= 0) {
|
if (selectedID >= 0) {
|
||||||
CalculoFondo calculoFondo = this.view.getTableModel().getCalculoFondo(selectedID);
|
CalculoFondo calculoFondo = this.view.getTableModel().getCalculoFondo(selectedID);
|
||||||
this.view.getTableModel().removeRow(selectedID);
|
this.view.getTableModel().removeRow(selectedID);
|
||||||
DAOManager.getCalculoFondoDAO().deleteCalculoFondo(calculoFondo);
|
DAOManager.getCalculoFondoDAO().delete(calculoFondo);
|
||||||
this.updateResumen();
|
this.updateResumen();
|
||||||
this.updateButtonsEnabled();
|
this.updateButtonsEnabled();
|
||||||
this.resetFocus();
|
this.resetFocus();
|
||||||
@@ -123,7 +123,7 @@ public class CalcularFondoController extends BaseController {
|
|||||||
calculoFondo.setValor(valor);
|
calculoFondo.setValor(valor);
|
||||||
calculoFondo.setDescripcion(descripcion);
|
calculoFondo.setDescripcion(descripcion);
|
||||||
calculoFondo.setCaja(this.caja);
|
calculoFondo.setCaja(this.caja);
|
||||||
DAOManager.getCalculoFondoDAO().insertCalculoFondo(calculoFondo);
|
DAOManager.getCalculoFondoDAO().insert(calculoFondo);
|
||||||
this.view.getTableModel().addRow(calculoFondo);
|
this.view.getTableModel().addRow(calculoFondo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@ public class CalcularFondoController extends BaseController {
|
|||||||
this.editingCalculoFondo.setValor(valor);
|
this.editingCalculoFondo.setValor(valor);
|
||||||
this.editingCalculoFondo.setDescripcion(descripcion);
|
this.editingCalculoFondo.setDescripcion(descripcion);
|
||||||
this.editingCalculoFondo.setCaja(this.caja);
|
this.editingCalculoFondo.setCaja(this.caja);
|
||||||
DAOManager.getCalculoFondoDAO().updateCalculoFondo(editingCalculoFondo);
|
DAOManager.getCalculoFondoDAO().update(editingCalculoFondo);
|
||||||
this.view.getTableModel().setCalculoFondo(this.editingId, this.editingCalculoFondo);
|
this.view.getTableModel().setCalculoFondo(this.editingId, this.editingCalculoFondo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ public class EgresosController extends BaseController {
|
|||||||
if (selectedID >= 0) {
|
if (selectedID >= 0) {
|
||||||
Egreso egreso = this.view.getEgresosTableModel().getEgreso(selectedID);
|
Egreso egreso = this.view.getEgresosTableModel().getEgreso(selectedID);
|
||||||
this.view.getEgresosTableModel().removeRow(selectedID);
|
this.view.getEgresosTableModel().removeRow(selectedID);
|
||||||
DAOManager.getEgresoDAO().deleteEgreso(egreso);
|
DAOManager.getEgresoDAO().delete(egreso);
|
||||||
this.updateTotalEgresos();
|
this.updateTotalEgresos();
|
||||||
this.updateButtonsEnabled();
|
this.updateButtonsEnabled();
|
||||||
this.resetFocus();
|
this.resetFocus();
|
||||||
@@ -225,7 +225,7 @@ public class EgresosController extends BaseController {
|
|||||||
egreso.setNro(nro);
|
egreso.setNro(nro);
|
||||||
egreso.setTipoEgreso(tipo);
|
egreso.setTipoEgreso(tipo);
|
||||||
egreso.setCaja(caja);
|
egreso.setCaja(caja);
|
||||||
DAOManager.getEgresoDAO().insertEgreso(egreso);
|
DAOManager.getEgresoDAO().insert(egreso);
|
||||||
this.view.getEgresosTableModel().addRow(egreso);
|
this.view.getEgresosTableModel().addRow(egreso);
|
||||||
this.updateTotalEgresos();
|
this.updateTotalEgresos();
|
||||||
this.clearInputs();
|
this.clearInputs();
|
||||||
@@ -243,7 +243,7 @@ public class EgresosController extends BaseController {
|
|||||||
this.editingEgreso.setDescripcion(descripcion);
|
this.editingEgreso.setDescripcion(descripcion);
|
||||||
this.editingEgreso.setNro(nro);
|
this.editingEgreso.setNro(nro);
|
||||||
this.editingEgreso.setTipoEgreso(tipo);
|
this.editingEgreso.setTipoEgreso(tipo);
|
||||||
DAOManager.getEgresoDAO().updateEgreso(this.editingEgreso);
|
DAOManager.getEgresoDAO().update(this.editingEgreso);
|
||||||
this.view.getEgresosTableModel().setEgreso(this.editingId, this.editingEgreso);
|
this.view.getEgresosTableModel().setEgreso(this.editingId, this.editingEgreso);
|
||||||
this.updateTotalEgresos();
|
this.updateTotalEgresos();
|
||||||
this.clearInputs();
|
this.clearInputs();
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ public class EstadoResultadoController extends BaseController {
|
|||||||
|
|
||||||
private void guardarListener() {
|
private void guardarListener() {
|
||||||
EstadoResultadoDAO dao = DAOManager.getEstadoResultadoDAO();
|
EstadoResultadoDAO dao = DAOManager.getEstadoResultadoDAO();
|
||||||
dao.updateEstadoResultado(this.estadoResultado);
|
dao.update(this.estadoResultado);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void exportarListener() {
|
private void exportarListener() {
|
||||||
@@ -146,7 +146,7 @@ public class EstadoResultadoController extends BaseController {
|
|||||||
} else {
|
} else {
|
||||||
this.estadoResultado = new EstadoResultado();
|
this.estadoResultado = new EstadoResultado();
|
||||||
this.estadoResultado.setMes(this.mes);
|
this.estadoResultado.setMes(this.mes);
|
||||||
DAOManager.getEstadoResultadoDAO().insertEstadoResultado(estadoResultado);
|
DAOManager.getEstadoResultadoDAO().insert(estadoResultado);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.fillVentas();
|
this.fillVentas();
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ public class IngresosController extends BaseController {
|
|||||||
if (selectedId >= 0) {
|
if (selectedId >= 0) {
|
||||||
Ingreso ingreso = this.view.getIngresosTableModel().getIngreso(selectedId);
|
Ingreso ingreso = this.view.getIngresosTableModel().getIngreso(selectedId);
|
||||||
this.view.getIngresosTableModel().removeRow(selectedId);
|
this.view.getIngresosTableModel().removeRow(selectedId);
|
||||||
DAOManager.getIngresoDAO().deleteIngreso(ingreso);
|
DAOManager.getIngresoDAO().delete(ingreso);
|
||||||
this.updateTotalIngresos();
|
this.updateTotalIngresos();
|
||||||
this.updateButtonsEnabled();
|
this.updateButtonsEnabled();
|
||||||
this.resetFocus();
|
this.resetFocus();
|
||||||
@@ -240,7 +240,7 @@ public class IngresosController extends BaseController {
|
|||||||
ingreso.setNroInicial(nroInicial);
|
ingreso.setNroInicial(nroInicial);
|
||||||
ingreso.setNroFinal(nroFinal);
|
ingreso.setNroFinal(nroFinal);
|
||||||
|
|
||||||
DAOManager.getIngresoDAO().insertIngreso(ingreso);
|
DAOManager.getIngresoDAO().insert(ingreso);
|
||||||
this.view.getIngresosTableModel().addRow(ingreso);
|
this.view.getIngresosTableModel().addRow(ingreso);
|
||||||
|
|
||||||
this.clearInputs();
|
this.clearInputs();
|
||||||
@@ -262,7 +262,7 @@ public class IngresosController extends BaseController {
|
|||||||
this.editingIngreso.setNroZFinal(nroZFinal);
|
this.editingIngreso.setNroZFinal(nroZFinal);
|
||||||
this.editingIngreso.setNroInicial(nroInicial);
|
this.editingIngreso.setNroInicial(nroInicial);
|
||||||
this.editingIngreso.setNroFinal(nroFinal);
|
this.editingIngreso.setNroFinal(nroFinal);
|
||||||
DAOManager.getIngresoDAO().updateIngreso(this.editingIngreso);
|
DAOManager.getIngresoDAO().update(this.editingIngreso);
|
||||||
this.view.getIngresosTableModel().setIngreso(this.editingId, this.editingIngreso);
|
this.view.getIngresosTableModel().setIngreso(this.editingId, this.editingIngreso);
|
||||||
this.updateTotalIngresos();
|
this.updateTotalIngresos();
|
||||||
this.clearInputs();
|
this.clearInputs();
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ public interface CalculoFondoDAO {
|
|||||||
|
|
||||||
int getTotalCalculoFondo(Caja caja);
|
int getTotalCalculoFondo(Caja caja);
|
||||||
|
|
||||||
void insertCalculoFondo(CalculoFondo calculoFondo);
|
void insert(CalculoFondo calculoFondo);
|
||||||
|
|
||||||
void updateCalculoFondo(CalculoFondo calculoFondo);
|
void update(CalculoFondo calculoFondo);
|
||||||
|
|
||||||
void deleteCalculoFondo(CalculoFondo calculoFondo);
|
void delete(CalculoFondo calculoFondo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ public class SQLiteCalculoFondoDAO implements CalculoFondoDAO {
|
|||||||
* @param calculoFondo instancia que se insertara.
|
* @param calculoFondo instancia que se insertara.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void insertCalculoFondo(CalculoFondo calculoFondo) {
|
public void insert(CalculoFondo calculoFondo) {
|
||||||
LOGGER.info("Se intentara insertar el calculoFondo " + calculoFondo);
|
LOGGER.info("Se intentara insertar el calculoFondo " + calculoFondo);
|
||||||
|
|
||||||
String query = "insert into calculo_fondo (valor, descripcion, caja_id) values (?, ?, ?)";
|
String query = "insert into calculo_fondo (valor, descripcion, caja_id) values (?, ?, ?)";
|
||||||
@@ -232,7 +232,7 @@ public class SQLiteCalculoFondoDAO implements CalculoFondoDAO {
|
|||||||
* @param calculoFondo instancia de CalculoFondo a ser actualizada.
|
* @param calculoFondo instancia de CalculoFondo a ser actualizada.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void updateCalculoFondo(CalculoFondo calculoFondo) {
|
public void update(CalculoFondo calculoFondo) {
|
||||||
LOGGER.info("Se intentara actualizar el CalculoFondo " + calculoFondo);
|
LOGGER.info("Se intentara actualizar el CalculoFondo " + calculoFondo);
|
||||||
String query = "update calculo_fondo set valor = ?, descripcion = ?, caja_id = ? where id = ?";
|
String query = "update calculo_fondo set valor = ?, descripcion = ?, caja_id = ? where id = ?";
|
||||||
try (Connection conn = connectionHolder.getConnection()) {
|
try (Connection conn = connectionHolder.getConnection()) {
|
||||||
@@ -256,7 +256,7 @@ public class SQLiteCalculoFondoDAO implements CalculoFondoDAO {
|
|||||||
* @param calculoFondo instancia de CalculoFondo a eliminar.
|
* @param calculoFondo instancia de CalculoFondo a eliminar.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void deleteCalculoFondo(CalculoFondo calculoFondo) {
|
public void delete(CalculoFondo calculoFondo) {
|
||||||
LOGGER.info("Se intentara eliminar el CalculoFondo" + calculoFondo);
|
LOGGER.info("Se intentara eliminar el CalculoFondo" + calculoFondo);
|
||||||
String query = "delete from calculo_fondo where id = ?";
|
String query = "delete from calculo_fondo where id = ?";
|
||||||
try (Connection conn = connectionHolder.getConnection()) {
|
try (Connection conn = connectionHolder.getConnection()) {
|
||||||
|
|||||||
@@ -38,11 +38,11 @@ public interface DocumentosDAO {
|
|||||||
|
|
||||||
int getTotalDocumentos(Caja caja);
|
int getTotalDocumentos(Caja caja);
|
||||||
|
|
||||||
void insertDocumentos(Documentos documentos);
|
void insert(Documentos documentos);
|
||||||
|
|
||||||
void insertDefaultDocumentos(Documentos documentos);
|
void insertDefault(Documentos documentos);
|
||||||
|
|
||||||
void updateDocumentos(Documentos documentos);
|
void update(Documentos documentos);
|
||||||
|
|
||||||
void deleteDocumentos(Documentos documentos);
|
void delete(Documentos documentos);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ public class SQLiteDocumentosDAO implements DocumentosDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void insertDocumentos(Documentos documentos) {
|
public void insert(Documentos documentos) {
|
||||||
String query = "insert into documentos (cheques, tarjetas, retiros, caja_id) values (?,?,?,?)";
|
String query = "insert into documentos (cheques, tarjetas, retiros, caja_id) values (?,?,?,?)";
|
||||||
try (Connection conn = connectionHolder.getConnection()) {
|
try (Connection conn = connectionHolder.getConnection()) {
|
||||||
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
||||||
@@ -173,7 +173,7 @@ public class SQLiteDocumentosDAO implements DocumentosDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void insertDefaultDocumentos(Documentos documentos) {
|
public void insertDefault(Documentos documentos) {
|
||||||
String query = "insert into documentos (cheques, tarjetas, retiros, caja_id) values (0,0,0,?)";
|
String query = "insert into documentos (cheques, tarjetas, retiros, caja_id) values (0,0,0,?)";
|
||||||
try (Connection conn = connectionHolder.getConnection()) {
|
try (Connection conn = connectionHolder.getConnection()) {
|
||||||
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
||||||
@@ -191,7 +191,7 @@ public class SQLiteDocumentosDAO implements DocumentosDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateDocumentos(Documentos documentos) {
|
public void update(Documentos documentos) {
|
||||||
String query = "update documentos set tarjetas = ?, cheques = ?, retiros = ?, caja_id = ? where id = ?";
|
String query = "update documentos set tarjetas = ?, cheques = ?, retiros = ?, caja_id = ? where id = ?";
|
||||||
try (Connection conn = connectionHolder.getConnection()) {
|
try (Connection conn = connectionHolder.getConnection()) {
|
||||||
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
||||||
@@ -207,7 +207,7 @@ public class SQLiteDocumentosDAO implements DocumentosDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteDocumentos(Documentos documentos) {
|
public void delete(Documentos documentos) {
|
||||||
String query = "delete from documentos where id = ?";
|
String query = "delete from documentos where id = ?";
|
||||||
try (Connection conn = connectionHolder.getConnection()) {
|
try (Connection conn = connectionHolder.getConnection()) {
|
||||||
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
||||||
|
|||||||
@@ -38,12 +38,12 @@ public interface EfectivoDAO {
|
|||||||
|
|
||||||
int getTotalEfectivo(Caja caja);
|
int getTotalEfectivo(Caja caja);
|
||||||
|
|
||||||
void insertEfectivo(Efectivo efectivo);
|
void insert(Efectivo efectivo);
|
||||||
|
|
||||||
void insertDefaultEfectivo(Efectivo efectivo);
|
void insertDefault(Efectivo efectivo);
|
||||||
|
|
||||||
void updateEfectivo(Efectivo efectivo);
|
void update(Efectivo efectivo);
|
||||||
|
|
||||||
void deleteEfectivo(Efectivo efectivo);
|
void delete(Efectivo efectivo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ public class SQLiteEfectivoDAO implements EfectivoDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void insertEfectivo(Efectivo efectivo) {
|
public void insert(Efectivo efectivo) {
|
||||||
String query = "insert into efectivos (veinte_mil, diez_mil, cinco_mil, dos_mil, mil, quinientos, cien, cincuenta, diez, caja_id) values (?,?,?,?,?,?,?,?,?,?)";
|
String query = "insert into efectivos (veinte_mil, diez_mil, cinco_mil, dos_mil, mil, quinientos, cien, cincuenta, diez, caja_id) values (?,?,?,?,?,?,?,?,?,?)";
|
||||||
try (Connection conn = connectionHolder.getConnection()) {
|
try (Connection conn = connectionHolder.getConnection()) {
|
||||||
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
||||||
@@ -199,7 +199,7 @@ public class SQLiteEfectivoDAO implements EfectivoDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void insertDefaultEfectivo(Efectivo efectivo) {
|
public void insertDefault(Efectivo efectivo) {
|
||||||
String query = "insert into efectivos (veinte_mil, diez_mil, cinco_mil, dos_mil, mil, quinientos, cien, cincuenta, diez, caja_id) values (0,0,0,0,0,0,0,0,0,?)";
|
String query = "insert into efectivos (veinte_mil, diez_mil, cinco_mil, dos_mil, mil, quinientos, cien, cincuenta, diez, caja_id) values (0,0,0,0,0,0,0,0,0,?)";
|
||||||
try (Connection conn = connectionHolder.getConnection()) {
|
try (Connection conn = connectionHolder.getConnection()) {
|
||||||
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
||||||
@@ -217,7 +217,7 @@ public class SQLiteEfectivoDAO implements EfectivoDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateEfectivo(Efectivo efectivo) {
|
public void update(Efectivo efectivo) {
|
||||||
String query = "update efectivos set veinte_mil = ?, diez_mil = ?, cinco_mil = ?, dos_mil = ?, mil = ?, quinientos = ?, cien = ?, cincuenta = ?, diez = ?, caja_id = ? where id = ?";
|
String query = "update efectivos set veinte_mil = ?, diez_mil = ?, cinco_mil = ?, dos_mil = ?, mil = ?, quinientos = ?, cien = ?, cincuenta = ?, diez = ?, caja_id = ? where id = ?";
|
||||||
try (Connection conn = connectionHolder.getConnection()) {
|
try (Connection conn = connectionHolder.getConnection()) {
|
||||||
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
||||||
@@ -240,7 +240,7 @@ public class SQLiteEfectivoDAO implements EfectivoDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteEfectivo(Efectivo efectivo) {
|
public void delete(Efectivo efectivo) {
|
||||||
String query = "delete from efectivos where id = ?";
|
String query = "delete from efectivos where id = ?";
|
||||||
try (Connection conn = connectionHolder.getConnection()) {
|
try (Connection conn = connectionHolder.getConnection()) {
|
||||||
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
||||||
|
|||||||
@@ -43,11 +43,11 @@ public interface EgresoDAO {
|
|||||||
|
|
||||||
List<Egreso> getByTipoEgresoEnCaja(TipoEgreso tipoEgreso, Caja caja);
|
List<Egreso> getByTipoEgresoEnCaja(TipoEgreso tipoEgreso, Caja caja);
|
||||||
|
|
||||||
void insertEgreso(Egreso egreso);
|
void insert(Egreso egreso);
|
||||||
|
|
||||||
void updateEgreso(Egreso egreso);
|
void update(Egreso egreso);
|
||||||
|
|
||||||
void deleteEgreso(Egreso egreso);
|
void delete(Egreso egreso);
|
||||||
|
|
||||||
int getTotalEgreso(Caja caja);
|
int getTotalEgreso(Caja caja);
|
||||||
|
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ public class SQLiteEgresoDAO implements EgresoDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void insertEgreso(Egreso egreso) {
|
public void insert(Egreso egreso) {
|
||||||
String query = "insert into egresos (nro, descripcion, valor, tipo_egreso_id, caja_id) values (?,?,?,?,?)";
|
String query = "insert into egresos (nro, descripcion, valor, tipo_egreso_id, caja_id) values (?,?,?,?,?)";
|
||||||
try (Connection conn = connectionHolder.getConnection()) {
|
try (Connection conn = connectionHolder.getConnection()) {
|
||||||
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
||||||
@@ -332,7 +332,7 @@ public class SQLiteEgresoDAO implements EgresoDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateEgreso(Egreso egreso) {
|
public void update(Egreso egreso) {
|
||||||
String query = "update egresos set nro = ?, descripcion = ?, valor = ?, tipo_egreso_id = ?, caja_id = ? where id = ? ";
|
String query = "update egresos set nro = ?, descripcion = ?, valor = ?, tipo_egreso_id = ?, caja_id = ? where id = ? ";
|
||||||
try (Connection conn = connectionHolder.getConnection()) {
|
try (Connection conn = connectionHolder.getConnection()) {
|
||||||
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
||||||
@@ -349,7 +349,7 @@ public class SQLiteEgresoDAO implements EgresoDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteEgreso(Egreso egreso) {
|
public void delete(Egreso egreso) {
|
||||||
String query = "delete from egresos where id = ? ";
|
String query = "delete from egresos where id = ? ";
|
||||||
try (Connection conn = connectionHolder.getConnection()) {
|
try (Connection conn = connectionHolder.getConnection()) {
|
||||||
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ public interface EstadoResultadoDAO {
|
|||||||
|
|
||||||
Optional<EstadoResultado> getByMonth(YearMonth month);
|
Optional<EstadoResultado> getByMonth(YearMonth month);
|
||||||
|
|
||||||
void insertEstadoResultado(EstadoResultado estadoResultado);
|
void insert(EstadoResultado estadoResultado);
|
||||||
|
|
||||||
void updateEstadoResultado(EstadoResultado estadoResultado);
|
void update(EstadoResultado estadoResultado);
|
||||||
|
|
||||||
void deleteEstadoResultado(EstadoResultado estadoResultado);
|
void delete(EstadoResultado estadoResultado);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ public class SQLiteEstadoResultadoDAO implements EstadoResultadoDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void insertEstadoResultado(EstadoResultado estadoResultado) {
|
public void insert(EstadoResultado estadoResultado) {
|
||||||
String query = "insert into estado_resultado (mes, costo_venta, cuenta_corriente_factura, cuenta_corriente_boleta, cuenta_corriente_sin_respaldo, remuneraciones, finiquitos, aguinaldo, bonos_personal, honorarios_contador, arriendo, agua, luz, gas, telefono, otro_servicio, ppm, ivaFavor) values (?, ?, ?, ?, ?, ? , ?, ? , ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
String query = "insert into estado_resultado (mes, costo_venta, cuenta_corriente_factura, cuenta_corriente_boleta, cuenta_corriente_sin_respaldo, remuneraciones, finiquitos, aguinaldo, bonos_personal, honorarios_contador, arriendo, agua, luz, gas, telefono, otro_servicio, ppm, ivaFavor) values (?, ?, ?, ?, ?, ? , ?, ? , ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||||
try (Connection conn = connectionHolder.getConnection()) {
|
try (Connection conn = connectionHolder.getConnection()) {
|
||||||
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
||||||
@@ -169,7 +169,7 @@ public class SQLiteEstadoResultadoDAO implements EstadoResultadoDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateEstadoResultado(EstadoResultado estadoResultado) {
|
public void update(EstadoResultado estadoResultado) {
|
||||||
String query = "update estado_resultado set mes = ?, costo_venta = ?, cuenta_corriente_factura = ?, cuenta_corriente_boleta = ?, cuenta_corriente_sin_respaldo = ?, remuneraciones = ?, finiquitos = ?, aguinaldo = ?, bonos_personal = ?, honorarios_contador = ?, arriendo = ?, agua = ?, luz = ?, gas = ?, telefono = ?, otro_servicio = ?, ppm = ?, ivaFavor = ? where id = ?";
|
String query = "update estado_resultado set mes = ?, costo_venta = ?, cuenta_corriente_factura = ?, cuenta_corriente_boleta = ?, cuenta_corriente_sin_respaldo = ?, remuneraciones = ?, finiquitos = ?, aguinaldo = ?, bonos_personal = ?, honorarios_contador = ?, arriendo = ?, agua = ?, luz = ?, gas = ?, telefono = ?, otro_servicio = ?, ppm = ?, ivaFavor = ? where id = ?";
|
||||||
try (Connection conn = connectionHolder.getConnection()) {
|
try (Connection conn = connectionHolder.getConnection()) {
|
||||||
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
||||||
@@ -200,7 +200,7 @@ public class SQLiteEstadoResultadoDAO implements EstadoResultadoDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteEstadoResultado(EstadoResultado estadoResultado) {
|
public void delete(EstadoResultado estadoResultado) {
|
||||||
String query = "delete from estado_resultado where id = ?";
|
String query = "delete from estado_resultado where id = ?";
|
||||||
try (Connection conn = connectionHolder.getConnection()) {
|
try (Connection conn = connectionHolder.getConnection()) {
|
||||||
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
||||||
|
|||||||
@@ -56,10 +56,10 @@ public interface IngresoDAO {
|
|||||||
|
|
||||||
Optional<String> getUltimoNroZFinalDeCaja(Caja caja);
|
Optional<String> getUltimoNroZFinalDeCaja(Caja caja);
|
||||||
|
|
||||||
void insertIngreso(Ingreso ingreso);
|
void insert(Ingreso ingreso);
|
||||||
|
|
||||||
void updateIngreso(Ingreso ingreso);
|
void update(Ingreso ingreso);
|
||||||
|
|
||||||
void deleteIngreso(Ingreso ingreso);
|
void delete(Ingreso ingreso);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ public class SQLiteIngresoDAO implements IngresoDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void insertIngreso(Ingreso ingreso) {
|
public void insert(Ingreso ingreso) {
|
||||||
String query = "insert into ingresos (valor, nro_z_inicial, nro_z_final, nro_inicial, nro_final, tipo_ingreso_id, caja_id) values (?,?,?,?,?,?,?)";
|
String query = "insert into ingresos (valor, nro_z_inicial, nro_z_final, nro_inicial, nro_final, tipo_ingreso_id, caja_id) values (?,?,?,?,?,?,?)";
|
||||||
try (Connection conn = connectionHolder.getConnection()) {
|
try (Connection conn = connectionHolder.getConnection()) {
|
||||||
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
||||||
@@ -410,7 +410,7 @@ public class SQLiteIngresoDAO implements IngresoDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateIngreso(Ingreso ingreso) {
|
public void update(Ingreso ingreso) {
|
||||||
String query = "update ingresos set valor = ?, nro_z_inicial = ?, nro_z_final = ?, nro_inicial = ?, nro_final = ?, tipo_ingreso_id = ?, caja_id = ? where id = ?";
|
String query = "update ingresos set valor = ?, nro_z_inicial = ?, nro_z_final = ?, nro_inicial = ?, nro_final = ?, tipo_ingreso_id = ?, caja_id = ? where id = ?";
|
||||||
try (Connection conn = connectionHolder.getConnection()) {
|
try (Connection conn = connectionHolder.getConnection()) {
|
||||||
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
||||||
@@ -429,7 +429,7 @@ public class SQLiteIngresoDAO implements IngresoDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteIngreso(Ingreso ingreso) {
|
public void delete(Ingreso ingreso) {
|
||||||
String query = "delete from ingresos where id = ?";
|
String query = "delete from ingresos where id = ?";
|
||||||
try (Connection conn = connectionHolder.getConnection()) {
|
try (Connection conn = connectionHolder.getConnection()) {
|
||||||
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
try (PreparedStatement ps = conn.prepareStatement(query)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user