Se aplico el estilo de codigo de google :3
https://github.com/google/styleguide
This commit is contained in:
@@ -28,15 +28,19 @@ import danielcortes.xyz.controllers.BaseLayoutController;
|
||||
import danielcortes.xyz.data.Configuration;
|
||||
import danielcortes.xyz.data.DAOManager;
|
||||
import danielcortes.xyz.views.BaseLayout;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Locale;
|
||||
import java.util.logging.LogManager;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.UnsupportedLookAndFeelException;
|
||||
|
||||
public class Main {
|
||||
|
||||
private static final int DATABASE_VERSION = 2;
|
||||
|
||||
static {
|
||||
setUpLogger();
|
||||
setUpSystemProperties();
|
||||
|
||||
@@ -31,15 +31,14 @@ import danielcortes.xyz.models.efectivo.Efectivo;
|
||||
import danielcortes.xyz.views.ArqueoView;
|
||||
import danielcortes.xyz.views.CalcularFondoView;
|
||||
import danielcortes.xyz.views.components.NumberFormatedTextField;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.Color;
|
||||
import javax.swing.KeyStroke;
|
||||
|
||||
/**
|
||||
* Controlador destinado a la vista ArqueoView
|
||||
* Maneja su contenido y las acciones que esta realiza.
|
||||
* Controlador destinado a la vista ArqueoView Maneja su contenido y las acciones que esta realiza.
|
||||
*/
|
||||
public class ArqueoController extends BaseController {
|
||||
|
||||
private ArqueoView view;
|
||||
private Caja caja;
|
||||
private Efectivo efectivo;
|
||||
@@ -170,19 +169,23 @@ public class ArqueoController extends BaseController{
|
||||
moveTo(this.view.getQuinientosField(), this.view.getCienField());
|
||||
moveTo(this.view.getCienField(), this.view.getCincuentaField());
|
||||
moveTo(this.view.getCincuentaField(), this.view.getDiezField());
|
||||
doAction(this.view.getDiezField(), "save", KeyStroke.getKeyStroke("ENTER"), e -> this.guardarEfectivoActionListener());
|
||||
doAction(this.view.getDiezField(), "save", KeyStroke.getKeyStroke("ENTER"),
|
||||
e -> this.guardarEfectivoActionListener());
|
||||
moveTo(this.view.getChequesField(), this.view.getTarjetasField());
|
||||
moveTo(this.view.getTarjetasField(), this.view.getRetiroField());
|
||||
doAction(this.view.getRetiroField(), "save", KeyStroke.getKeyStroke("ENTER"), e -> this.guardarDocumentosActionListener());
|
||||
doAction(this.view.getRetiroField(), "save", KeyStroke.getKeyStroke("ENTER"),
|
||||
e -> this.guardarDocumentosActionListener());
|
||||
|
||||
this.view.getGuardarEfectivoButton().addActionListener(e -> this.guardarEfectivoActionListener());
|
||||
this.view.getGuardarDocumentosButton().addActionListener(e -> this.guardarEfectivoActionListener());
|
||||
this.view.getGuardarEfectivoButton()
|
||||
.addActionListener(e -> this.guardarEfectivoActionListener());
|
||||
this.view.getGuardarDocumentosButton()
|
||||
.addActionListener(e -> this.guardarEfectivoActionListener());
|
||||
this.view.getCalcularFondoButton().addActionListener(e -> this.calcularFondoActionListener());
|
||||
}
|
||||
|
||||
/**
|
||||
* Llama a los metodos necesarios para guardar los campos de efectivo
|
||||
* Primero llama a normalizar el input, luego a esconder los mensajes de error, para finalmente llamar a guardar el efectivo
|
||||
* Llama a los metodos necesarios para guardar los campos de efectivo Primero llama a normalizar
|
||||
* el input, luego a esconder los mensajes de error, para finalmente llamar a guardar el efectivo
|
||||
*/
|
||||
private void guardarEfectivoActionListener() {
|
||||
this.view.getGuardarEfectivoButton().requestFocus();
|
||||
@@ -190,8 +193,8 @@ public class ArqueoController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Llama a los metodos necesarios para guardar los documentos
|
||||
* Primero llama a normalizar el input, luego a esconder los mensajes de error y finalmente a guardar los documentos
|
||||
* Llama a los metodos necesarios para guardar los documentos Primero llama a normalizar el input,
|
||||
* luego a esconder los mensajes de error y finalmente a guardar los documentos
|
||||
*/
|
||||
private void guardarDocumentosActionListener() {
|
||||
this.view.getGuardarDocumentosButton().requestFocus();
|
||||
@@ -208,8 +211,9 @@ public class ArqueoController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Guarda los datos del detalle de efectivo solo despues de que los campos sean validados, luego de guardar
|
||||
* llama a updateResumenEfectivo y updateResumenArqueo para actualizar los datos en efectivoField y arqueoField
|
||||
* Guarda los datos del detalle de efectivo solo despues de que los campos sean validados, luego
|
||||
* de guardar llama a updateResumenEfectivo y updateResumenArqueo para actualizar los datos en
|
||||
* efectivoField y arqueoField
|
||||
*/
|
||||
private void guardarEfectivo() {
|
||||
int diez = this.view.getDiezField().getValue();
|
||||
@@ -238,8 +242,9 @@ public class ArqueoController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Guarda los datos del detalle de documentos solo despues de que los campos sean validados, luego de guardar
|
||||
* llama a updateResumenDocumentos y updateResumenArqueo para actualizar los datos de documentosField y arqueoField
|
||||
* Guarda los datos del detalle de documentos solo despues de que los campos sean validados, luego
|
||||
* de guardar llama a updateResumenDocumentos y updateResumenArqueo para actualizar los datos de
|
||||
* documentosField y arqueoField
|
||||
*/
|
||||
private void guardarDocumentos() {
|
||||
int tarjetas = this.view.getTarjetasField().getValue();
|
||||
|
||||
@@ -2,11 +2,13 @@ package danielcortes.xyz.controllers;
|
||||
|
||||
import danielcortes.xyz.controllers.actions.BasicAction;
|
||||
import danielcortes.xyz.data.Configuration;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.Dimension;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.KeyStroke;
|
||||
|
||||
class BaseController {
|
||||
|
||||
static void moveTo(JComponent origin, JComponent destiny) {
|
||||
KeyStroke next = KeyStroke.getKeyStroke("ENTER");
|
||||
KeyStroke back = KeyStroke.getKeyStroke("ESCAPE");
|
||||
@@ -15,6 +17,7 @@ class BaseController {
|
||||
origin.getActionMap().put("nextField", (BasicAction) e -> destiny.requestFocus());
|
||||
destiny.getActionMap().put("previousField", (BasicAction) e -> origin.requestFocus());
|
||||
}
|
||||
|
||||
static void doAction(JComponent target, String name, KeyStroke keyStroke, BasicAction action) {
|
||||
target.getInputMap(JComponent.WHEN_FOCUSED).put(keyStroke, name);
|
||||
target.getActionMap().put(name, action);
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
package danielcortes.xyz.controllers;
|
||||
|
||||
import danielcortes.xyz.views.*;
|
||||
|
||||
import java.awt.*;
|
||||
import danielcortes.xyz.views.BaseLayout;
|
||||
import danielcortes.xyz.views.CajasView;
|
||||
import danielcortes.xyz.views.EstadoResultadoView;
|
||||
import danielcortes.xyz.views.InformesSideBar;
|
||||
import danielcortes.xyz.views.MainSideBar;
|
||||
import java.awt.CardLayout;
|
||||
|
||||
public class BaseLayoutController extends BaseController {
|
||||
|
||||
private final String MAIN_SIDEBAR = "MAIN";
|
||||
private final String INFORMES_SIDEBAR = "INFORMES";
|
||||
private final String CAJAS_MAIN = "CAJAS";
|
||||
@@ -78,7 +82,8 @@ public class BaseLayoutController extends BaseController {
|
||||
private void loadEstadoResultadoMainContent() {
|
||||
EstadoResultadoView estadoResultadoView = new EstadoResultadoView();
|
||||
this.estadoResultadoController = new EstadoResultadoController(estadoResultadoView);
|
||||
this.baseLayoutView.getMainPanel().add(estadoResultadoView.getContentPanel(), ESTADO_RESULTADO_MAIN);
|
||||
this.baseLayoutView.getMainPanel()
|
||||
.add(estadoResultadoView.getContentPanel(), ESTADO_RESULTADO_MAIN);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,16 +28,19 @@ import danielcortes.xyz.data.DAOManager;
|
||||
import danielcortes.xyz.models.caja.Caja;
|
||||
import danielcortes.xyz.models.documentos.Documentos;
|
||||
import danielcortes.xyz.models.efectivo.Efectivo;
|
||||
import danielcortes.xyz.views.*;
|
||||
|
||||
import java.awt.*;
|
||||
import danielcortes.xyz.views.ArqueoView;
|
||||
import danielcortes.xyz.views.CajasView;
|
||||
import danielcortes.xyz.views.EgresosView;
|
||||
import danielcortes.xyz.views.IngresosView;
|
||||
import java.awt.CardLayout;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* Controlador destinado a controlar la vista de CajasView
|
||||
* Ademas es la que crea las vistas internas en un CardLayaut junto a sus controladores
|
||||
* Controlador destinado a controlar la vista de CajasView Ademas es la que crea las vistas internas
|
||||
* en un CardLayaut junto a sus controladores
|
||||
*/
|
||||
public class CajasController {
|
||||
|
||||
private CajasView view;
|
||||
|
||||
private IngresosController ingresosController;
|
||||
@@ -45,15 +48,11 @@ public class CajasController {
|
||||
private ArqueoController arqueoController;
|
||||
|
||||
/**
|
||||
* Crea el controlador
|
||||
* Necesita todos las interfaces DAO para poder asignarselos a sus vistas,
|
||||
* Crea el controlador Necesita todos las interfaces DAO para poder asignarselos a sus vistas,
|
||||
* esto con el objetivo que sean facilmente intercambiables.
|
||||
* <p>
|
||||
* Llama a los metodos que:
|
||||
* - Cargan el contenido del CardLayout
|
||||
* - Selecciona una fecha inicial
|
||||
* - Genera los eventos de la vista
|
||||
* - Presiona el boton de la vista inicial
|
||||
* Llama a los metodos que: - Cargan el contenido del CardLayout - Selecciona una fecha inicial -
|
||||
* Genera los eventos de la vista - Presiona el boton de la vista inicial
|
||||
*/
|
||||
public CajasController(CajasView view) {
|
||||
this.view = view;
|
||||
@@ -76,9 +75,9 @@ public class CajasController {
|
||||
}
|
||||
|
||||
/**
|
||||
* Setea los eventos de los botones y el datepicker
|
||||
* - Cada vez que se cambia la fecha en el datepicker se llama a actualizar la caja
|
||||
* - Cuando se presiona uno de los botones muestra la vista correspondiente en el cardlayout
|
||||
* Setea los eventos de los botones y el datepicker - Cada vez que se cambia la fecha en el
|
||||
* datepicker se llama a actualizar la caja - Cuando se presiona uno de los botones muestra la
|
||||
* vista correspondiente en el cardlayout
|
||||
*/
|
||||
private void setUpViewEvents() {
|
||||
this.view.getEgresosButton().addActionListener(e -> {
|
||||
@@ -99,7 +98,8 @@ public class CajasController {
|
||||
}
|
||||
|
||||
/**
|
||||
* Llama a update caja con la fecha seleccionada en el datepicker en los controladores del manager.
|
||||
* Llama a update caja con la fecha seleccionada en el datepicker en los controladores del
|
||||
* manager.
|
||||
*/
|
||||
private void updateCaja() {
|
||||
LocalDate selectedDate = this.view.getDatePicker().getDate();
|
||||
|
||||
@@ -5,12 +5,13 @@ import danielcortes.xyz.models.caja.Caja;
|
||||
import danielcortes.xyz.models.calculo_fondo.CalculoFondo;
|
||||
import danielcortes.xyz.views.CalcularFondoView;
|
||||
import danielcortes.xyz.views.components.table_model.FondoTableModel;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.KeyStroke;
|
||||
|
||||
public class CalcularFondoController extends BaseController {
|
||||
|
||||
private CalcularFondoView view;
|
||||
private Caja caja;
|
||||
|
||||
@@ -53,8 +54,10 @@ public class CalcularFondoController extends BaseController{
|
||||
|
||||
private void setupViewEvents() {
|
||||
moveTo(this.view.getValorField(), this.view.getDescripcionField());
|
||||
doAction(this.view.getDescripcionField(), "save", KeyStroke.getKeyStroke("ENTER"), e -> this.guardarActionListener());
|
||||
doAction(this.view.getFondoField(), "updateResumen", KeyStroke.getKeyStroke("ENTER"), e -> this.updateResumen());
|
||||
doAction(this.view.getDescripcionField(), "save", KeyStroke.getKeyStroke("ENTER"),
|
||||
e -> this.guardarActionListener());
|
||||
doAction(this.view.getFondoField(), "updateResumen", KeyStroke.getKeyStroke("ENTER"),
|
||||
e -> this.updateResumen());
|
||||
|
||||
this.view.getTable().getSelectionModel().addListSelectionListener(e -> updateButtonsEnabled());
|
||||
this.view.getGuardarButton().addActionListener(e -> guardarActionListener());
|
||||
@@ -76,7 +79,6 @@ public class CalcularFondoController extends BaseController{
|
||||
int valor = this.view.getValorField().getValue();
|
||||
String descripcion = this.view.getDescripcionField().getText();
|
||||
|
||||
|
||||
if (editing) {
|
||||
this.editarCalculoFondo(valor, descripcion);
|
||||
this.editing = false;
|
||||
|
||||
@@ -31,17 +31,20 @@ import danielcortes.xyz.models.tipo_egreso.TipoEgreso;
|
||||
import danielcortes.xyz.models.tipo_egreso.TipoEgresoToStringWrapper;
|
||||
import danielcortes.xyz.views.EgresosView;
|
||||
import danielcortes.xyz.views.components.table_model.EgresosTableModel;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.KeyStroke;
|
||||
|
||||
/**
|
||||
* Controlador el cual esta orientado a manejar la vista de EgresosView
|
||||
* Maneja su contenido y las acciones que esta realiza
|
||||
* Controlador el cual esta orientado a manejar la vista de EgresosView Maneja su contenido y las
|
||||
* acciones que esta realiza
|
||||
*/
|
||||
public class EgresosController extends BaseController {
|
||||
|
||||
private EgresosView view;
|
||||
private Caja caja;
|
||||
|
||||
@@ -50,11 +53,8 @@ public class EgresosController extends BaseController{
|
||||
private Egreso editingEgreso;
|
||||
|
||||
/**
|
||||
* Crea el controlador
|
||||
* Al inicial ejecuta:
|
||||
* - Metodo que genera los eventos para la vista.
|
||||
* - Metodo que llena los tipos de egresos en la vista.
|
||||
* - Actualiza el estado de los botones.
|
||||
* Crea el controlador Al inicial ejecuta: - Metodo que genera los eventos para la vista. - Metodo
|
||||
* que llena los tipos de egresos en la vista. - Actualiza el estado de los botones.
|
||||
*/
|
||||
public EgresosController(EgresosView view) {
|
||||
this.view = view;
|
||||
@@ -64,7 +64,8 @@ public class EgresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Guarda la caja entregada y actualiza los datos de la tabla de egresos y actualiza el field con el total de egresos.
|
||||
* Guarda la caja entregada y actualiza los datos de la tabla de egresos y actualiza el field con
|
||||
* el total de egresos.
|
||||
*/
|
||||
public void updateCaja(Caja caja) {
|
||||
this.caja = caja;
|
||||
@@ -94,20 +95,22 @@ public class EgresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Asigna todos los eventos para la vista de egresos.
|
||||
* - Cuando se apreta el boton de guardar o se apreta enter en los fields de descripcion, nro, valor y tipo
|
||||
* Se llama al metodo guardarActionListener.
|
||||
* - Cuando se apreta el boton de eliminar se llama al metodos eliminarActionListener
|
||||
* - Cuando se presiona editar o se realizan 2 clicks en la tabla de egresos se llama a editarActionListener
|
||||
* - Cuando se selecciona una fila en la tabla se llama a updateButtonsEnabled
|
||||
* Asigna todos los eventos para la vista de egresos. - Cuando se apreta el boton de guardar o se
|
||||
* apreta enter en los fields de descripcion, nro, valor y tipo Se llama al metodo
|
||||
* guardarActionListener. - Cuando se apreta el boton de eliminar se llama al metodos
|
||||
* eliminarActionListener - Cuando se presiona editar o se realizan 2 clicks en la tabla de
|
||||
* egresos se llama a editarActionListener - Cuando se selecciona una fila en la tabla se llama a
|
||||
* updateButtonsEnabled
|
||||
*/
|
||||
private void setUpViewEvents() {
|
||||
moveTo(this.view.getNroField(), this.view.getDescripcionField());
|
||||
moveTo(this.view.getDescripcionField(), this.view.getValorField());
|
||||
moveTo(this.view.getValorField(), this.view.getTipoCombo());
|
||||
doAction(this.view.getTipoCombo(), "save", KeyStroke.getKeyStroke("ENTER"), e -> this.guardarActionListener());
|
||||
doAction(this.view.getTipoCombo(), "save", KeyStroke.getKeyStroke("ENTER"),
|
||||
e -> this.guardarActionListener());
|
||||
|
||||
this.view.getEgresosTable().getSelectionModel().addListSelectionListener(e -> updateButtonsEnabled());
|
||||
this.view.getEgresosTable().getSelectionModel()
|
||||
.addListSelectionListener(e -> updateButtonsEnabled());
|
||||
this.view.getGuardarButton().addActionListener(e -> guardarActionListener());
|
||||
this.view.getEliminarButton().addActionListener(e -> eliminarActionListener());
|
||||
this.view.getEditarButton().addActionListener(e -> editarActionListener());
|
||||
@@ -123,10 +126,10 @@ public class EgresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Realiza las preparaciones previas a guardar un egreso
|
||||
* Primero llama a normalizar los inputs y a ocultar los mensajes de error
|
||||
* Luego si es que esta colocada la flag de editing se llama al metodo editarEgreso y si no, se llama a guardarEgreso
|
||||
* Al terminar esto, se llama a resetear el focus en los inputs y a actualizar el total de egresos
|
||||
* Realiza las preparaciones previas a guardar un egreso Primero llama a normalizar los inputs y a
|
||||
* ocultar los mensajes de error Luego si es que esta colocada la flag de editing se llama al
|
||||
* metodo editarEgreso y si no, se llama a guardarEgreso Al terminar esto, se llama a resetear el
|
||||
* focus en los inputs y a actualizar el total de egresos
|
||||
*/
|
||||
private void guardarActionListener() {
|
||||
this.normalizeInputs();
|
||||
@@ -146,8 +149,8 @@ public class EgresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Realiza las acciones necesarias para eliminar un egreso
|
||||
* Obtiene el egreso seleccionado y lo elimina, luego llama a actualizar el total de egresos y a actualizar el estado de los botones.
|
||||
* Realiza las acciones necesarias para eliminar un egreso Obtiene el egreso seleccionado y lo
|
||||
* elimina, luego llama a actualizar el total de egresos y a actualizar el estado de los botones.
|
||||
*/
|
||||
private void eliminarActionListener() {
|
||||
int selectedID = this.view.getEgresosTable().getSelectedRow();
|
||||
@@ -162,17 +165,17 @@ public class EgresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Realiza lo necesario para comenzar a editar un egreso
|
||||
* Llama a esconder los mensajes de error.
|
||||
* Guarda globalmente en la clase el egreso que se esta editando, su id y una flag indicando que se esta en modo editar.
|
||||
* Ademas rellena los campos de input con los valores del egreso que se esta editando.
|
||||
* Realiza lo necesario para comenzar a editar un egreso Llama a esconder los mensajes de error.
|
||||
* Guarda globalmente en la clase el egreso que se esta editando, su id y una flag indicando que
|
||||
* se esta en modo editar. Ademas rellena los campos de input con los valores del egreso que se
|
||||
* esta editando.
|
||||
*/
|
||||
private void editarActionListener() {
|
||||
this.hideErrorMessages();
|
||||
|
||||
|
||||
int selectedID = this.view.getEgresosTable().getSelectedRow();
|
||||
int selectedModelID = this.view.getEgresosTable().getRowSorter().convertRowIndexToModel(selectedID);
|
||||
int selectedModelID = this.view.getEgresosTable().getRowSorter()
|
||||
.convertRowIndexToModel(selectedID);
|
||||
if (selectedModelID >= 0) {
|
||||
Egreso egreso = this.view.getEgresosTableModel().getEgreso(selectedModelID);
|
||||
|
||||
@@ -196,8 +199,8 @@ public class EgresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Cuando se tiene seleccionada una fila de la tabla activa los botones de eliminar y editar
|
||||
* Si no esta seleccionada los desactiva
|
||||
* Cuando se tiene seleccionada una fila de la tabla activa los botones de eliminar y editar Si no
|
||||
* esta seleccionada los desactiva
|
||||
*/
|
||||
private void updateButtonsEnabled() {
|
||||
if (this.view.getEgresosTable().getSelectedRow() >= 0) {
|
||||
@@ -210,10 +213,11 @@ public class EgresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Guarda un egreso tras llamar a validar su input
|
||||
* Luego de guardar, agrega el egreso a la tabla, llama a actualizar el total de egresos y llama a limpiar a los inputs
|
||||
* Guarda un egreso tras llamar a validar su input Luego de guardar, agrega el egreso a la tabla,
|
||||
* llama a actualizar el total de egresos y llama a limpiar a los inputs
|
||||
*/
|
||||
private void guardarEgreso(String nro, String descripcion, int valor, TipoEgreso tipo, Caja caja) {
|
||||
private void guardarEgreso(String nro, String descripcion, int valor, TipoEgreso tipo,
|
||||
Caja caja) {
|
||||
if (this.validateInput(nro, descripcion, tipo, caja)) {
|
||||
Egreso egreso = new Egreso();
|
||||
egreso.setValor(valor);
|
||||
@@ -229,9 +233,9 @@ public class EgresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Actualiza un egreso tras llamar a validar su input
|
||||
* Tras esto actualiza el egreso en la tabla, llama a actualizar el total de egresos y a limpiar los inputs
|
||||
* Finalmente setea la flag editing a false
|
||||
* Actualiza un egreso tras llamar a validar su input Tras esto actualiza el egreso en la tabla,
|
||||
* llama a actualizar el total de egresos y a limpiar los inputs Finalmente setea la flag editing
|
||||
* a false
|
||||
*/
|
||||
private void editarEgreso(String nro, String descripcion, int valor, TipoEgreso tipo, Caja caja) {
|
||||
if (this.validateInput(nro, descripcion, tipo, caja)) {
|
||||
@@ -263,10 +267,8 @@ public class EgresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Valida la variable nro contra los casos
|
||||
* - Es null
|
||||
* - Esta vacio
|
||||
* Cuando el primer caso sea true, colocara un mensaje de error correspondiente en el jlabel correspondiente
|
||||
* Valida la variable nro contra los casos - Es null - Esta vacio Cuando el primer caso sea true,
|
||||
* colocara un mensaje de error correspondiente en el jlabel correspondiente
|
||||
*
|
||||
* @return Si cualquiera de estos casos son true se retornara false, si no, se retorna true
|
||||
*/
|
||||
@@ -288,10 +290,8 @@ public class EgresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Valida la variable descripcion contra los casos
|
||||
* - Es null
|
||||
* - Esta vacio
|
||||
* Cuando el primer caso sea true, colocara un mensaje de error correspondiente en el jlabel correspondiente
|
||||
* Valida la variable descripcion contra los casos - Es null - Esta vacio Cuando el primer caso
|
||||
* sea true, colocara un mensaje de error correspondiente en el jlabel correspondiente
|
||||
*
|
||||
* @return Si cualquiera de estos casos son true se retornara false, si no, se retorna true
|
||||
*/
|
||||
@@ -311,9 +311,8 @@ public class EgresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Valida la variable tipoEgreso contra los casos
|
||||
* - Es null
|
||||
* Cuando este caso sea true, colocara un mensaje de error correspondiente en el jlabel correspondiente
|
||||
* Valida la variable tipoEgreso contra los casos - Es null Cuando este caso sea true, colocara un
|
||||
* mensaje de error correspondiente en el jlabel correspondiente
|
||||
*
|
||||
* @return Si este caso es true se retornara false, si no, se retorna true
|
||||
*/
|
||||
@@ -327,8 +326,7 @@ public class EgresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Valida la variable caja contra los casos
|
||||
* - Es null
|
||||
* Valida la variable caja contra los casos - Es null
|
||||
*
|
||||
* @return Si este caso es true se retornara false, si no, se retorna true
|
||||
*/
|
||||
@@ -373,6 +371,7 @@ public class EgresosController extends BaseController{
|
||||
}
|
||||
|
||||
private class GuardarAction extends AbstractAction {
|
||||
|
||||
EgresosController controller;
|
||||
|
||||
GuardarAction(EgresosController controller) {
|
||||
|
||||
@@ -11,12 +11,12 @@ import danielcortes.xyz.views.EstadoResultadoView;
|
||||
import danielcortes.xyz.views.dialogs.InformeGeneratedConfirmation;
|
||||
import danielcortes.xyz.views.dialogs.XLSFileChooser;
|
||||
import danielcortes.xyz.views.listeners.FocusLostListener;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.time.YearMonth;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
public class EstadoResultadoController extends BaseController {
|
||||
|
||||
private EstadoResultadoView view;
|
||||
private EstadoResultado estadoResultado;
|
||||
private YearMonth mes;
|
||||
@@ -38,41 +38,65 @@ public class EstadoResultadoController extends BaseController {
|
||||
this.setupUpdateViewEvents();
|
||||
this.setupMovementViewEvents();
|
||||
|
||||
this.view.getGuardarButton().addActionListener(e -> EstadoResultadoController.this.guardarListener());
|
||||
this.view.getExportarButton().addActionListener(e -> EstadoResultadoController.this.exportarListener());
|
||||
this.view.getGuardarButton()
|
||||
.addActionListener(e -> EstadoResultadoController.this.guardarListener());
|
||||
this.view.getExportarButton()
|
||||
.addActionListener(e -> EstadoResultadoController.this.exportarListener());
|
||||
}
|
||||
|
||||
private void setupUpdateViewEvents() {
|
||||
this.view.getGastosGeneralesCuentaCorrienteFactura().addFocusListener((FocusLostListener) e -> EstadoResultadoController.this.updateGastosGenerales());
|
||||
this.view.getGastosGeneralesCuentaCorrienteBoleta().addFocusListener((FocusLostListener) e -> EstadoResultadoController.this.updateGastosGenerales());
|
||||
this.view.getGastosGeneralesCuentaCorrienteSinRespaldo().addFocusListener((FocusLostListener) e -> EstadoResultadoController.this.updateGastosGenerales());
|
||||
this.view.getGastosGeneralesCuentaCorrienteFactura().addFocusListener(
|
||||
(FocusLostListener) e -> EstadoResultadoController.this.updateGastosGenerales());
|
||||
this.view.getGastosGeneralesCuentaCorrienteBoleta().addFocusListener(
|
||||
(FocusLostListener) e -> EstadoResultadoController.this.updateGastosGenerales());
|
||||
this.view.getGastosGeneralesCuentaCorrienteSinRespaldo().addFocusListener(
|
||||
(FocusLostListener) e -> EstadoResultadoController.this.updateGastosGenerales());
|
||||
|
||||
this.view.getServiciosAgua().addFocusListener((FocusLostListener) e -> EstadoResultadoController.this.updateServicios());
|
||||
this.view.getServiciosLuz().addFocusListener((FocusLostListener) e -> EstadoResultadoController.this.updateServicios());
|
||||
this.view.getServiciosGas().addFocusListener((FocusLostListener) e -> EstadoResultadoController.this.updateServicios());
|
||||
this.view.getServiciosTelefono().addFocusListener((FocusLostListener) e -> EstadoResultadoController.this.updateServicios());
|
||||
this.view.getServiciosOtro().addFocusListener((FocusLostListener) e -> EstadoResultadoController.this.updateServicios());
|
||||
this.view.getServiciosAgua().addFocusListener(
|
||||
(FocusLostListener) e -> EstadoResultadoController.this.updateServicios());
|
||||
this.view.getServiciosLuz().addFocusListener(
|
||||
(FocusLostListener) e -> EstadoResultadoController.this.updateServicios());
|
||||
this.view.getServiciosGas().addFocusListener(
|
||||
(FocusLostListener) e -> EstadoResultadoController.this.updateServicios());
|
||||
this.view.getServiciosTelefono().addFocusListener(
|
||||
(FocusLostListener) e -> EstadoResultadoController.this.updateServicios());
|
||||
this.view.getServiciosOtro().addFocusListener(
|
||||
(FocusLostListener) e -> EstadoResultadoController.this.updateServicios());
|
||||
|
||||
this.view.getGastosOperacionalesCostoVenta().addFocusListener((FocusLostListener) e -> EstadoResultadoController.this.updateGastosOperacionales());
|
||||
this.view.getGastosOperacionalesRemuneraciones().addFocusListener((FocusLostListener) e -> EstadoResultadoController.this.updateGastosOperacionales());
|
||||
this.view.getGastosOperacionalesFiniquitos().addFocusListener((FocusLostListener) e -> EstadoResultadoController.this.updateGastosOperacionales());
|
||||
this.view.getGastosOperacionalesAguinaldo().addFocusListener((FocusLostListener) e -> EstadoResultadoController.this.updateGastosOperacionales());
|
||||
this.view.getGastosOperacionalesBonos().addFocusListener((FocusLostListener) e -> EstadoResultadoController.this.updateGastosOperacionales());
|
||||
this.view.getGastosOperacionalesHonorariosContador().addFocusListener((FocusLostListener) e -> EstadoResultadoController.this.updateGastosOperacionales());
|
||||
this.view.getGastosOperacionalesArriendo().addFocusListener((FocusLostListener) e -> EstadoResultadoController.this.updateGastosOperacionales());
|
||||
this.view.getGastosOperacionalesCostoVenta().addFocusListener(
|
||||
(FocusLostListener) e -> EstadoResultadoController.this.updateGastosOperacionales());
|
||||
this.view.getGastosOperacionalesRemuneraciones().addFocusListener(
|
||||
(FocusLostListener) e -> EstadoResultadoController.this.updateGastosOperacionales());
|
||||
this.view.getGastosOperacionalesFiniquitos().addFocusListener(
|
||||
(FocusLostListener) e -> EstadoResultadoController.this.updateGastosOperacionales());
|
||||
this.view.getGastosOperacionalesAguinaldo().addFocusListener(
|
||||
(FocusLostListener) e -> EstadoResultadoController.this.updateGastosOperacionales());
|
||||
this.view.getGastosOperacionalesBonos().addFocusListener(
|
||||
(FocusLostListener) e -> EstadoResultadoController.this.updateGastosOperacionales());
|
||||
this.view.getGastosOperacionalesHonorariosContador().addFocusListener(
|
||||
(FocusLostListener) e -> EstadoResultadoController.this.updateGastosOperacionales());
|
||||
this.view.getGastosOperacionalesArriendo().addFocusListener(
|
||||
(FocusLostListener) e -> EstadoResultadoController.this.updateGastosOperacionales());
|
||||
|
||||
this.view.getResumenIVAFavor().addFocusListener((FocusLostListener) e -> EstadoResultadoController.this.updateResumen());
|
||||
this.view.getResumenPPM().addFocusListener((FocusLostListener) e -> EstadoResultadoController.this.updateResumen());
|
||||
this.view.getResumenIVAFavor()
|
||||
.addFocusListener((FocusLostListener) e -> EstadoResultadoController.this.updateResumen());
|
||||
this.view.getResumenPPM()
|
||||
.addFocusListener((FocusLostListener) e -> EstadoResultadoController.this.updateResumen());
|
||||
}
|
||||
|
||||
private void setupMovementViewEvents() {
|
||||
|
||||
moveTo(this.view.getGastosOperacionalesCostoVenta(), this.view.getGastosOperacionalesRemuneraciones());
|
||||
moveTo(this.view.getGastosOperacionalesRemuneraciones(), this.view.getGastosOperacionalesFiniquitos());
|
||||
moveTo(this.view.getGastosOperacionalesFiniquitos(), this.view.getGastosOperacionalesAguinaldo());
|
||||
moveTo(this.view.getGastosOperacionalesCostoVenta(),
|
||||
this.view.getGastosOperacionalesRemuneraciones());
|
||||
moveTo(this.view.getGastosOperacionalesRemuneraciones(),
|
||||
this.view.getGastosOperacionalesFiniquitos());
|
||||
moveTo(this.view.getGastosOperacionalesFiniquitos(),
|
||||
this.view.getGastosOperacionalesAguinaldo());
|
||||
moveTo(this.view.getGastosOperacionalesAguinaldo(), this.view.getGastosOperacionalesBonos());
|
||||
moveTo(this.view.getGastosOperacionalesBonos(), this.view.getGastosOperacionalesHonorariosContador());
|
||||
moveTo(this.view.getGastosOperacionalesHonorariosContador(), this.view.getGastosOperacionalesArriendo());
|
||||
moveTo(this.view.getGastosOperacionalesBonos(),
|
||||
this.view.getGastosOperacionalesHonorariosContador());
|
||||
moveTo(this.view.getGastosOperacionalesHonorariosContador(),
|
||||
this.view.getGastosOperacionalesArriendo());
|
||||
moveTo(this.view.getGastosOperacionalesArriendo(), this.view.getServiciosAgua());
|
||||
|
||||
moveTo(this.view.getServiciosAgua(), this.view.getServiciosLuz());
|
||||
@@ -81,8 +105,10 @@ public class EstadoResultadoController extends BaseController {
|
||||
moveTo(this.view.getServiciosTelefono(), this.view.getServiciosOtro());
|
||||
moveTo(this.view.getServiciosOtro(), this.view.getGastosGeneralesCuentaCorrienteFactura());
|
||||
|
||||
moveTo(this.view.getGastosGeneralesCuentaCorrienteFactura(), this.view.getGastosGeneralesCuentaCorrienteBoleta());
|
||||
moveTo(this.view.getGastosGeneralesCuentaCorrienteBoleta(), this.view.getGastosGeneralesCuentaCorrienteSinRespaldo());
|
||||
moveTo(this.view.getGastosGeneralesCuentaCorrienteFactura(),
|
||||
this.view.getGastosGeneralesCuentaCorrienteBoleta());
|
||||
moveTo(this.view.getGastosGeneralesCuentaCorrienteBoleta(),
|
||||
this.view.getGastosGeneralesCuentaCorrienteSinRespaldo());
|
||||
moveTo(this.view.getGastosGeneralesCuentaCorrienteSinRespaldo(), this.view.getResumenPPM());
|
||||
|
||||
moveTo(this.view.getResumenPPM(), this.view.getResumenIVAFavor());
|
||||
@@ -98,7 +124,8 @@ public class EstadoResultadoController extends BaseController {
|
||||
String formatedName = mes.format(formatter);
|
||||
String capitalized = StringUtils.capitalize(formatedName);
|
||||
|
||||
Path saveFile = new XLSFileChooser(Configuration.get("base_save_directory") + "Estado Resultado " + capitalized).execute();
|
||||
Path saveFile = new XLSFileChooser(
|
||||
Configuration.get("base_save_directory") + "Estado Resultado " + capitalized).execute();
|
||||
|
||||
if (saveFile == null) {
|
||||
return;
|
||||
@@ -140,17 +167,25 @@ public class EstadoResultadoController extends BaseController {
|
||||
}
|
||||
|
||||
private void fillGastosGenerales() {
|
||||
TipoEgreso facturaGastosGenerales = DAOManager.getTipoEgresoDAO().findByNombre("Factura Gastos Generales").get(0);
|
||||
TipoEgreso gastoGeneralConBoleta = DAOManager.getTipoEgresoDAO().findByNombre("Gasto General Con Boleta").get(0);
|
||||
TipoEgreso gastoGeneralSinRespaldo = DAOManager.getTipoEgresoDAO().findByNombre("Gasto General Sin Respaldo").get(0);
|
||||
TipoEgreso facturaGastosGenerales = DAOManager.getTipoEgresoDAO()
|
||||
.findByNombre("Factura Gastos Generales").get(0);
|
||||
TipoEgreso gastoGeneralConBoleta = DAOManager.getTipoEgresoDAO()
|
||||
.findByNombre("Gasto General Con Boleta").get(0);
|
||||
TipoEgreso gastoGeneralSinRespaldo = DAOManager.getTipoEgresoDAO()
|
||||
.findByNombre("Gasto General Sin Respaldo").get(0);
|
||||
|
||||
int cuentaCorrienteFactura = this.estadoResultado.getCuentaCorrienteFactura();
|
||||
int cuentaCorrienteBoleta = this.estadoResultado.getCuentaCorrienteBoleta();
|
||||
int cuentaCorrienteSinRespaldo = this.estadoResultado.getCuentaCorrienteSinRespaldo();
|
||||
int efectivoFacturaGastosGenerales = DAOManager.getEgresoDAO().getTotalEgresoMesPorTipo(this.mes, facturaGastosGenerales);
|
||||
int efectivoGastoGeneralConBoleta = DAOManager.getEgresoDAO().getTotalEgresoMesPorTipo(this.mes, gastoGeneralConBoleta);
|
||||
int efectivoGastoGeneralSinRespaldo = DAOManager.getEgresoDAO().getTotalEgresoMesPorTipo(this.mes, gastoGeneralSinRespaldo);
|
||||
int gastoTotal = efectivoFacturaGastosGenerales + efectivoGastoGeneralConBoleta + efectivoGastoGeneralSinRespaldo + cuentaCorrienteBoleta + cuentaCorrienteFactura + cuentaCorrienteSinRespaldo;
|
||||
int efectivoFacturaGastosGenerales = DAOManager.getEgresoDAO()
|
||||
.getTotalEgresoMesPorTipo(this.mes, facturaGastosGenerales);
|
||||
int efectivoGastoGeneralConBoleta = DAOManager.getEgresoDAO()
|
||||
.getTotalEgresoMesPorTipo(this.mes, gastoGeneralConBoleta);
|
||||
int efectivoGastoGeneralSinRespaldo = DAOManager.getEgresoDAO()
|
||||
.getTotalEgresoMesPorTipo(this.mes, gastoGeneralSinRespaldo);
|
||||
int gastoTotal = efectivoFacturaGastosGenerales + efectivoGastoGeneralConBoleta
|
||||
+ efectivoGastoGeneralSinRespaldo + cuentaCorrienteBoleta + cuentaCorrienteFactura
|
||||
+ cuentaCorrienteSinRespaldo;
|
||||
|
||||
this.view.getGastosGeneralesEfectivoFacturaField().setValue(efectivoFacturaGastosGenerales);
|
||||
this.view.getGastosGeneralesEfectivoBoletaField().setValue(efectivoGastoGeneralConBoleta);
|
||||
@@ -226,7 +261,8 @@ public class EstadoResultadoController extends BaseController {
|
||||
|
||||
int cuentaCorrienteFactura = this.view.getGastosGeneralesCuentaCorrienteFactura().getValue();
|
||||
int cuentaCorrienteBoleta = this.view.getGastosGeneralesCuentaCorrienteBoleta().getValue();
|
||||
int cuentaCorrienteSinRespaldo = this.view.getGastosGeneralesCuentaCorrienteSinRespaldo().getValue();
|
||||
int cuentaCorrienteSinRespaldo = this.view.getGastosGeneralesCuentaCorrienteSinRespaldo()
|
||||
.getValue();
|
||||
|
||||
this.estadoResultado.setCuentaCorrienteFactura(cuentaCorrienteFactura);
|
||||
this.estadoResultado.setCuentaCorrienteBoleta(cuentaCorrienteBoleta);
|
||||
@@ -299,7 +335,8 @@ public class EstadoResultadoController extends BaseController {
|
||||
this.estadoResultado.setArriendo(arriendo);
|
||||
|
||||
int total = oldTotal
|
||||
- (oldCostoVenta + oldRemuneraciones + oldFiniquitos + oldAguinaldo + oldBonos + oldHonorarios + oldArriendo)
|
||||
- (oldCostoVenta + oldRemuneraciones + oldFiniquitos + oldAguinaldo + oldBonos
|
||||
+ oldHonorarios + oldArriendo)
|
||||
+ (costoVenta + remuneraciones + finiquitos + aguinaldo + bonos + honorarios + arriendo);
|
||||
double porcentajeCostoVenta = (double) costoVenta / (double) ventaBruta * 100d;
|
||||
|
||||
@@ -325,7 +362,6 @@ public class EstadoResultadoController extends BaseController {
|
||||
int aPagar = IVAPPM - ivaFavor;
|
||||
int resultado = utilidad - aPagar;
|
||||
|
||||
|
||||
this.view.getResumenUtilidad().setValue(utilidad);
|
||||
this.view.getResumenPPMMes().setValue(ppmMes);
|
||||
this.view.getResumenIVAMes().setValue(iva);
|
||||
|
||||
@@ -34,12 +34,12 @@ import danielcortes.xyz.views.dialogs.InformeGeneratedConfirmation;
|
||||
import danielcortes.xyz.views.dialogs.MonthSelectDialog;
|
||||
import danielcortes.xyz.views.dialogs.TipoEgresoSelectDialog;
|
||||
import danielcortes.xyz.views.dialogs.XLSFileChooser;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.time.YearMonth;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
public class InformesSideBarController {
|
||||
|
||||
private InformesSideBar view;
|
||||
|
||||
public InformesSideBarController(InformesSideBar view) {
|
||||
@@ -52,8 +52,10 @@ public class InformesSideBarController {
|
||||
}
|
||||
|
||||
private void setupViewEvents() {
|
||||
this.view.getInformeLibroDeVentasButton().addActionListener(e -> generarInformeLibroDeVentasListener());
|
||||
this.view.getGenerarEgresosFacturasMateriaPrimaButton().addActionListener(e -> generarInformeEgresosListener());
|
||||
this.view.getInformeLibroDeVentasButton()
|
||||
.addActionListener(e -> generarInformeLibroDeVentasListener());
|
||||
this.view.getGenerarEgresosFacturasMateriaPrimaButton()
|
||||
.addActionListener(e -> generarInformeEgresosListener());
|
||||
}
|
||||
|
||||
private void generarInformeLibroDeVentasListener() {
|
||||
@@ -66,7 +68,8 @@ public class InformesSideBarController {
|
||||
String formatedName = month.format(formatter);
|
||||
String capitalized = StringUtils.capitalize(formatedName);
|
||||
|
||||
Path saveFile = new XLSFileChooser(Configuration.get("base_save_directory") + "Libro " + capitalized).execute();
|
||||
Path saveFile = new XLSFileChooser(
|
||||
Configuration.get("base_save_directory") + "Libro " + capitalized).execute();
|
||||
|
||||
if (saveFile == null) {
|
||||
return;
|
||||
@@ -92,7 +95,9 @@ public class InformesSideBarController {
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MMMM YYYY");
|
||||
String formatedMonth = month.format(formatter);
|
||||
|
||||
Path saveFile = new XLSFileChooser("Informe Egresos - " + tipoEgreso.getNombre() + " - " + StringUtils.capitalize(formatedMonth)).execute();
|
||||
Path saveFile = new XLSFileChooser(
|
||||
"Informe Egresos - " + tipoEgreso.getNombre() + " - " + StringUtils
|
||||
.capitalize(formatedMonth)).execute();
|
||||
if (saveFile == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -31,17 +31,21 @@ import danielcortes.xyz.models.tipo_ingreso.TipoIngreso;
|
||||
import danielcortes.xyz.models.tipo_ingreso.TipoIngresoToStringWrapper;
|
||||
import danielcortes.xyz.views.IngresosView;
|
||||
import danielcortes.xyz.views.components.table_model.IngresosTableModel;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.KeyStroke;
|
||||
|
||||
/**
|
||||
* Controlador el cual esta orientado a manejar la vista de IngresosView
|
||||
* Maneja su contenido y las acciones que esta realiza
|
||||
* Controlador el cual esta orientado a manejar la vista de IngresosView Maneja su contenido y las
|
||||
* acciones que esta realiza
|
||||
*/
|
||||
public class IngresosController extends BaseController {
|
||||
|
||||
private IngresosView view;
|
||||
private Caja caja;
|
||||
|
||||
@@ -50,11 +54,10 @@ public class IngresosController extends BaseController{
|
||||
private boolean editing;
|
||||
|
||||
/**
|
||||
* Crea el controlado de egresos, el cual esta acoplado con la vista de ingresos, controlando el estado y contenido de esta.
|
||||
* Al iniciarse ejecuta.
|
||||
* - Metodo que llena el combobox de tipos de ingreso
|
||||
* - Metodo que genera los eventos para la vista
|
||||
* - Metodo que actualiza el estado de los botones
|
||||
* Crea el controlado de egresos, el cual esta acoplado con la vista de ingresos, controlando el
|
||||
* estado y contenido de esta. Al iniciarse ejecuta. - Metodo que llena el combobox de tipos de
|
||||
* ingreso - Metodo que genera los eventos para la vista - Metodo que actualiza el estado de los
|
||||
* botones
|
||||
*/
|
||||
public IngresosController(IngresosView view) {
|
||||
this.view = view;
|
||||
@@ -65,7 +68,8 @@ public class IngresosController extends BaseController{
|
||||
|
||||
|
||||
/**
|
||||
* Guarda la caja ingresada y actualiza el contenido de la tabla de ingresos y el campo de total de ingresos
|
||||
* Guarda la caja ingresada y actualiza el contenido de la tabla de ingresos y el campo de total
|
||||
* de ingresos
|
||||
*/
|
||||
public void updateCaja(Caja caja) {
|
||||
this.caja = caja;
|
||||
@@ -95,12 +99,12 @@ public class IngresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Genera los eventos para los distintos componentes de la vista
|
||||
* - Cuando se presiona el boton de guardar o se apreta enter en los fields de valor, nro inicial,
|
||||
* nro final y tipo se llama a guardarActionListener
|
||||
* - Cuando se presiona el boton de eliminar se llama al eliminarActionListener
|
||||
* - Cuando se selecciona una fila en la tabla se llama a updateButtonsEnabled
|
||||
* - Cuando se presiona el boton de editar o se hace doble click sobre una fila de la tabla se llama a editarActionListener
|
||||
* Genera los eventos para los distintos componentes de la vista - Cuando se presiona el boton de
|
||||
* guardar o se apreta enter en los fields de valor, nro inicial, nro final y tipo se llama a
|
||||
* guardarActionListener - Cuando se presiona el boton de eliminar se llama al
|
||||
* eliminarActionListener - Cuando se selecciona una fila en la tabla se llama a
|
||||
* updateButtonsEnabled - Cuando se presiona el boton de editar o se hace doble click sobre una
|
||||
* fila de la tabla se llama a editarActionListener
|
||||
*/
|
||||
private void setupViewEvents() {
|
||||
moveTo(this.view.getValorField(), this.view.getNroZInicialField());
|
||||
@@ -108,9 +112,11 @@ public class IngresosController extends BaseController{
|
||||
moveTo(this.view.getNroZFinalField(), this.view.getNroInicialField());
|
||||
moveTo(this.view.getNroInicialField(), this.view.getNroFinalField());
|
||||
moveTo(this.view.getNroFinalField(), this.view.getTipoCombo());
|
||||
doAction(this.view.getTipoCombo(), "save", KeyStroke.getKeyStroke("ENTER"), e ->this.guardarActionListener());
|
||||
doAction(this.view.getTipoCombo(), "save", KeyStroke.getKeyStroke("ENTER"),
|
||||
e -> this.guardarActionListener());
|
||||
|
||||
this.view.getIngresosTable().getSelectionModel().addListSelectionListener(e -> updateButtonsEnabled());
|
||||
this.view.getIngresosTable().getSelectionModel()
|
||||
.addListSelectionListener(e -> updateButtonsEnabled());
|
||||
this.view.getGuardarButton().addActionListener(e -> guardarActionListener());
|
||||
this.view.getEliminarButton().addActionListener(e -> eliminarActionListener());
|
||||
this.view.getEditarButton().addActionListener(e -> editarActionListener());
|
||||
@@ -126,10 +132,9 @@ public class IngresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Realiza las preparaciones previas a guardar un ingreso
|
||||
* Primero llama a normalizar los inputs y a esconder los mensajes de error
|
||||
* Luego dependiendo si se tiene la flag editing en true o false se llama a editar ingreso o a guardarlo
|
||||
* Tras terminar esto se llama a resetear el focus.
|
||||
* Realiza las preparaciones previas a guardar un ingreso Primero llama a normalizar los inputs y
|
||||
* a esconder los mensajes de error Luego dependiendo si se tiene la flag editing en true o false
|
||||
* se llama a editar ingreso o a guardarlo Tras terminar esto se llama a resetear el focus.
|
||||
*/
|
||||
private void guardarActionListener() {
|
||||
this.normalizeInputs();
|
||||
@@ -143,17 +148,19 @@ public class IngresosController extends BaseController{
|
||||
TipoIngreso tipoIngreso = (TipoIngreso) this.view.getTipoCombo().getSelectedItem();
|
||||
|
||||
if (editing) {
|
||||
this.editarIngreso(valor, nroZInicial, nroZFinal, nroInicial, nroFinal, tipoIngreso, this.caja);
|
||||
this.editarIngreso(valor, nroZInicial, nroZFinal, nroInicial, nroFinal, tipoIngreso,
|
||||
this.caja);
|
||||
} else {
|
||||
this.guardarIngreso(valor, nroZInicial, nroZFinal, nroInicial, nroFinal, tipoIngreso, this.caja);
|
||||
this.guardarIngreso(valor, nroZInicial, nroZFinal, nroInicial, nroFinal, tipoIngreso,
|
||||
this.caja);
|
||||
}
|
||||
this.resetFocus();
|
||||
}
|
||||
|
||||
/**
|
||||
* Realiza las acciones necesarias para eliminar un ingreso
|
||||
* Solo lo va a realizar si es que esta seleccionada una fila de la tabla, se eliminara el ingreso seleccionado
|
||||
* Una vez eliminado se llama a actualizar el total de ingresos y el estado de los botones
|
||||
* Realiza las acciones necesarias para eliminar un ingreso Solo lo va a realizar si es que esta
|
||||
* seleccionada una fila de la tabla, se eliminara el ingreso seleccionado Una vez eliminado se
|
||||
* llama a actualizar el total de ingresos y el estado de los botones
|
||||
*/
|
||||
private void eliminarActionListener() {
|
||||
int selectedId = this.view.getIngresosTable().getSelectedRow();
|
||||
@@ -168,16 +175,17 @@ public class IngresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Realiza las preparaciones previas a editar un ingreso
|
||||
* Primero llama a esconder los mensajes de error.
|
||||
* Guarda globlarmente el ingreso a ser editar, el id de este y una flag que indica que se esta en modo de editar.
|
||||
* Finalmente llena los campos de inputs con los datos del ingreso a editar.
|
||||
* Realiza las preparaciones previas a editar un ingreso Primero llama a esconder los mensajes de
|
||||
* error. Guarda globlarmente el ingreso a ser editar, el id de este y una flag que indica que se
|
||||
* esta en modo de editar. Finalmente llena los campos de inputs con los datos del ingreso a
|
||||
* editar.
|
||||
*/
|
||||
private void editarActionListener() {
|
||||
this.hideErrorMessages();
|
||||
|
||||
int selectedID = this.view.getIngresosTable().getSelectedRow();
|
||||
int selectedModelID = this.view.getIngresosTable().getRowSorter().convertRowIndexToModel(selectedID);
|
||||
int selectedModelID = this.view.getIngresosTable().getRowSorter()
|
||||
.convertRowIndexToModel(selectedID);
|
||||
if (selectedModelID >= 0) {
|
||||
Ingreso ingreso = this.view.getIngresosTableModel().getIngreso(selectedModelID);
|
||||
|
||||
@@ -203,9 +211,8 @@ public class IngresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Actualiza si los botones estan habilitados
|
||||
* Esto depende de si se encuentra al menos una fila en la tabla seleccionada
|
||||
* Si es asi, son habilidatos, si no, de deshabilitan
|
||||
* Actualiza si los botones estan habilitados Esto depende de si se encuentra al menos una fila en
|
||||
* la tabla seleccionada Si es asi, son habilidatos, si no, de deshabilitan
|
||||
*/
|
||||
private void updateButtonsEnabled() {
|
||||
if (this.view.getIngresosTable().getSelectedRow() >= 0) {
|
||||
@@ -218,10 +225,11 @@ public class IngresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Guarda un ingreso tras llamar a validar el input
|
||||
* Luego de guardar agrega a la tabla el ingreso, llama a limpiar los campos de input y a actualizar el total de ingresos
|
||||
* Guarda un ingreso tras llamar a validar el input Luego de guardar agrega a la tabla el ingreso,
|
||||
* llama a limpiar los campos de input y a actualizar el total de ingresos
|
||||
*/
|
||||
private void guardarIngreso(int valor, String nroZInicial, String nroZFinal, String nroInicial, String nroFinal, TipoIngreso tipoIngreso, Caja caja) {
|
||||
private void guardarIngreso(int valor, String nroZInicial, String nroZFinal, String nroInicial,
|
||||
String nroFinal, TipoIngreso tipoIngreso, Caja caja) {
|
||||
if (this.validateInput(nroZInicial, nroZFinal, nroInicial, nroFinal, tipoIngreso, caja)) {
|
||||
Ingreso ingreso = new Ingreso();
|
||||
ingreso.setTipoIngreso(tipoIngreso);
|
||||
@@ -241,10 +249,12 @@ public class IngresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Edita el ingreso tras llamar a validar el input
|
||||
* Tras esto actualiza el ingreso en la tabla, llama a actualizar el total de ingresos, a limpiar los campos de input y a desactivar la flag de editing.
|
||||
* Edita el ingreso tras llamar a validar el input Tras esto actualiza el ingreso en la tabla,
|
||||
* llama a actualizar el total de ingresos, a limpiar los campos de input y a desactivar la flag
|
||||
* de editing.
|
||||
*/
|
||||
private void editarIngreso(int valor, String nroZInicial, String nroZFinal, String nroInicial, String nroFinal, TipoIngreso tipoIngreso, Caja caja) {
|
||||
private void editarIngreso(int valor, String nroZInicial, String nroZFinal, String nroInicial,
|
||||
String nroFinal, TipoIngreso tipoIngreso, Caja caja) {
|
||||
if (this.validateInput(nroZInicial, nroZFinal, nroInicial, nroFinal, tipoIngreso, caja)) {
|
||||
this.editingIngreso.setTipoIngreso(tipoIngreso);
|
||||
this.editingIngreso.setValor(valor);
|
||||
@@ -265,7 +275,8 @@ public class IngresosController extends BaseController{
|
||||
*
|
||||
* @return true cuando todas las validaciones retoran true, si no, false
|
||||
*/
|
||||
private boolean validateInput(String nroZInicial, String nroZFinal, String nroInicial, String nroFinal, TipoIngreso tipoIngreso, Caja caja) {
|
||||
private boolean validateInput(String nroZInicial, String nroZFinal, String nroInicial,
|
||||
String nroFinal, TipoIngreso tipoIngreso, Caja caja) {
|
||||
this.hideErrorMessages();
|
||||
|
||||
boolean nroInicialValidation = this.validateNroInicial(nroInicial);
|
||||
@@ -277,8 +288,7 @@ public class IngresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Valida la variable caja este caso
|
||||
* - Es null
|
||||
* Valida la variable caja este caso - Es null
|
||||
*
|
||||
* @return Si este caso es true se retornara false, si no, se retorna true
|
||||
*/
|
||||
@@ -287,10 +297,8 @@ public class IngresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Valida la variable nroInicial contra los casos
|
||||
* - Es null
|
||||
* - Esta vacio
|
||||
* Cuando el primer caso sea true, colocara un mensaje de error correspondiente en el jlabel correspondiente
|
||||
* Valida la variable nroInicial contra los casos - Es null - Esta vacio Cuando el primer caso sea
|
||||
* true, colocara un mensaje de error correspondiente en el jlabel correspondiente
|
||||
*
|
||||
* @return Si cualquiera de estos casos son true se retornara false, si no, se retorna true
|
||||
*/
|
||||
@@ -310,10 +318,8 @@ public class IngresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Valida la variable nroFinal contra los casos
|
||||
* - Es null
|
||||
* - Esta vacio
|
||||
* Cuando el primer caso sea true, colocara un mensaje de error correspondiente en el jlabel correspondiente
|
||||
* Valida la variable nroFinal contra los casos - Es null - Esta vacio Cuando el primer caso sea
|
||||
* true, colocara un mensaje de error correspondiente en el jlabel correspondiente
|
||||
*
|
||||
* @return Si cualquiera de estos casos son true se retornara false, si no, se retorna true
|
||||
*/
|
||||
@@ -333,9 +339,8 @@ public class IngresosController extends BaseController{
|
||||
}
|
||||
|
||||
/**
|
||||
* Valida la variable caja este caso
|
||||
* - Es null
|
||||
* Cuando sea true, colocara un mensaje de error en el jlabel correspondiente
|
||||
* Valida la variable caja este caso - Es null Cuando sea true, colocara un mensaje de error en el
|
||||
* jlabel correspondiente
|
||||
*
|
||||
* @return Si este caso es true se retornara false, si no, se retorna true
|
||||
*/
|
||||
@@ -388,6 +393,7 @@ public class IngresosController extends BaseController{
|
||||
}
|
||||
|
||||
private class NextAction extends AbstractAction {
|
||||
|
||||
JComponent next;
|
||||
|
||||
NextAction(JComponent next) {
|
||||
@@ -401,6 +407,7 @@ public class IngresosController extends BaseController{
|
||||
}
|
||||
|
||||
private class GuardarAction extends AbstractAction {
|
||||
|
||||
IngresosController controller;
|
||||
|
||||
GuardarAction(IngresosController controller) {
|
||||
|
||||
@@ -2,10 +2,10 @@ package danielcortes.xyz.controllers;
|
||||
|
||||
import danielcortes.xyz.data.Configuration;
|
||||
import danielcortes.xyz.views.MainSideBar;
|
||||
|
||||
import javax.swing.border.TitledBorder;
|
||||
|
||||
public class MainSideBarController {
|
||||
|
||||
private MainSideBar view;
|
||||
|
||||
public MainSideBarController(MainSideBar view) {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package danielcortes.xyz.controllers.actions;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import javax.swing.Action;
|
||||
|
||||
public interface BasicAction extends Action {
|
||||
|
||||
@Override
|
||||
default Object getValue(String key) {
|
||||
return null;
|
||||
@@ -15,12 +16,12 @@ public interface BasicAction extends Action {
|
||||
}
|
||||
|
||||
@Override
|
||||
default void setEnabled(boolean b) {
|
||||
default boolean isEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
default boolean isEnabled() {
|
||||
return true;
|
||||
default void setEnabled(boolean b) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,10 +24,12 @@
|
||||
|
||||
package danielcortes.xyz.controllers.actions;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.JComponent;
|
||||
|
||||
public class MoveToAction extends AbstractAction {
|
||||
|
||||
private JComponent next;
|
||||
|
||||
public MoveToAction(JComponent next) {
|
||||
|
||||
@@ -31,6 +31,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class Configuration {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(Configuration.class.getName());
|
||||
|
||||
private static final Properties config;
|
||||
|
||||
@@ -28,5 +28,6 @@ import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public interface ConnectionHolder {
|
||||
|
||||
Connection getConnection() throws SQLException;
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ 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;
|
||||
|
||||
@@ -31,6 +31,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class SQLiteConnectionHolder implements ConnectionHolder {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(Configuration.class.getName());
|
||||
|
||||
|
||||
|
||||
@@ -28,11 +28,6 @@ import danielcortes.xyz.models.caja.SQLiteCajaDAO;
|
||||
import danielcortes.xyz.models.informes.egresos.InformeEgresosContent;
|
||||
import danielcortes.xyz.models.informes.egresos.SQLiteInformeEgresosContentDAO;
|
||||
import danielcortes.xyz.utils.Pair;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.ss.util.PropertyTemplate;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.file.Files;
|
||||
@@ -43,8 +38,24 @@ import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.BorderExtent;
|
||||
import org.apache.poi.ss.usermodel.BorderStyle;
|
||||
import org.apache.poi.ss.usermodel.CellStyle;
|
||||
import org.apache.poi.ss.usermodel.CreationHelper;
|
||||
import org.apache.poi.ss.usermodel.FillPatternType;
|
||||
import org.apache.poi.ss.usermodel.Font;
|
||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||
import org.apache.poi.ss.usermodel.IndexedColors;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.VerticalAlignment;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.ss.util.PropertyTemplate;
|
||||
|
||||
public class InformeEgresos {
|
||||
|
||||
private final String[] titles = {
|
||||
"FECHA",
|
||||
"N°",
|
||||
@@ -72,7 +83,8 @@ public class InformeEgresos {
|
||||
|
||||
public InformeEgresos(int tipoEgresoId, YearMonth mes, Path saveFile) {
|
||||
new SQLiteCajaDAO().createCajasForMonth(mes);
|
||||
this.informe = new SQLiteInformeEgresosContentDAO().getInformeEgresosFactuasMateriaPrima(mes, tipoEgresoId);
|
||||
this.informe = new SQLiteInformeEgresosContentDAO()
|
||||
.getInformeEgresosFactuasMateriaPrima(mes, tipoEgresoId);
|
||||
this.saveFile = saveFile;
|
||||
|
||||
this.wb = new HSSFWorkbook();
|
||||
@@ -112,7 +124,8 @@ public class InformeEgresos {
|
||||
dataRow.createCell(cellCounter).setCellValue(data.getValor());
|
||||
|
||||
// Comprueba si es que el siguiente elemento en la lista de informe es del siguiente dia, si es asi, agrega una linea con los totales diarios.
|
||||
if (informeID + 1 >= informe.size() || !data.getFecha().equals(informe.get(informeID + 1).getFecha())) {
|
||||
if (informeID + 1 >= informe.size() || !data.getFecha()
|
||||
.equals(informe.get(informeID + 1).getFecha())) {
|
||||
totalRows.add(sheet.createRow(rowCounter + 1));
|
||||
|
||||
dayEnd = rowCounter;
|
||||
@@ -134,7 +147,8 @@ public class InformeEgresos {
|
||||
Pair<Integer, Integer> range = totalRange.get(x);
|
||||
|
||||
row.createCell(2).setCellValue("TOTAL DIARIO");
|
||||
row.createCell(3).setCellFormula("SUM(D" + (range.getLeft() + 1) + ":D" + (range.getRight() + 1) + ")");
|
||||
row.createCell(3)
|
||||
.setCellFormula("SUM(D" + (range.getLeft() + 1) + ":D" + (range.getRight() + 1) + ")");
|
||||
|
||||
sumTotalFinal.append("D").append(row.getRowNum() + 1);
|
||||
if (x + 1 != totalRows.size()) {
|
||||
@@ -167,12 +181,17 @@ public class InformeEgresos {
|
||||
for (Row row : this.totalRows) {
|
||||
int index = row.getRowNum();
|
||||
pt.drawBorders(new CellRangeAddress(index, index, 0, 3), BorderStyle.NONE, BorderExtent.ALL);
|
||||
pt.drawBorders(new CellRangeAddress(index, index, 0, 3), BorderStyle.MEDIUM, BorderExtent.OUTSIDE);
|
||||
pt.drawBorders(new CellRangeAddress(index, index, 0, 3), BorderStyle.MEDIUM,
|
||||
BorderExtent.OUTSIDE);
|
||||
}
|
||||
|
||||
//Borde del Total Final
|
||||
pt.drawBorders(new CellRangeAddress(this.totalFinal.getRowNum(), this.totalFinal.getRowNum(), 0, 3), BorderStyle.NONE, BorderExtent.ALL);
|
||||
pt.drawBorders(new CellRangeAddress(this.totalFinal.getRowNum(), this.totalFinal.getRowNum(), 0, 3), BorderStyle.MEDIUM, BorderExtent.OUTSIDE);
|
||||
pt.drawBorders(
|
||||
new CellRangeAddress(this.totalFinal.getRowNum(), this.totalFinal.getRowNum(), 0, 3),
|
||||
BorderStyle.NONE, BorderExtent.ALL);
|
||||
pt.drawBorders(
|
||||
new CellRangeAddress(this.totalFinal.getRowNum(), this.totalFinal.getRowNum(), 0, 3),
|
||||
BorderStyle.MEDIUM, BorderExtent.OUTSIDE);
|
||||
|
||||
//Borde externo
|
||||
pt.drawBorders(new CellRangeAddress(0, rows, 0, 3), BorderStyle.MEDIUM, BorderExtent.OUTSIDE);
|
||||
@@ -188,9 +207,12 @@ public class InformeEgresos {
|
||||
this.sheet.getRow(0).getCell(3).setCellStyle(this.styles.get("header"));
|
||||
|
||||
//Estilo para el Total Final
|
||||
this.totalFinal.getCell(0, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).setCellStyle(this.styles.get("gray"));
|
||||
this.totalFinal.getCell(1, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).setCellStyle(this.styles.get("gray"));
|
||||
this.totalFinal.getCell(2, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).setCellStyle(this.styles.get("gray"));
|
||||
this.totalFinal.getCell(0, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK)
|
||||
.setCellStyle(this.styles.get("gray"));
|
||||
this.totalFinal.getCell(1, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK)
|
||||
.setCellStyle(this.styles.get("gray"));
|
||||
this.totalFinal.getCell(2, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK)
|
||||
.setCellStyle(this.styles.get("gray"));
|
||||
this.totalFinal.getCell(3).setCellStyle(this.styles.get("total_final"));
|
||||
|
||||
//Estilo para las filas de datos
|
||||
@@ -203,13 +225,16 @@ public class InformeEgresos {
|
||||
|
||||
//Estilo para las filas de totales
|
||||
for (Row row : this.totalRows) {
|
||||
row.getCell(0, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).setCellStyle(this.styles.get("not_so_gray"));
|
||||
row.getCell(1, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).setCellStyle(this.styles.get("not_so_gray"));
|
||||
row.getCell(2, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).setCellStyle(this.styles.get("not_so_gray"));
|
||||
row.getCell(3, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).setCellStyle(this.styles.get("total"));
|
||||
row.getCell(0, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK)
|
||||
.setCellStyle(this.styles.get("not_so_gray"));
|
||||
row.getCell(1, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK)
|
||||
.setCellStyle(this.styles.get("not_so_gray"));
|
||||
row.getCell(2, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK)
|
||||
.setCellStyle(this.styles.get("not_so_gray"));
|
||||
row.getCell(3, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK)
|
||||
.setCellStyle(this.styles.get("total"));
|
||||
}
|
||||
|
||||
|
||||
//Setea el alto de las filas
|
||||
this.sheet.getRow(0).setHeightInPoints(30);
|
||||
this.totalFinal.setHeightInPoints(20);
|
||||
@@ -220,7 +245,6 @@ public class InformeEgresos {
|
||||
row.setHeightInPoints(18);
|
||||
}
|
||||
|
||||
|
||||
//Setea el ancho de las columnas
|
||||
sheet.autoSizeColumn(0);
|
||||
sheet.autoSizeColumn(1);
|
||||
@@ -251,7 +275,8 @@ public class InformeEgresos {
|
||||
dateStyle.setDataFormat(this.createHelper.createDataFormat().getFormat("dd/mm/yyyy"));
|
||||
|
||||
CellStyle moneyStyle = this.wb.createCellStyle();
|
||||
moneyStyle.setDataFormat(this.createHelper.createDataFormat().getFormat("\"$\"#,##0_);(\"$\"#,##0)"));
|
||||
moneyStyle
|
||||
.setDataFormat(this.createHelper.createDataFormat().getFormat("\"$\"#,##0_);(\"$\"#,##0)"));
|
||||
|
||||
CellStyle headerStyle = this.wb.createCellStyle();
|
||||
headerStyle.cloneStyleFrom(grayStyle);
|
||||
@@ -259,11 +284,13 @@ public class InformeEgresos {
|
||||
|
||||
CellStyle totalStyle = this.wb.createCellStyle();
|
||||
totalStyle.cloneStyleFrom(notSoGrayStyle);
|
||||
totalStyle.setDataFormat(this.createHelper.createDataFormat().getFormat("\"$\"#,##0_);(\"$\"#,##0)"));
|
||||
totalStyle
|
||||
.setDataFormat(this.createHelper.createDataFormat().getFormat("\"$\"#,##0_);(\"$\"#,##0)"));
|
||||
|
||||
CellStyle totalFinalStyle = this.wb.createCellStyle();
|
||||
totalFinalStyle.cloneStyleFrom(grayStyle);
|
||||
totalFinalStyle.setDataFormat(this.createHelper.createDataFormat().getFormat("\"$\"#,##0_);(\"$\"#,##0)"));
|
||||
totalFinalStyle
|
||||
.setDataFormat(this.createHelper.createDataFormat().getFormat("\"$\"#,##0_);(\"$\"#,##0)"));
|
||||
|
||||
HashMap<String, CellStyle> styles = new HashMap<>();
|
||||
styles.put("regular", regularStyle);
|
||||
|
||||
@@ -5,11 +5,6 @@ import danielcortes.xyz.data.DAOManager;
|
||||
import danielcortes.xyz.models.estado_resultado.EstadoResultado;
|
||||
import danielcortes.xyz.models.tipo_egreso.TipoEgreso;
|
||||
import danielcortes.xyz.utils.StringUtils;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.ss.util.PropertyTemplate;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.file.Files;
|
||||
@@ -18,8 +13,23 @@ import java.time.YearMonth;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.BorderExtent;
|
||||
import org.apache.poi.ss.usermodel.BorderStyle;
|
||||
import org.apache.poi.ss.usermodel.CellStyle;
|
||||
import org.apache.poi.ss.usermodel.CreationHelper;
|
||||
import org.apache.poi.ss.usermodel.FillPatternType;
|
||||
import org.apache.poi.ss.usermodel.Font;
|
||||
import org.apache.poi.ss.usermodel.IndexedColors;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.VerticalAlignment;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.ss.util.PropertyTemplate;
|
||||
|
||||
public class InformeEstadoResultado {
|
||||
|
||||
private ArrayList<Row> titles;
|
||||
private ArrayList<Row> headers;
|
||||
private ArrayList<Row> footers;
|
||||
@@ -160,7 +170,8 @@ public class InformeEstadoResultado {
|
||||
aguinaldo.createCell(1).setCellValue(this.estadoResultado.getAguinaldo());
|
||||
|
||||
partime.createCell(0).setCellValue("Partime");
|
||||
partime.createCell(1).setCellValue(DAOManager.getEgresoDAO().getTotalEgresoMesPorTipo(this.mes, DAOManager.getTipoEgresoDAO().findByNombre("Pago Partime").get(0)));
|
||||
partime.createCell(1).setCellValue(DAOManager.getEgresoDAO().getTotalEgresoMesPorTipo(this.mes,
|
||||
DAOManager.getTipoEgresoDAO().findByNombre("Pago Partime").get(0)));
|
||||
|
||||
bonosPersonal.createCell(0).setCellValue("Bonos Personal");
|
||||
bonosPersonal.createCell(1).setCellValue(this.estadoResultado.getBonosPersonal());
|
||||
@@ -210,9 +221,12 @@ public class InformeEstadoResultado {
|
||||
}
|
||||
|
||||
private void fillGastosGeneralesData() {
|
||||
TipoEgreso facturaGastosGenerales = DAOManager.getTipoEgresoDAO().findByNombre("Factura Gastos Generales").get(0);
|
||||
TipoEgreso gastoGeneralConBoleta = DAOManager.getTipoEgresoDAO().findByNombre("Gasto General Con Boleta").get(0);
|
||||
TipoEgreso gastoGeneralSinRespaldo = DAOManager.getTipoEgresoDAO().findByNombre("Gasto General Sin Respaldo").get(0);
|
||||
TipoEgreso facturaGastosGenerales = DAOManager.getTipoEgresoDAO()
|
||||
.findByNombre("Factura Gastos Generales").get(0);
|
||||
TipoEgreso gastoGeneralConBoleta = DAOManager.getTipoEgresoDAO()
|
||||
.findByNombre("Gasto General Con Boleta").get(0);
|
||||
TipoEgreso gastoGeneralSinRespaldo = DAOManager.getTipoEgresoDAO()
|
||||
.findByNombre("Gasto General Sin Respaldo").get(0);
|
||||
|
||||
int startId = 29;
|
||||
|
||||
@@ -237,17 +251,23 @@ public class InformeEstadoResultado {
|
||||
header.createCell(0).setCellValue("Gastos Generales");
|
||||
header.createCell(1);
|
||||
cuentaCorrienteFactura.createCell(0).setCellValue("CTA CTE con Factura");
|
||||
cuentaCorrienteFactura.createCell(1).setCellValue(this.estadoResultado.getCuentaCorrienteFactura());
|
||||
cuentaCorrienteFactura.createCell(1)
|
||||
.setCellValue(this.estadoResultado.getCuentaCorrienteFactura());
|
||||
cuentaCorrienteBoleta.createCell(0).setCellValue("CTA CTE con Boleta");
|
||||
cuentaCorrienteBoleta.createCell(1).setCellValue(this.estadoResultado.getCuentaCorrienteBoleta());
|
||||
cuentaCorrienteBoleta.createCell(1)
|
||||
.setCellValue(this.estadoResultado.getCuentaCorrienteBoleta());
|
||||
cuentaCorrienteSinRespaldo.createCell(0).setCellValue("CTA CTE sin Respaldo");
|
||||
cuentaCorrienteSinRespaldo.createCell(1).setCellValue(this.estadoResultado.getCuentaCorrienteSinRespaldo());
|
||||
cuentaCorrienteSinRespaldo.createCell(1)
|
||||
.setCellValue(this.estadoResultado.getCuentaCorrienteSinRespaldo());
|
||||
efectivoFactura.createCell(0).setCellValue("Efectivo con Factura");
|
||||
efectivoFactura.createCell(1).setCellValue(DAOManager.getEgresoDAO().getTotalEgresoMesPorTipo(this.mes, facturaGastosGenerales));
|
||||
efectivoFactura.createCell(1).setCellValue(
|
||||
DAOManager.getEgresoDAO().getTotalEgresoMesPorTipo(this.mes, facturaGastosGenerales));
|
||||
efectivoBoleta.createCell(0).setCellValue("Efectivo con Boleta");
|
||||
efectivoBoleta.createCell(1).setCellValue(DAOManager.getEgresoDAO().getTotalEgresoMesPorTipo(this.mes, gastoGeneralConBoleta));
|
||||
efectivoBoleta.createCell(1).setCellValue(
|
||||
DAOManager.getEgresoDAO().getTotalEgresoMesPorTipo(this.mes, gastoGeneralConBoleta));
|
||||
efectivoSinRespaldo.createCell(0).setCellValue("Efectivo sin Respaldo");
|
||||
efectivoSinRespaldo.createCell(1).setCellValue(DAOManager.getEgresoDAO().getTotalEgresoMesPorTipo(this.mes, gastoGeneralSinRespaldo));
|
||||
efectivoSinRespaldo.createCell(1).setCellValue(
|
||||
DAOManager.getEgresoDAO().getTotalEgresoMesPorTipo(this.mes, gastoGeneralSinRespaldo));
|
||||
footer.createCell(0).setCellValue("Total");
|
||||
footer.createCell(1).setCellFormula("Sum(B31:B36)");
|
||||
}
|
||||
@@ -375,23 +395,29 @@ public class InformeEstadoResultado {
|
||||
|
||||
int ventaStart = ventaRows.get(0).getRowNum();
|
||||
int ventaEnd = ventaRows.get(ventaRows.size() - 1).getRowNum();
|
||||
pt.drawBorders(new CellRangeAddress(ventaStart, ventaEnd, 0, 1), BorderStyle.THIN, BorderExtent.VERTICAL);
|
||||
pt.drawBorders(new CellRangeAddress(ventaStart, ventaEnd, 0, 1), BorderStyle.THIN,
|
||||
BorderExtent.VERTICAL);
|
||||
|
||||
int gastosOperacionalesStart = gastosOperacionalesRows.get(0).getRowNum();
|
||||
int gastosOperacionalesEnd = gastosOperacionalesRows.get(gastosOperacionalesRows.size() - 1).getRowNum();
|
||||
pt.drawBorders(new CellRangeAddress(gastosOperacionalesStart, gastosOperacionalesEnd, 0, 1), BorderStyle.THIN, BorderExtent.VERTICAL);
|
||||
int gastosOperacionalesEnd = gastosOperacionalesRows.get(gastosOperacionalesRows.size() - 1)
|
||||
.getRowNum();
|
||||
pt.drawBorders(new CellRangeAddress(gastosOperacionalesStart, gastosOperacionalesEnd, 0, 1),
|
||||
BorderStyle.THIN, BorderExtent.VERTICAL);
|
||||
|
||||
int serviciosStart = serviciosRows.get(0).getRowNum();
|
||||
int serviciosEnd = serviciosRows.get(serviciosRows.size() - 1).getRowNum();
|
||||
pt.drawBorders(new CellRangeAddress(serviciosStart, serviciosEnd, 0, 1), BorderStyle.THIN, BorderExtent.VERTICAL);
|
||||
pt.drawBorders(new CellRangeAddress(serviciosStart, serviciosEnd, 0, 1), BorderStyle.THIN,
|
||||
BorderExtent.VERTICAL);
|
||||
|
||||
int gastosGeneralesStart = gastosGeneralesRows.get(0).getRowNum();
|
||||
int gastosGeneralesEnd = gastosGeneralesRows.get(gastosGeneralesRows.size() - 1).getRowNum();
|
||||
pt.drawBorders(new CellRangeAddress(gastosGeneralesStart, gastosGeneralesEnd, 0, 1), BorderStyle.THIN, BorderExtent.VERTICAL);
|
||||
pt.drawBorders(new CellRangeAddress(gastosGeneralesStart, gastosGeneralesEnd, 0, 1),
|
||||
BorderStyle.THIN, BorderExtent.VERTICAL);
|
||||
|
||||
int resumenStart = resumenGeneralRows.get(0).getRowNum();
|
||||
int resumenEnd = resumenGeneralRows.get(resumenGeneralRows.size() - 1).getRowNum();
|
||||
pt.drawBorders(new CellRangeAddress(resumenStart, resumenEnd, 0, 1), BorderStyle.THIN, BorderExtent.VERTICAL);
|
||||
pt.drawBorders(new CellRangeAddress(resumenStart, resumenEnd, 0, 1), BorderStyle.THIN,
|
||||
BorderExtent.VERTICAL);
|
||||
|
||||
pt.applyBorders(this.sheet);
|
||||
}
|
||||
@@ -430,7 +456,8 @@ public class InformeEstadoResultado {
|
||||
grayStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||
|
||||
CellStyle moneyStyle = this.wb.createCellStyle();
|
||||
moneyStyle.setDataFormat(this.createHelper.createDataFormat().getFormat("\"$\"#,##0_);(\"$\"#,##0)"));
|
||||
moneyStyle
|
||||
.setDataFormat(this.createHelper.createDataFormat().getFormat("\"$\"#,##0_);(\"$\"#,##0)"));
|
||||
|
||||
CellStyle percentStyle = this.wb.createCellStyle();
|
||||
percentStyle.setDataFormat(this.createHelper.createDataFormat().getFormat("0.00%"));
|
||||
@@ -448,7 +475,8 @@ public class InformeEstadoResultado {
|
||||
|
||||
CellStyle footerMoneyStyle = this.wb.createCellStyle();
|
||||
footerMoneyStyle.cloneStyleFrom(footerStyle);
|
||||
footerMoneyStyle.setDataFormat(this.createHelper.createDataFormat().getFormat("\"$\"#,##0_);(\"$\"#,##0)"));
|
||||
footerMoneyStyle
|
||||
.setDataFormat(this.createHelper.createDataFormat().getFormat("\"$\"#,##0_);(\"$\"#,##0)"));
|
||||
|
||||
HashMap<String, CellStyle> styles = new HashMap<>();
|
||||
styles.put("regular", regularStyle);
|
||||
|
||||
@@ -27,20 +27,36 @@ package danielcortes.xyz.informes;
|
||||
import danielcortes.xyz.data.DAOManager;
|
||||
import danielcortes.xyz.models.caja.SQLiteCajaDAO;
|
||||
import danielcortes.xyz.models.informes.libro_de_ventas.InformeLibroDeVentasContent;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.ss.util.PropertyTemplate;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.time.YearMonth;
|
||||
import java.time.ZoneId;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
||||
import org.apache.poi.ss.usermodel.BorderExtent;
|
||||
import org.apache.poi.ss.usermodel.BorderStyle;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.CellStyle;
|
||||
import org.apache.poi.ss.usermodel.CreationHelper;
|
||||
import org.apache.poi.ss.usermodel.FillPatternType;
|
||||
import org.apache.poi.ss.usermodel.Font;
|
||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||
import org.apache.poi.ss.usermodel.IndexedColors;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.VerticalAlignment;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.ss.util.PropertyTemplate;
|
||||
|
||||
public class InformeLibroDeVentas {
|
||||
|
||||
private final String[] titles = {
|
||||
"", "",
|
||||
"BOLETA MANUAL", "", "",
|
||||
@@ -63,7 +79,8 @@ public class InformeLibroDeVentas {
|
||||
"TOTAL", "ACUMULADO", ""
|
||||
};
|
||||
|
||||
private final String[] dias = {"Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sabado"};
|
||||
private final String[] dias = {"Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes",
|
||||
"Sabado"};
|
||||
|
||||
private ArrayList<InformeLibroDeVentasContent> informe;
|
||||
private Path saveFile;
|
||||
@@ -125,28 +142,40 @@ public class InformeLibroDeVentas {
|
||||
dataRow.createCell(cellCounter++).setCellValue(this.dias[data.getDia()]);
|
||||
dataRow.createCell(cellCounter++).setCellValue(fecha);
|
||||
|
||||
dataRow.createCell(cellCounter++).setCellValue(data.getManualesInicial() == null ? "0" : data.getManualesInicial());
|
||||
dataRow.createCell(cellCounter++).setCellValue(data.getManualesFinal() == null ? "0" : data.getManualesFinal());
|
||||
dataRow.createCell(cellCounter++)
|
||||
.setCellValue(data.getManualesInicial() == null ? "0" : data.getManualesInicial());
|
||||
dataRow.createCell(cellCounter++)
|
||||
.setCellValue(data.getManualesFinal() == null ? "0" : data.getManualesFinal());
|
||||
dataRow.createCell(cellCounter++).setCellValue(data.getManuales());
|
||||
|
||||
dataRow.createCell(cellCounter++).setCellValue(data.getFiscalesZInicial() == null ? "0" : data.getFiscalesZInicial());
|
||||
dataRow.createCell(cellCounter++).setCellValue(data.getFiscalesZFinal() == null ? "0" : data.getFiscalesZFinal());
|
||||
dataRow.createCell(cellCounter++).setCellValue(data.getFiscalesInicial() == null ? "0" : data.getFiscalesInicial());
|
||||
dataRow.createCell(cellCounter++).setCellValue(data.getFiscalesFinal() == null ? "0" : data.getFiscalesFinal());
|
||||
dataRow.createCell(cellCounter++)
|
||||
.setCellValue(data.getFiscalesZInicial() == null ? "0" : data.getFiscalesZInicial());
|
||||
dataRow.createCell(cellCounter++)
|
||||
.setCellValue(data.getFiscalesZFinal() == null ? "0" : data.getFiscalesZFinal());
|
||||
dataRow.createCell(cellCounter++)
|
||||
.setCellValue(data.getFiscalesInicial() == null ? "0" : data.getFiscalesInicial());
|
||||
dataRow.createCell(cellCounter++)
|
||||
.setCellValue(data.getFiscalesFinal() == null ? "0" : data.getFiscalesFinal());
|
||||
dataRow.createCell(cellCounter++).setCellValue(data.getFiscales());
|
||||
|
||||
dataRow.createCell(cellCounter++).setCellValue(data.getExentasInicial() == null ? "0" : data.getExentasInicial());
|
||||
dataRow.createCell(cellCounter++).setCellValue(data.getExentasFinal() == null ? "0" : data.getExentasFinal());
|
||||
dataRow.createCell(cellCounter++)
|
||||
.setCellValue(data.getExentasInicial() == null ? "0" : data.getExentasInicial());
|
||||
dataRow.createCell(cellCounter++)
|
||||
.setCellValue(data.getExentasFinal() == null ? "0" : data.getExentasFinal());
|
||||
dataRow.createCell(cellCounter++).setCellValue(data.getExentas());
|
||||
|
||||
dataRow.createCell(cellCounter++).setCellValue(data.getSubTotal());
|
||||
|
||||
dataRow.createCell(cellCounter++).setCellValue(data.getFacturasInicial() == null ? "0" : data.getFacturasInicial());
|
||||
dataRow.createCell(cellCounter++).setCellValue(data.getFacturasFinal() == null ? "0" : data.getFacturasFinal());
|
||||
dataRow.createCell(cellCounter++)
|
||||
.setCellValue(data.getFacturasInicial() == null ? "0" : data.getFacturasInicial());
|
||||
dataRow.createCell(cellCounter++)
|
||||
.setCellValue(data.getFacturasFinal() == null ? "0" : data.getFacturasFinal());
|
||||
dataRow.createCell(cellCounter++).setCellValue(data.getFacturas());
|
||||
|
||||
dataRow.createCell(cellCounter++).setCellValue(data.getGuiasInicial() == null ? "0" : data.getGuiasInicial());
|
||||
dataRow.createCell(cellCounter++).setCellValue(data.getGuiasFinal() == null ? "0" : data.getGuiasFinal());
|
||||
dataRow.createCell(cellCounter++)
|
||||
.setCellValue(data.getGuiasInicial() == null ? "0" : data.getGuiasInicial());
|
||||
dataRow.createCell(cellCounter++)
|
||||
.setCellValue(data.getGuiasFinal() == null ? "0" : data.getGuiasFinal());
|
||||
dataRow.createCell(cellCounter++).setCellValue(data.getGuias());
|
||||
|
||||
dataRow.createCell(cellCounter++).setCellValue(data.getTotal());
|
||||
@@ -154,7 +183,8 @@ public class InformeLibroDeVentas {
|
||||
if (rowCounter == 2) {
|
||||
dataRow.createCell(cellCounter).setCellFormula(("U" + (rowCounter + 1)));
|
||||
} else {
|
||||
dataRow.createCell(cellCounter).setCellFormula(("U" + (rowCounter + 1)) + ("+") + ("V" + (rowCounter)));
|
||||
dataRow.createCell(cellCounter)
|
||||
.setCellFormula(("U" + (rowCounter + 1)) + ("+") + ("V" + (rowCounter)));
|
||||
}
|
||||
rowCounter++;
|
||||
}
|
||||
@@ -213,7 +243,6 @@ public class InformeLibroDeVentas {
|
||||
pt.drawBorders(new CellRangeAddress(2, row, 17, 19), BorderStyle.MEDIUM, BorderExtent.OUTSIDE);
|
||||
pt.drawBorders(new CellRangeAddress(2, row, 20, 22), BorderStyle.MEDIUM, BorderExtent.OUTSIDE);
|
||||
|
||||
|
||||
//Bordes del total
|
||||
pt.drawBorders(new CellRangeAddress(row, row, 0, 22), BorderStyle.MEDIUM, BorderExtent.OUTSIDE);
|
||||
|
||||
@@ -273,10 +302,10 @@ public class InformeLibroDeVentas {
|
||||
row.getCell(y).setCellStyle(this.styles.get("money"));
|
||||
}
|
||||
|
||||
|
||||
//Estilos para los totales del footer
|
||||
for (int x = 0; x < 23; x++) {
|
||||
this.footerRow.getCell(x, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK).setCellStyle(this.styles.get("footer"));
|
||||
this.footerRow.getCell(x, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK)
|
||||
.setCellStyle(this.styles.get("footer"));
|
||||
}
|
||||
this.footerRow.getCell(4).setCellStyle(this.styles.get("footer_money"));
|
||||
this.footerRow.getCell(9).setCellStyle(this.styles.get("footer_money"));
|
||||
@@ -336,7 +365,8 @@ public class InformeLibroDeVentas {
|
||||
dateStyle.setDataFormat(this.createHelper.createDataFormat().getFormat("dd/mm/yyyy"));
|
||||
|
||||
CellStyle moneyStyle = this.wb.createCellStyle();
|
||||
moneyStyle.setDataFormat(this.createHelper.createDataFormat().getFormat("\"$\"#,##0_);(\"$\"#,##0)"));
|
||||
moneyStyle
|
||||
.setDataFormat(this.createHelper.createDataFormat().getFormat("\"$\"#,##0_);(\"$\"#,##0)"));
|
||||
|
||||
CellStyle headerStyle = this.wb.createCellStyle();
|
||||
headerStyle.cloneStyleFrom(grayStyle);
|
||||
@@ -349,7 +379,8 @@ public class InformeLibroDeVentas {
|
||||
|
||||
CellStyle footerMoneyStyle = this.wb.createCellStyle();
|
||||
footerMoneyStyle.cloneStyleFrom(footerStyle);
|
||||
footerMoneyStyle.setDataFormat(this.createHelper.createDataFormat().getFormat("\"$\"#,##0_);(\"$\"#,##0)"));
|
||||
footerMoneyStyle
|
||||
.setDataFormat(this.createHelper.createDataFormat().getFormat("\"$\"#,##0_);(\"$\"#,##0)"));
|
||||
|
||||
HashMap<String, CellStyle> styles = new HashMap<>();
|
||||
styles.put("regular", regularStyle);
|
||||
|
||||
@@ -27,6 +27,7 @@ package danielcortes.xyz.models.caja;
|
||||
import java.time.LocalDate;
|
||||
|
||||
public class Caja {
|
||||
|
||||
private int id;
|
||||
private LocalDate fecha;
|
||||
private int fondo;
|
||||
|
||||
@@ -30,6 +30,7 @@ import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
public interface CajaDAO {
|
||||
|
||||
List<Caja> getAll();
|
||||
|
||||
Optional<Caja> getById(int id);
|
||||
|
||||
@@ -28,7 +28,6 @@ import danielcortes.xyz.data.DAOManager;
|
||||
import danielcortes.xyz.data.SQLiteConnectionHolder;
|
||||
import danielcortes.xyz.models.documentos.Documentos;
|
||||
import danielcortes.xyz.models.efectivo.Efectivo;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@@ -42,6 +41,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class SQLiteCajaDAO implements CajaDAO {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(SQLiteCajaDAO.class.getName());
|
||||
|
||||
private SQLiteConnectionHolder connectionHolder;
|
||||
@@ -139,7 +139,8 @@ public class SQLiteCajaDAO implements CajaDAO {
|
||||
ps.setInt(2, caja.getFondo());
|
||||
ps.executeUpdate();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1}, {2}", new Object[]{query, caja.getFecha(), caja.getFondo()});
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1}, {2}",
|
||||
new Object[]{query, caja.getFecha(), caja.getFondo()});
|
||||
|
||||
ps.close();
|
||||
|
||||
@@ -162,7 +163,8 @@ public class SQLiteCajaDAO implements CajaDAO {
|
||||
@Override
|
||||
public void insert(List<Caja> cajas) {
|
||||
String query = "insert into caja (fecha, fondo) values (?, ?)";
|
||||
try (Connection conn = connectionHolder.getConnection();PreparedStatement ps = conn.prepareStatement(query)) {
|
||||
try (Connection conn = connectionHolder.getConnection(); PreparedStatement ps = conn
|
||||
.prepareStatement(query)) {
|
||||
for (Caja caja : cajas) {
|
||||
ps.setString(1, caja.getFecha().toString());
|
||||
ps.setInt(2, caja.getFondo());
|
||||
@@ -184,8 +186,8 @@ public class SQLiteCajaDAO implements CajaDAO {
|
||||
ps.setInt(3, caja.getId());
|
||||
ps.executeUpdate();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1}, {2}, {3}", new Object[]{query, caja.getFecha(), caja.getFondo(), caja.getId()});
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1}, {2}, {3}",
|
||||
new Object[]{query, caja.getFecha(), caja.getFondo(), caja.getId()});
|
||||
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
|
||||
@@ -27,6 +27,7 @@ package danielcortes.xyz.models.calculo_fondo;
|
||||
import danielcortes.xyz.models.caja.Caja;
|
||||
|
||||
public class CalculoFondo {
|
||||
|
||||
private int id;
|
||||
private int valor;
|
||||
private String descripcion;
|
||||
|
||||
@@ -27,7 +27,6 @@ package danielcortes.xyz.models.calculo_fondo;
|
||||
import danielcortes.xyz.data.ConnectionHolder;
|
||||
import danielcortes.xyz.models.caja.Caja;
|
||||
import danielcortes.xyz.models.caja.SQLiteCajaDAO;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
@@ -36,6 +35,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public abstract class CalculoFondoDAO {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(CalculoFondoDAO.class.getName());
|
||||
|
||||
protected ConnectionHolder connectionHolder;
|
||||
|
||||
@@ -26,7 +26,6 @@ package danielcortes.xyz.models.calculo_fondo;
|
||||
|
||||
import danielcortes.xyz.data.SQLiteConnectionHolder;
|
||||
import danielcortes.xyz.models.caja.Caja;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@@ -37,6 +36,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class SQLiteCalculoFondoDAO extends CalculoFondoDAO {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(SQLiteCalculoFondoDAO.class.getName());
|
||||
|
||||
public SQLiteCalculoFondoDAO() {
|
||||
@@ -116,7 +116,9 @@ public class SQLiteCalculoFondoDAO extends CalculoFondoDAO {
|
||||
ps.setInt(3, calculoFondo.getCaja().getId());
|
||||
|
||||
updates = ps.executeUpdate();
|
||||
LOGGER.log(Level.FINE, "QUERY {0} | values: [{1}, {2}, {3}] | updates: {4}", new Object[]{query, calculoFondo.getValor(), calculoFondo.getDescripcion(), calculoFondo.getCaja().getId(), updates});
|
||||
LOGGER.log(Level.FINE, "QUERY {0} | values: [{1}, {2}, {3}] | updates: {4}",
|
||||
new Object[]{query, calculoFondo.getValor(), calculoFondo.getDescripcion(),
|
||||
calculoFondo.getCaja().getId(), updates});
|
||||
|
||||
ps.close();
|
||||
|
||||
@@ -148,8 +150,9 @@ public class SQLiteCalculoFondoDAO extends CalculoFondoDAO {
|
||||
ps.setInt(4, calculoFondo.getId());
|
||||
|
||||
updates = ps.executeUpdate();
|
||||
LOGGER.log(Level.FINE, "QUERY {0} | values: [{1}, {2}, {3}, {4}] | updates: {5}", new Object[]{query, calculoFondo.getValor(), calculoFondo.getDescripcion(), calculoFondo.getCaja().getId(), updates});
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY {0} | values: [{1}, {2}, {3}, {4}] | updates: {5}",
|
||||
new Object[]{query, calculoFondo.getValor(), calculoFondo.getDescripcion(),
|
||||
calculoFondo.getCaja().getId(), updates});
|
||||
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
@@ -168,7 +171,8 @@ public class SQLiteCalculoFondoDAO extends CalculoFondoDAO {
|
||||
ps.setInt(1, calculoFondo.getId());
|
||||
updates = ps.executeUpdate();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1} | updates: {2}", new Object[]{query, calculoFondo.getId(), updates});
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1} | updates: {2}",
|
||||
new Object[]{query, calculoFondo.getId(), updates});
|
||||
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
|
||||
@@ -27,6 +27,7 @@ package danielcortes.xyz.models.documentos;
|
||||
import danielcortes.xyz.models.caja.Caja;
|
||||
|
||||
public class Documentos {
|
||||
|
||||
private int id;
|
||||
private int cheques;
|
||||
private int tarjetas;
|
||||
|
||||
@@ -28,7 +28,6 @@ import danielcortes.xyz.data.ConnectionHolder;
|
||||
import danielcortes.xyz.models.caja.Caja;
|
||||
import danielcortes.xyz.models.caja.CajaDAO;
|
||||
import danielcortes.xyz.models.caja.SQLiteCajaDAO;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
@@ -37,6 +36,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public abstract class DocumentosDAO {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(DocumentosDAO.class.getName());
|
||||
|
||||
protected ConnectionHolder connectionHolder;
|
||||
|
||||
@@ -26,7 +26,6 @@ package danielcortes.xyz.models.documentos;
|
||||
|
||||
import danielcortes.xyz.data.SQLiteConnectionHolder;
|
||||
import danielcortes.xyz.models.caja.Caja;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@@ -37,6 +36,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class SQLiteDocumentosDAO extends DocumentosDAO {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(SQLiteDocumentosDAO.class.getName());
|
||||
|
||||
public SQLiteDocumentosDAO() {
|
||||
@@ -123,7 +123,9 @@ public class SQLiteDocumentosDAO extends DocumentosDAO {
|
||||
ps.setInt(4, documentos.getCaja().getId());
|
||||
updates = ps.executeUpdate();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1}, {2}, {3}, {4}] | updates: {5}", new Object[]{query, documentos.getCheques(), documentos.getTarjetas(), documentos.getRetiros(), documentos.getCaja().getId(), updates});
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1}, {2}, {3}, {4}] | updates: {5}",
|
||||
new Object[]{query, documentos.getCheques(), documentos.getTarjetas(),
|
||||
documentos.getRetiros(), documentos.getCaja().getId(), updates});
|
||||
|
||||
ps.close();
|
||||
|
||||
@@ -154,7 +156,8 @@ public class SQLiteDocumentosDAO extends DocumentosDAO {
|
||||
ps.setInt(1, documentos.getCaja().getId());
|
||||
updates = ps.executeUpdate();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1} | updates: {2}", new Object[]{query, documentos.getCaja().getId(), updates});
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1} | updates: {2}",
|
||||
new Object[]{query, documentos.getCaja().getId(), updates});
|
||||
|
||||
ps.close();
|
||||
|
||||
@@ -188,7 +191,9 @@ public class SQLiteDocumentosDAO extends DocumentosDAO {
|
||||
ps.setInt(5, documentos.getId());
|
||||
updates = ps.executeUpdate();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1}, {2}, {3}, {4}] | updates: {5}", new Object[]{query, documentos.getCheques(), documentos.getTarjetas(), documentos.getRetiros(), documentos.getCaja().getId(), documentos.getId(), updates});
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1}, {2}, {3}, {4}] | updates: {5}",
|
||||
new Object[]{query, documentos.getCheques(), documentos.getTarjetas(),
|
||||
documentos.getRetiros(), documentos.getCaja().getId(), documentos.getId(), updates});
|
||||
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
@@ -207,7 +212,8 @@ public class SQLiteDocumentosDAO extends DocumentosDAO {
|
||||
ps.setInt(1, documentos.getId());
|
||||
updates = ps.executeUpdate();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1} | updates: {2}", new Object[]{query, documentos.getCaja().getId(), updates});
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1} | updates: {2}",
|
||||
new Object[]{query, documentos.getCaja().getId(), updates});
|
||||
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
|
||||
@@ -27,6 +27,7 @@ package danielcortes.xyz.models.efectivo;
|
||||
import danielcortes.xyz.models.caja.Caja;
|
||||
|
||||
public class Efectivo {
|
||||
|
||||
private int id;
|
||||
private int veinteMil;
|
||||
private int diezMil;
|
||||
|
||||
@@ -28,7 +28,6 @@ import danielcortes.xyz.data.ConnectionHolder;
|
||||
import danielcortes.xyz.models.caja.Caja;
|
||||
import danielcortes.xyz.models.caja.CajaDAO;
|
||||
import danielcortes.xyz.models.caja.SQLiteCajaDAO;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
@@ -37,6 +36,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public abstract class EfectivoDAO {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(EfectivoDAO.class.getName());
|
||||
|
||||
protected ConnectionHolder connectionHolder;
|
||||
|
||||
@@ -26,7 +26,6 @@ package danielcortes.xyz.models.efectivo;
|
||||
|
||||
import danielcortes.xyz.data.SQLiteConnectionHolder;
|
||||
import danielcortes.xyz.models.caja.Caja;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@@ -37,6 +36,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class SQLiteEfectivoDAO extends EfectivoDAO {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(SQLiteEfectivoDAO.class.getName());
|
||||
|
||||
public SQLiteEfectivoDAO() {
|
||||
@@ -129,11 +129,15 @@ public class SQLiteEfectivoDAO extends EfectivoDAO {
|
||||
ps.setInt(10, efectivo.getCaja().getId());
|
||||
updates = ps.executeUpdate();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1},{2},{3},{4},{5},{6},{7},{8},{9},{10}] | updates: {11}", new Object[]{query, efectivo.getVeinteMil(), efectivo.getDiezMil(), efectivo.getCincoMil(), efectivo.getDosMil(), efectivo.getMil(), efectivo.getQuinientos(), efectivo.getCien(), efectivo.getCincuenta(), efectivo.getDiez(), efectivo.getCaja().getId(), updates});
|
||||
LOGGER.log(Level.FINE,
|
||||
"QUERY: {0} | values: [{1},{2},{3},{4},{5},{6},{7},{8},{9},{10}] | updates: {11}",
|
||||
new Object[]{query, efectivo.getVeinteMil(), efectivo.getDiezMil(),
|
||||
efectivo.getCincoMil(), efectivo.getDosMil(), efectivo.getMil(),
|
||||
efectivo.getQuinientos(), efectivo.getCien(), efectivo.getCincuenta(),
|
||||
efectivo.getDiez(), efectivo.getCaja().getId(), updates});
|
||||
|
||||
ps.close();
|
||||
|
||||
|
||||
query = "select last_insert_rowid()";
|
||||
ps = conn.prepareStatement(query);
|
||||
ResultSet rs = ps.executeQuery();
|
||||
@@ -161,7 +165,8 @@ public class SQLiteEfectivoDAO extends EfectivoDAO {
|
||||
ps.setInt(1, efectivo.getCaja().getId());
|
||||
updates = ps.executeUpdate();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1} | updates: {2}", new Object[]{query, efectivo.getCaja().getId(), updates});
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1} | updates: {2}",
|
||||
new Object[]{query, efectivo.getCaja().getId(), updates});
|
||||
|
||||
ps.close();
|
||||
|
||||
@@ -198,8 +203,12 @@ public class SQLiteEfectivoDAO extends EfectivoDAO {
|
||||
ps.setInt(11, efectivo.getId());
|
||||
updates = ps.executeUpdate();
|
||||
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11}] | updates: {12}", new Object[]{query, efectivo.getVeinteMil(), efectivo.getDiezMil(), efectivo.getCincoMil(), efectivo.getDosMil(), efectivo.getMil(), efectivo.getQuinientos(), efectivo.getCien(), efectivo.getCincuenta(), efectivo.getDiez(), efectivo.getCaja().getId(), efectivo.getId(), updates});
|
||||
LOGGER.log(Level.FINE,
|
||||
"QUERY: {0} | values: [{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11}] | updates: {12}",
|
||||
new Object[]{query, efectivo.getVeinteMil(), efectivo.getDiezMil(),
|
||||
efectivo.getCincoMil(), efectivo.getDosMil(), efectivo.getMil(),
|
||||
efectivo.getQuinientos(), efectivo.getCien(), efectivo.getCincuenta(),
|
||||
efectivo.getDiez(), efectivo.getCaja().getId(), efectivo.getId(), updates});
|
||||
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
@@ -218,7 +227,8 @@ public class SQLiteEfectivoDAO extends EfectivoDAO {
|
||||
ps.setInt(1, efectivo.getId());
|
||||
updates = ps.executeUpdate();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1} | updates: {2}", new Object[]{query, efectivo.getId(), updates});
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1} | updates: {2}",
|
||||
new Object[]{query, efectivo.getId(), updates});
|
||||
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
|
||||
@@ -31,7 +31,6 @@ import danielcortes.xyz.models.caja.SQLiteCajaDAO;
|
||||
import danielcortes.xyz.models.tipo_egreso.SQLiteTipoEgresoDAO;
|
||||
import danielcortes.xyz.models.tipo_egreso.TipoEgreso;
|
||||
import danielcortes.xyz.models.tipo_egreso.TipoEgresoDAO;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.YearMonth;
|
||||
@@ -41,6 +40,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public abstract class EgresoDAO {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(EgresoDAO.class.getName());
|
||||
|
||||
protected ConnectionHolder connectionHolder;
|
||||
|
||||
@@ -27,7 +27,6 @@ package danielcortes.xyz.models.egreso;
|
||||
import danielcortes.xyz.data.SQLiteConnectionHolder;
|
||||
import danielcortes.xyz.models.caja.Caja;
|
||||
import danielcortes.xyz.models.tipo_egreso.TipoEgreso;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@@ -40,6 +39,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class SQLiteEgresoDAO extends EgresoDAO {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(SQLiteEgresoDAO.class.getName());
|
||||
|
||||
public SQLiteEgresoDAO() {
|
||||
@@ -163,7 +163,9 @@ public class SQLiteEgresoDAO extends EgresoDAO {
|
||||
ps.setInt(5, egreso.getCaja().getId());
|
||||
updates = ps.executeUpdate();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1}, {2}, {3}, {4}, {5}] | updates: {6}", new Object[]{query, egreso.getNro(), egreso.getDescripcion(), egreso.getValor(), egreso.getTipoEgreso().getId(), egreso.getCaja().getId(), updates});
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1}, {2}, {3}, {4}, {5}] | updates: {6}",
|
||||
new Object[]{query, egreso.getNro(), egreso.getDescripcion(), egreso.getValor(),
|
||||
egreso.getTipoEgreso().getId(), egreso.getCaja().getId(), updates});
|
||||
|
||||
ps.close();
|
||||
|
||||
@@ -194,8 +196,9 @@ public class SQLiteEgresoDAO extends EgresoDAO {
|
||||
ps.setInt(6, egreso.getId());
|
||||
updates = ps.executeUpdate();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1}, {2}, {3}, {4}, {5}, {6}] | updates: {7}", new Object[]{query, egreso.getNro(), egreso.getDescripcion(), egreso.getValor(), egreso.getTipoEgreso().getId(), egreso.getCaja().getId(), egreso.getId(), updates});
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1}, {2}, {3}, {4}, {5}, {6}] | updates: {7}",
|
||||
new Object[]{query, egreso.getNro(), egreso.getDescripcion(), egreso.getValor(),
|
||||
egreso.getTipoEgreso().getId(), egreso.getCaja().getId(), egreso.getId(), updates});
|
||||
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
@@ -214,7 +217,8 @@ public class SQLiteEgresoDAO extends EgresoDAO {
|
||||
ps.setInt(1, egreso.getId());
|
||||
updates = ps.executeUpdate();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1} | updates: {2}", new Object[]{query, egreso.getId(), updates});
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1} | updates: {2}",
|
||||
new Object[]{query, egreso.getId(), updates});
|
||||
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
@@ -259,7 +263,8 @@ public class SQLiteEgresoDAO extends EgresoDAO {
|
||||
ps.setInt(3, tipo.getId());
|
||||
ResultSet rs = ps.executeQuery();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1}, {2}, {3}", new Object[]{query, start, end, tipo});
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1}, {2}, {3}",
|
||||
new Object[]{query, start, end, tipo});
|
||||
|
||||
rs.next();
|
||||
total = rs.getInt(1);
|
||||
|
||||
@@ -3,6 +3,7 @@ package danielcortes.xyz.models.estado_resultado;
|
||||
import java.time.YearMonth;
|
||||
|
||||
public class EstadoResultado {
|
||||
|
||||
public static final EstadoResultado emptyEstadoResultado;
|
||||
|
||||
static {
|
||||
@@ -190,12 +191,12 @@ public class EstadoResultado {
|
||||
this.ppm = ppm;
|
||||
}
|
||||
|
||||
public void setIvaFavor(int ivaFavor) {
|
||||
this.ivaFavor = ivaFavor;
|
||||
}
|
||||
|
||||
public int getIvaFavor() {
|
||||
return ivaFavor;
|
||||
}
|
||||
|
||||
public void setIvaFavor(int ivaFavor) {
|
||||
this.ivaFavor = ivaFavor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package danielcortes.xyz.models.estado_resultado;
|
||||
|
||||
import danielcortes.xyz.models.egreso.EgresoDAO;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
@@ -11,16 +10,20 @@ import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public abstract class EstadoResultadoDAO {
|
||||
|
||||
protected static final Logger LOGGER = Logger.getLogger(EgresoDAO.class.getName());
|
||||
|
||||
|
||||
|
||||
public abstract List<EstadoResultado> findAll();
|
||||
|
||||
public abstract EstadoResultado findById(int id);
|
||||
|
||||
public abstract EstadoResultado findByMonth(YearMonth month);
|
||||
|
||||
public abstract boolean insertEstadoResultado(EstadoResultado estadoResultado);
|
||||
|
||||
public abstract boolean updateEstadoResultado(EstadoResultado estadoResultado);
|
||||
|
||||
public abstract boolean deleteEstadoResultado(EstadoResultado estadoResultado);
|
||||
|
||||
List<EstadoResultado> estadoResultadosFromResultSet(ResultSet rs) throws SQLException {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package danielcortes.xyz.models.estado_resultado;
|
||||
|
||||
import danielcortes.xyz.data.SQLiteConnectionHolder;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@@ -12,6 +11,7 @@ import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class SQLiteEstadoResultadoDAO extends EstadoResultadoDAO {
|
||||
|
||||
private SQLiteConnectionHolder connectionHolder;
|
||||
|
||||
public SQLiteEstadoResultadoDAO() {
|
||||
@@ -70,7 +70,6 @@ public class SQLiteEstadoResultadoDAO extends EstadoResultadoDAO {
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1}", new Object[]{query, month});
|
||||
|
||||
|
||||
List<EstadoResultado> estadosResultado = this.estadoResultadosFromResultSet(rs);
|
||||
if (estadosResultado.size() > 0) {
|
||||
estadoResultado = estadosResultado.get(0);
|
||||
@@ -112,7 +111,18 @@ public class SQLiteEstadoResultadoDAO extends EstadoResultadoDAO {
|
||||
|
||||
updates = ps.executeUpdate();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1},{2},{3},{4},{5},{6},{7},{8},{9},{10}, {11}, {12}, {13}, {14}, {15}, {16}, {17}, {18}] | updates: {19}", new Object[]{query, estadoResultado.getMes(), estadoResultado.getCostoVenta(), estadoResultado.getCuentaCorrienteFactura(), estadoResultado.getCuentaCorrienteBoleta(), estadoResultado.getCuentaCorrienteSinRespaldo(), estadoResultado.getRemuneraciones(), estadoResultado.getFiniquitos(), estadoResultado.getAguinaldo(), estadoResultado.getBonosPersonal(), estadoResultado.getHonorariosContador(), estadoResultado.getArriendo(), estadoResultado.getAgua(), estadoResultado.getLuz(), estadoResultado.getGas(), estadoResultado.getTelefono(), estadoResultado.getOtroServicio(), estadoResultado.getPpm(),estadoResultado.getIvaFavor(), updates});
|
||||
LOGGER.log(Level.FINE,
|
||||
"QUERY: {0} | values: [{1},{2},{3},{4},{5},{6},{7},{8},{9},{10}, {11}, {12}, {13}, {14}, {15}, {16}, {17}, {18}] | updates: {19}",
|
||||
new Object[]{query, estadoResultado.getMes(), estadoResultado.getCostoVenta(),
|
||||
estadoResultado.getCuentaCorrienteFactura(),
|
||||
estadoResultado.getCuentaCorrienteBoleta(),
|
||||
estadoResultado.getCuentaCorrienteSinRespaldo(), estadoResultado.getRemuneraciones(),
|
||||
estadoResultado.getFiniquitos(), estadoResultado.getAguinaldo(),
|
||||
estadoResultado.getBonosPersonal(), estadoResultado.getHonorariosContador(),
|
||||
estadoResultado.getArriendo(), estadoResultado.getAgua(), estadoResultado.getLuz(),
|
||||
estadoResultado.getGas(), estadoResultado.getTelefono(),
|
||||
estadoResultado.getOtroServicio(), estadoResultado.getPpm(),
|
||||
estadoResultado.getIvaFavor(), updates});
|
||||
|
||||
ps.close();
|
||||
|
||||
@@ -163,7 +173,18 @@ public class SQLiteEstadoResultadoDAO extends EstadoResultadoDAO {
|
||||
|
||||
updates = ps.executeUpdate();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1},{2},{3},{4},{5},{6},{7},{8},{9},{10}, {11}, {12}, {13}, {14}, {15}, {16}, {17}, {18}, {19}] | updates: {20}", new Object[]{query, estadoResultado.getMes(), estadoResultado.getCostoVenta(), estadoResultado.getCuentaCorrienteFactura(), estadoResultado.getCuentaCorrienteBoleta(), estadoResultado.getCuentaCorrienteSinRespaldo(), estadoResultado.getRemuneraciones(), estadoResultado.getFiniquitos(), estadoResultado.getAguinaldo(), estadoResultado.getBonosPersonal(), estadoResultado.getHonorariosContador(), estadoResultado.getArriendo(), estadoResultado.getAgua(), estadoResultado.getLuz(), estadoResultado.getGas(), estadoResultado.getTelefono(), estadoResultado.getOtroServicio(), estadoResultado.getPpm(),estadoResultado.getIvaFavor(), estadoResultado.getId(), updates});
|
||||
LOGGER.log(Level.FINE,
|
||||
"QUERY: {0} | values: [{1},{2},{3},{4},{5},{6},{7},{8},{9},{10}, {11}, {12}, {13}, {14}, {15}, {16}, {17}, {18}, {19}] | updates: {20}",
|
||||
new Object[]{query, estadoResultado.getMes(), estadoResultado.getCostoVenta(),
|
||||
estadoResultado.getCuentaCorrienteFactura(),
|
||||
estadoResultado.getCuentaCorrienteBoleta(),
|
||||
estadoResultado.getCuentaCorrienteSinRespaldo(), estadoResultado.getRemuneraciones(),
|
||||
estadoResultado.getFiniquitos(), estadoResultado.getAguinaldo(),
|
||||
estadoResultado.getBonosPersonal(), estadoResultado.getHonorariosContador(),
|
||||
estadoResultado.getArriendo(), estadoResultado.getAgua(), estadoResultado.getLuz(),
|
||||
estadoResultado.getGas(), estadoResultado.getTelefono(),
|
||||
estadoResultado.getOtroServicio(), estadoResultado.getPpm(),
|
||||
estadoResultado.getIvaFavor(), estadoResultado.getId(), updates});
|
||||
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
@@ -182,7 +203,8 @@ public class SQLiteEstadoResultadoDAO extends EstadoResultadoDAO {
|
||||
ps.setInt(1, estadoResultado.getId());
|
||||
updates = ps.executeUpdate();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1} | updates: {2}", new Object[]{query, estadoResultado.getId(), updates});
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1} | updates: {2}",
|
||||
new Object[]{query, estadoResultado.getId(), updates});
|
||||
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
|
||||
@@ -27,6 +27,7 @@ package danielcortes.xyz.models.informes.egresos;
|
||||
import java.time.LocalDate;
|
||||
|
||||
public class InformeEgresosContent {
|
||||
|
||||
private LocalDate fecha;
|
||||
private String nro;
|
||||
private String descripcion;
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
package danielcortes.xyz.models.informes.egresos;
|
||||
|
||||
import danielcortes.xyz.data.ConnectionHolder;
|
||||
|
||||
import java.time.YearMonth;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class InformeEgresosContentDAO {
|
||||
|
||||
protected ConnectionHolder connectionHolder;
|
||||
|
||||
/**
|
||||
@@ -38,5 +38,6 @@ public abstract class InformeEgresosContentDAO {
|
||||
* @param mes mes sobre el cual se quiere le informe
|
||||
* @return lista del objeto que contiene los datos necesarios para el informe
|
||||
*/
|
||||
public abstract List<InformeEgresosContent> getInformeEgresosFactuasMateriaPrima(YearMonth mes, int tipoEgresoId);
|
||||
public abstract List<InformeEgresosContent> getInformeEgresosFactuasMateriaPrima(YearMonth mes,
|
||||
int tipoEgresoId);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
package danielcortes.xyz.models.informes.egresos;
|
||||
|
||||
import danielcortes.xyz.data.SQLiteConnectionHolder;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@@ -38,6 +37,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class SQLiteInformeEgresosContentDAO extends InformeEgresosContentDAO {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(InformeEgresosContentDAO.class.getName());
|
||||
|
||||
private List<InformeEgresosContent> list;
|
||||
@@ -47,7 +47,8 @@ public class SQLiteInformeEgresosContentDAO extends InformeEgresosContentDAO {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InformeEgresosContent> getInformeEgresosFactuasMateriaPrima(YearMonth mes, int tipoEgresoId) {
|
||||
public List<InformeEgresosContent> getInformeEgresosFactuasMateriaPrima(YearMonth mes,
|
||||
int tipoEgresoId) {
|
||||
list = new ArrayList<>();
|
||||
try (Connection conn = connectionHolder.getConnection()) {
|
||||
|
||||
@@ -65,7 +66,8 @@ public class SQLiteInformeEgresosContentDAO extends InformeEgresosContentDAO {
|
||||
ps.setInt(3, tipoEgresoId);
|
||||
ResultSet rs = ps.executeQuery();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1},{2},{3}]", new Object[]{mes.atDay(1), mes.atEndOfMonth(), tipoEgresoId});
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1},{2},{3}]",
|
||||
new Object[]{mes.atDay(1), mes.atEndOfMonth(), tipoEgresoId});
|
||||
|
||||
this.fillInforme(rs);
|
||||
} catch (SQLException e) {
|
||||
|
||||
@@ -51,6 +51,7 @@ package danielcortes.xyz.models.informes.libro_de_ventas;
|
||||
import java.time.LocalDate;
|
||||
|
||||
public class InformeLibroDeVentasContent {
|
||||
|
||||
private int dia;
|
||||
private LocalDate fecha;
|
||||
private String manualesInicial;
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
package danielcortes.xyz.models.informes.libro_de_ventas;
|
||||
|
||||
import danielcortes.xyz.data.ConnectionHolder;
|
||||
|
||||
import java.time.YearMonth;
|
||||
import java.util.Collection;
|
||||
|
||||
public abstract class InformeLibroDeVentasContentDAO {
|
||||
|
||||
protected ConnectionHolder connectionHolder;
|
||||
|
||||
/**
|
||||
|
||||
@@ -50,7 +50,6 @@ package danielcortes.xyz.models.informes.libro_de_ventas;
|
||||
|
||||
import danielcortes.xyz.data.SQLiteConnectionHolder;
|
||||
import danielcortes.xyz.utils.NaturalOrderComparator;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@@ -64,7 +63,9 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class SQLiteInformeLibroDeVentasContentDAO extends InformeLibroDeVentasContentDAO {
|
||||
private static final Logger LOGGER = Logger.getLogger(SQLiteInformeLibroDeVentasContentDAO.class.getName());
|
||||
|
||||
private static final Logger LOGGER = Logger
|
||||
.getLogger(SQLiteInformeLibroDeVentasContentDAO.class.getName());
|
||||
|
||||
private HashMap<Integer, InformeLibroDeVentasContent> map;
|
||||
|
||||
@@ -81,13 +82,20 @@ public class SQLiteInformeLibroDeVentasContentDAO extends InformeLibroDeVentasCo
|
||||
"caja.id as \"caja\"," +
|
||||
"strftime(\"%w\", caja.fecha) as \"dia\"," +
|
||||
"caja.fecha as \"fecha\"," +
|
||||
"sum(case when ingresos.tipo_ingreso_id = 2 then ingresos.valor else 0 end) as \"manuales\"," +
|
||||
"sum(case when ingresos.tipo_ingreso_id = 1 then ingresos.valor else 0 end) as \"fiscales\"," +
|
||||
"sum(case when ingresos.tipo_ingreso_id = 5 then ingresos.valor else 0 end) as \"exentas\"," +
|
||||
"sum(case when ingresos.tipo_ingreso_id in (2, 1, 5) then ingresos.valor else 0 end) as \"sub_total\"," +
|
||||
"sum(case when ingresos.tipo_ingreso_id = 3 then ingresos.valor else 0 end) as \"facturas\"," +
|
||||
"sum(case when ingresos.tipo_ingreso_id = 4 then ingresos.valor else 0 end) as \"guias\"," +
|
||||
"sum(case when ingresos.valor not null then ingresos.valor else 0 end) as \"total\" " +
|
||||
"sum(case when ingresos.tipo_ingreso_id = 2 then ingresos.valor else 0 end) as \"manuales\","
|
||||
+
|
||||
"sum(case when ingresos.tipo_ingreso_id = 1 then ingresos.valor else 0 end) as \"fiscales\","
|
||||
+
|
||||
"sum(case when ingresos.tipo_ingreso_id = 5 then ingresos.valor else 0 end) as \"exentas\","
|
||||
+
|
||||
"sum(case when ingresos.tipo_ingreso_id in (2, 1, 5) then ingresos.valor else 0 end) as \"sub_total\","
|
||||
+
|
||||
"sum(case when ingresos.tipo_ingreso_id = 3 then ingresos.valor else 0 end) as \"facturas\","
|
||||
+
|
||||
"sum(case when ingresos.tipo_ingreso_id = 4 then ingresos.valor else 0 end) as \"guias\","
|
||||
+
|
||||
"sum(case when ingresos.valor not null then ingresos.valor else 0 end) as \"total\" "
|
||||
+
|
||||
"from caja left join ingresos on (caja.id = ingresos.caja_id) " +
|
||||
"where caja.fecha between date(?) and date(?) " +
|
||||
"group by caja.fecha;";
|
||||
@@ -96,7 +104,8 @@ public class SQLiteInformeLibroDeVentasContentDAO extends InformeLibroDeVentasCo
|
||||
ps.setString(2, date.atEndOfMonth().toString());
|
||||
ResultSet rs = ps.executeQuery();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1},{2}]", new Object[]{queryTotales, date.atDay(1), date.atEndOfMonth()});
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1},{2}]",
|
||||
new Object[]{queryTotales, date.atDay(1), date.atEndOfMonth()});
|
||||
|
||||
this.fillTotalesFromResultSet(rs);
|
||||
|
||||
@@ -116,7 +125,8 @@ public class SQLiteInformeLibroDeVentasContentDAO extends InformeLibroDeVentasCo
|
||||
ps.setString(2, date.atEndOfMonth().toString());
|
||||
rs = ps.executeQuery();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1},{2}]", new Object[]{queryNumeros, date.atDay(1), date.atEndOfMonth()});
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1},{2}]",
|
||||
new Object[]{queryNumeros, date.atDay(1), date.atEndOfMonth()});
|
||||
|
||||
this.fillBoletasFromResultSet(rs);
|
||||
|
||||
@@ -271,7 +281,8 @@ public class SQLiteInformeLibroDeVentasContentDAO extends InformeLibroDeVentasCo
|
||||
}
|
||||
break;
|
||||
}
|
||||
LOGGER.log(Level.FINER, "Se termino de llenar la linea del informe resultando en: {0}", informe);
|
||||
LOGGER.log(Level.FINER, "Se termino de llenar la linea del informe resultando en: {0}",
|
||||
informe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import danielcortes.xyz.models.caja.Caja;
|
||||
import danielcortes.xyz.models.tipo_ingreso.TipoIngreso;
|
||||
|
||||
public class Ingreso {
|
||||
|
||||
private int id;
|
||||
private int valor;
|
||||
private String nroZInicial;
|
||||
|
||||
@@ -32,7 +32,6 @@ import danielcortes.xyz.models.caja.SQLiteCajaDAO;
|
||||
import danielcortes.xyz.models.tipo_ingreso.SQLiteTipoIngresoDAO;
|
||||
import danielcortes.xyz.models.tipo_ingreso.TipoIngreso;
|
||||
import danielcortes.xyz.models.tipo_ingreso.TipoIngresoDAO;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.YearMonth;
|
||||
@@ -42,6 +41,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public abstract class IngresoDAO {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(IngresoDAO.class.getName());
|
||||
|
||||
protected ConnectionHolder connectionHolder;
|
||||
|
||||
@@ -27,7 +27,6 @@ package danielcortes.xyz.models.ingreso;
|
||||
import danielcortes.xyz.data.SQLiteConnectionHolder;
|
||||
import danielcortes.xyz.models.caja.Caja;
|
||||
import danielcortes.xyz.models.tipo_ingreso.TipoIngreso;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@@ -40,6 +39,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class SQLiteIngresoDAO extends IngresoDAO {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(SQLiteIngresoDAO.class.getName());
|
||||
|
||||
public SQLiteIngresoDAO() {
|
||||
@@ -119,7 +119,6 @@ public class SQLiteIngresoDAO extends IngresoDAO {
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1}", new Object[]{query, tipoIngreso.getId()});
|
||||
|
||||
|
||||
ingresosList = this.ingresosFromResultSet(rs);
|
||||
|
||||
rs.close();
|
||||
@@ -145,7 +144,10 @@ public class SQLiteIngresoDAO extends IngresoDAO {
|
||||
ps.setInt(7, ingreso.getCaja().getId());
|
||||
updates = ps.executeUpdate();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1},{2},{3},{4},{5},{6},{7}] | updates: {8}", new Object[]{query, ingreso.getValor(), ingreso.getNroZInicial(), ingreso.getNroZFinal(), ingreso.getNroInicial(), ingreso.getNroFinal(), ingreso.getTipoIngreso().getId(), ingreso.getCaja().getId(), updates});
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1},{2},{3},{4},{5},{6},{7}] | updates: {8}",
|
||||
new Object[]{query, ingreso.getValor(), ingreso.getNroZInicial(), ingreso.getNroZFinal(),
|
||||
ingreso.getNroInicial(), ingreso.getNroFinal(), ingreso.getTipoIngreso().getId(),
|
||||
ingreso.getCaja().getId(), updates});
|
||||
|
||||
ps.close();
|
||||
|
||||
@@ -178,8 +180,12 @@ public class SQLiteIngresoDAO extends IngresoDAO {
|
||||
ps.setInt(8, ingreso.getId());
|
||||
updates = ps.executeUpdate();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: [{1},{2},{3},{4},{5},{6},{7},{8}] | updates: {9}", new Object[]{query, ingreso.getValor(), ingreso.getNroZInicial(), ingreso.getNroZFinal(), ingreso.getNroInicial(), ingreso.getNroFinal(), ingreso.getTipoIngreso().getId(), ingreso.getCaja().getId(), ingreso.getId(), updates});
|
||||
|
||||
LOGGER
|
||||
.log(Level.FINE, "QUERY: {0} | values: [{1},{2},{3},{4},{5},{6},{7},{8}] | updates: {9}",
|
||||
new Object[]{query, ingreso.getValor(), ingreso.getNroZInicial(),
|
||||
ingreso.getNroZFinal(), ingreso.getNroInicial(), ingreso.getNroFinal(),
|
||||
ingreso.getTipoIngreso().getId(), ingreso.getCaja().getId(), ingreso.getId(),
|
||||
updates});
|
||||
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
@@ -198,7 +204,8 @@ public class SQLiteIngresoDAO extends IngresoDAO {
|
||||
ps.setInt(1, ingreso.getId());
|
||||
updates = ps.executeUpdate();
|
||||
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1} | updates: {2}", new Object[]{query, ingreso.getId(), updates});
|
||||
LOGGER.log(Level.FINE, "QUERY: {0} | values: {1} | updates: {2}",
|
||||
new Object[]{query, ingreso.getId(), updates});
|
||||
|
||||
ps.close();
|
||||
} catch (SQLException e) {
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
package danielcortes.xyz.models.tipo_egreso;
|
||||
|
||||
import danielcortes.xyz.data.SQLiteConnectionHolder;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@@ -36,6 +35,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class SQLiteTipoEgresoDAO extends TipoEgresoDAO {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(SQLiteTipoEgresoDAO.class.getName());
|
||||
|
||||
public SQLiteTipoEgresoDAO() {
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
package danielcortes.xyz.models.tipo_egreso;
|
||||
|
||||
public class TipoEgreso {
|
||||
|
||||
private int id;
|
||||
private String nombre;
|
||||
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
package danielcortes.xyz.models.tipo_egreso;
|
||||
|
||||
import danielcortes.xyz.data.ConnectionHolder;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
@@ -58,6 +57,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public abstract class TipoEgresoDAO {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(TipoEgresoDAO.class.getName());
|
||||
|
||||
protected ConnectionHolder connectionHolder;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package danielcortes.xyz.models.tipo_egreso;
|
||||
|
||||
public class TipoEgresoToStringWrapper extends TipoEgreso {
|
||||
|
||||
public TipoEgresoToStringWrapper(TipoEgreso tipoEgreso) {
|
||||
this.setId(tipoEgreso.getId());
|
||||
this.setNombre(tipoEgreso.getNombre());
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
package danielcortes.xyz.models.tipo_ingreso;
|
||||
|
||||
import danielcortes.xyz.data.SQLiteConnectionHolder;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
@@ -36,6 +35,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class SQLiteTipoIngresoDAO extends TipoIngresoDAO {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(SQLiteTipoIngresoDAO.class.getName());
|
||||
|
||||
public SQLiteTipoIngresoDAO() {
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
package danielcortes.xyz.models.tipo_ingreso;
|
||||
|
||||
public class TipoIngreso {
|
||||
|
||||
private int id;
|
||||
private String nombre;
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
package danielcortes.xyz.models.tipo_ingreso;
|
||||
|
||||
import danielcortes.xyz.data.ConnectionHolder;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
@@ -34,6 +33,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public abstract class TipoIngresoDAO {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(SQLiteTipoIngresoDAO.class.getName());
|
||||
|
||||
protected ConnectionHolder connectionHolder;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package danielcortes.xyz.models.tipo_ingreso;
|
||||
|
||||
public class TipoIngresoToStringWrapper extends TipoIngreso {
|
||||
|
||||
public TipoIngresoToStringWrapper(TipoIngreso tipoIngreso) {
|
||||
this.setId(tipoIngreso.getId());
|
||||
this.setNombre(tipoIngreso.getNombre());
|
||||
|
||||
@@ -1,15 +1,24 @@
|
||||
package danielcortes.xyz.models.version;
|
||||
|
||||
import danielcortes.xyz.data.SQLiteConnectionHolder;
|
||||
|
||||
import java.io.*;
|
||||
import java.sql.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DatabaseMetaData;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
public class SQLiteVersionDAO extends VersionDAO {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(SQLiteVersionDAO.class.getName());
|
||||
|
||||
public SQLiteVersionDAO() {
|
||||
|
||||
@@ -3,6 +3,8 @@ package danielcortes.xyz.models.version;
|
||||
import danielcortes.xyz.data.ConnectionHolder;
|
||||
|
||||
public abstract class VersionDAO {
|
||||
|
||||
protected ConnectionHolder connectionHolder;
|
||||
|
||||
public abstract void updateTo(int version);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ package danielcortes.xyz.utils;
|
||||
import java.util.Comparator;
|
||||
|
||||
public class NaturalOrderComparator implements Comparator {
|
||||
|
||||
static char charAt(String s, int i) {
|
||||
return i >= s.length() ? 0 : s.charAt(i);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ package danielcortes.xyz.utils;
|
||||
import java.util.Objects;
|
||||
|
||||
public class Pair<L, R> {
|
||||
|
||||
private final L left;
|
||||
private final R right;
|
||||
|
||||
@@ -45,8 +46,12 @@ public class Pair<L, R> {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Pair<?, ?> pair = (Pair<?, ?>) o;
|
||||
return left.equals(pair.left) &&
|
||||
right.equals(pair.right);
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
package danielcortes.xyz.utils;
|
||||
|
||||
public class StringUtils {
|
||||
|
||||
public static String capitalize(String string) {
|
||||
return string.substring(0, 1).toUpperCase() + string.substring(1);
|
||||
}
|
||||
|
||||
@@ -28,12 +28,19 @@ import com.intellij.uiDesigner.core.GridConstraints;
|
||||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||
import com.intellij.uiDesigner.core.Spacer;
|
||||
import danielcortes.xyz.views.components.NumberFormatedTextField;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Font;
|
||||
import java.awt.Insets;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JSeparator;
|
||||
import javax.swing.border.TitledBorder;
|
||||
import java.awt.*;
|
||||
|
||||
public class ArqueoView {
|
||||
|
||||
private JPanel contentPanel;
|
||||
private NumberFormatedTextField veinteMilField;
|
||||
private NumberFormatedTextField diezMilField;
|
||||
@@ -57,6 +64,13 @@ public class ArqueoView {
|
||||
private NumberFormatedTextField debeRendirField;
|
||||
private NumberFormatedTextField retiroField;
|
||||
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
// >>> IMPORTANT!! <<<
|
||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||
$$$setupUI$$$();
|
||||
}
|
||||
|
||||
public JPanel getContentPanel() {
|
||||
return contentPanel;
|
||||
}
|
||||
@@ -145,17 +159,9 @@ public class ArqueoView {
|
||||
return retiroField;
|
||||
}
|
||||
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
// >>> IMPORTANT!! <<<
|
||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||
$$$setupUI$$$();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method generated by IntelliJ IDEA GUI Designer
|
||||
* >>> IMPORTANT!! <<<
|
||||
* DO NOT edit this method OR call it in your code!
|
||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
|
||||
* call it in your code!
|
||||
*
|
||||
* @noinspection ALL
|
||||
*/
|
||||
@@ -164,162 +170,302 @@ public class ArqueoView {
|
||||
contentPanel.setLayout(new GridLayoutManager(3, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||||
final JPanel panel1 = new JPanel();
|
||||
panel1.setLayout(new GridLayoutManager(7, 2, new Insets(10, 10, 10, 10), -1, -1));
|
||||
contentPanel.add(panel1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Resumen"));
|
||||
contentPanel.add(panel1,
|
||||
new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
panel1
|
||||
.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Resumen"));
|
||||
final JLabel label1 = new JLabel();
|
||||
label1.setText("Total Egresos");
|
||||
panel1.add(label1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel1.add(label1,
|
||||
new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
egresosField = new NumberFormatedTextField();
|
||||
egresosField.setEditable(false);
|
||||
egresosField.setText("");
|
||||
panel1.add(egresosField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel1.add(egresosField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
diferenciaField = new NumberFormatedTextField();
|
||||
diferenciaField.setEditable(false);
|
||||
Font diferenciaFieldFont = this.$$$getFont$$$(null, Font.BOLD, -1, diferenciaField.getFont());
|
||||
if (diferenciaFieldFont != null) diferenciaField.setFont(diferenciaFieldFont);
|
||||
if (diferenciaFieldFont != null) {
|
||||
diferenciaField.setFont(diferenciaFieldFont);
|
||||
}
|
||||
diferenciaField.setText("");
|
||||
panel1.add(diferenciaField, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel1.add(diferenciaField, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JLabel label2 = new JLabel();
|
||||
label2.setText("Diferencia");
|
||||
panel1.add(label2, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel1.add(label2,
|
||||
new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JSeparator separator1 = new JSeparator();
|
||||
panel1.add(separator1, new GridConstraints(3, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||
panel1.add(separator1,
|
||||
new GridConstraints(3, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null,
|
||||
null, 0, false));
|
||||
final JLabel label3 = new JLabel();
|
||||
label3.setText("Debe Rendir");
|
||||
panel1.add(label3, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel1.add(label3,
|
||||
new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
debeRendirField = new NumberFormatedTextField();
|
||||
debeRendirField.setEditable(false);
|
||||
Font debeRendirFieldFont = this.$$$getFont$$$(null, Font.BOLD, -1, debeRendirField.getFont());
|
||||
if (debeRendirFieldFont != null) debeRendirField.setFont(debeRendirFieldFont);
|
||||
if (debeRendirFieldFont != null) {
|
||||
debeRendirField.setFont(debeRendirFieldFont);
|
||||
}
|
||||
debeRendirField.setText("");
|
||||
panel1.add(debeRendirField, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel1.add(debeRendirField, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
rendidoField = new NumberFormatedTextField();
|
||||
rendidoField.setEditable(false);
|
||||
Font rendidoFieldFont = this.$$$getFont$$$(null, Font.BOLD, -1, rendidoField.getFont());
|
||||
if (rendidoFieldFont != null) rendidoField.setFont(rendidoFieldFont);
|
||||
if (rendidoFieldFont != null) {
|
||||
rendidoField.setFont(rendidoFieldFont);
|
||||
}
|
||||
rendidoField.setText("");
|
||||
panel1.add(rendidoField, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel1.add(rendidoField, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JLabel label4 = new JLabel();
|
||||
label4.setText("Rendido");
|
||||
panel1.add(label4, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel1.add(label4,
|
||||
new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label5 = new JLabel();
|
||||
label5.setText("Total Documentos");
|
||||
panel1.add(label5, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel1.add(label5,
|
||||
new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
documentosField = new NumberFormatedTextField();
|
||||
documentosField.setEditable(false);
|
||||
documentosField.setText("");
|
||||
panel1.add(documentosField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel1.add(documentosField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JLabel label6 = new JLabel();
|
||||
label6.setText("Total Efectivo");
|
||||
panel1.add(label6, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel1.add(label6,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
efectivoField = new NumberFormatedTextField();
|
||||
efectivoField.setEditable(false);
|
||||
efectivoField.setText("");
|
||||
panel1.add(efectivoField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel1.add(efectivoField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JPanel panel2 = new JPanel();
|
||||
panel2.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||||
contentPanel.add(panel2, new GridConstraints(0, 0, 3, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
contentPanel.add(panel2,
|
||||
new GridConstraints(0, 0, 3, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
final JPanel panel3 = new JPanel();
|
||||
panel3.setLayout(new GridLayoutManager(10, 2, new Insets(10, 10, 10, 10), -1, -1));
|
||||
panel2.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel3.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Detalle Efectivo", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, this.$$$getFont$$$(null, -1, -1, panel3.getFont())));
|
||||
panel2.add(panel3,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
panel3.setBorder(BorderFactory
|
||||
.createTitledBorder(BorderFactory.createEtchedBorder(), "Detalle Efectivo",
|
||||
TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION,
|
||||
this.$$$getFont$$$(null, -1, -1, panel3.getFont())));
|
||||
final JLabel label7 = new JLabel();
|
||||
label7.setText("$20000");
|
||||
panel3.add(label7, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(label7,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
veinteMilField = new NumberFormatedTextField();
|
||||
veinteMilField.setText("");
|
||||
panel3.add(veinteMilField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
panel3.add(veinteMilField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
final JLabel label8 = new JLabel();
|
||||
label8.setText("$10000");
|
||||
panel3.add(label8, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(label8,
|
||||
new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
diezMilField = new NumberFormatedTextField();
|
||||
diezMilField.setText("");
|
||||
panel3.add(diezMilField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
panel3.add(diezMilField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
cincoMilField = new NumberFormatedTextField();
|
||||
cincoMilField.setText("");
|
||||
panel3.add(cincoMilField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
panel3.add(cincoMilField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
final JLabel label9 = new JLabel();
|
||||
label9.setText("$5000");
|
||||
panel3.add(label9, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(label9,
|
||||
new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label10 = new JLabel();
|
||||
label10.setText("$2000");
|
||||
panel3.add(label10, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(label10,
|
||||
new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
dosMilField = new NumberFormatedTextField();
|
||||
dosMilField.setText("");
|
||||
panel3.add(dosMilField, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
panel3.add(dosMilField, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
milField = new NumberFormatedTextField();
|
||||
milField.setText("");
|
||||
panel3.add(milField, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
panel3.add(milField, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
final JLabel label11 = new JLabel();
|
||||
label11.setText("$1000");
|
||||
panel3.add(label11, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(label11,
|
||||
new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label12 = new JLabel();
|
||||
label12.setText("$500");
|
||||
panel3.add(label12, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(label12,
|
||||
new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
quinientosField = new NumberFormatedTextField();
|
||||
quinientosField.setText("");
|
||||
panel3.add(quinientosField, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
panel3.add(quinientosField, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
final JLabel label13 = new JLabel();
|
||||
label13.setText("$100");
|
||||
panel3.add(label13, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(label13,
|
||||
new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
cienField = new NumberFormatedTextField();
|
||||
cienField.setText("");
|
||||
panel3.add(cienField, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
panel3.add(cienField, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
final JLabel label14 = new JLabel();
|
||||
label14.setText("$50");
|
||||
panel3.add(label14, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(label14,
|
||||
new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
cincuentaField = new NumberFormatedTextField();
|
||||
cincuentaField.setText("");
|
||||
panel3.add(cincuentaField, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
panel3.add(cincuentaField, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
final JLabel label15 = new JLabel();
|
||||
label15.setText("$10");
|
||||
panel3.add(label15, new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(label15,
|
||||
new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
diezField = new NumberFormatedTextField();
|
||||
diezField.setText("");
|
||||
panel3.add(diezField, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
panel3.add(diezField, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
guardarEfectivoButton = new JButton();
|
||||
guardarEfectivoButton.setText("Guardar");
|
||||
panel3.add(guardarEfectivoButton, new GridConstraints(9, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
panel3.add(guardarEfectivoButton, new GridConstraints(9, 0, 1, 2, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, -1), null, 0, false));
|
||||
final JPanel panel4 = new JPanel();
|
||||
panel4.setLayout(new GridLayoutManager(4, 2, new Insets(10, 10, 10, 10), -1, -1));
|
||||
panel2.add(panel4, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel4.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Detalle Documentos", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, this.$$$getFont$$$(null, -1, -1, panel4.getFont())));
|
||||
panel2.add(panel4,
|
||||
new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
panel4.setBorder(BorderFactory
|
||||
.createTitledBorder(BorderFactory.createEtchedBorder(), "Detalle Documentos",
|
||||
TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION,
|
||||
this.$$$getFont$$$(null, -1, -1, panel4.getFont())));
|
||||
chequesField = new NumberFormatedTextField();
|
||||
chequesField.setText("");
|
||||
panel4.add(chequesField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel4.add(chequesField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JLabel label16 = new JLabel();
|
||||
label16.setText("Tarjetas de Credito");
|
||||
panel4.add(label16, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel4.add(label16,
|
||||
new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
tarjetasField = new NumberFormatedTextField();
|
||||
tarjetasField.setText("");
|
||||
panel4.add(tarjetasField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel4.add(tarjetasField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
guardarDocumentosButton = new JButton();
|
||||
guardarDocumentosButton.setText("Guardar");
|
||||
panel4.add(guardarDocumentosButton, new GridConstraints(3, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel4.add(guardarDocumentosButton,
|
||||
new GridConstraints(3, 0, 1, 2, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
final JLabel label17 = new JLabel();
|
||||
label17.setText("Cheques al Dia");
|
||||
panel4.add(label17, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel4.add(label17,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
retiroField = new NumberFormatedTextField();
|
||||
retiroField.setText("");
|
||||
panel4.add(retiroField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel4.add(retiroField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JLabel label18 = new JLabel();
|
||||
label18.setText("Retiro");
|
||||
panel4.add(label18, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel4.add(label18,
|
||||
new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JPanel panel5 = new JPanel();
|
||||
panel5.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||||
contentPanel.add(panel5, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
contentPanel.add(panel5,
|
||||
new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
calcularFondoButton = new JButton();
|
||||
calcularFondoButton.setText("Calcular Fondo");
|
||||
panel5.add(calcularFondoButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel5.add(calcularFondoButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
final Spacer spacer1 = new Spacer();
|
||||
contentPanel.add(spacer1, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||
contentPanel.add(spacer1, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0,
|
||||
false));
|
||||
}
|
||||
|
||||
/**
|
||||
* @noinspection ALL
|
||||
*/
|
||||
private Font $$$getFont$$$(String fontName, int style, int size, Font currentFont) {
|
||||
if (currentFont == null) return null;
|
||||
if (currentFont == null) {
|
||||
return null;
|
||||
}
|
||||
String resultName;
|
||||
if (fontName == null) {
|
||||
resultName = currentFont.getName();
|
||||
@@ -331,7 +477,8 @@ public class ArqueoView {
|
||||
resultName = currentFont.getName();
|
||||
}
|
||||
}
|
||||
return new Font(resultName, style >= 0 ? style : currentFont.getStyle(), size >= 0 ? size : currentFont.getSize());
|
||||
return new Font(resultName, style >= 0 ? style : currentFont.getStyle(),
|
||||
size >= 0 ? size : currentFont.getSize());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,15 +2,24 @@ package danielcortes.xyz.views;
|
||||
|
||||
import com.intellij.uiDesigner.core.GridConstraints;
|
||||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.CardLayout;
|
||||
import java.awt.Insets;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
public class BaseLayout {
|
||||
|
||||
private JPanel contentPanel;
|
||||
private JPanel sidePanel;
|
||||
private JPanel mainPanel;
|
||||
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
// >>> IMPORTANT!! <<<
|
||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||
$$$setupUI$$$();
|
||||
}
|
||||
|
||||
public JPanel getContentPanel() {
|
||||
return contentPanel;
|
||||
}
|
||||
@@ -23,17 +32,9 @@ public class BaseLayout {
|
||||
return mainPanel;
|
||||
}
|
||||
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
// >>> IMPORTANT!! <<<
|
||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||
$$$setupUI$$$();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method generated by IntelliJ IDEA GUI Designer
|
||||
* >>> IMPORTANT!! <<<
|
||||
* DO NOT edit this method OR call it in your code!
|
||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
|
||||
* call it in your code!
|
||||
*
|
||||
* @noinspection ALL
|
||||
*/
|
||||
@@ -42,10 +43,18 @@ public class BaseLayout {
|
||||
contentPanel.setLayout(new GridLayoutManager(1, 2, new Insets(10, 10, 10, 10), -1, -1));
|
||||
sidePanel = new JPanel();
|
||||
sidePanel.setLayout(new CardLayout(0, 0));
|
||||
contentPanel.add(sidePanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_VERTICAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
contentPanel.add(sidePanel,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_VERTICAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
mainPanel = new JPanel();
|
||||
mainPanel.setLayout(new CardLayout(0, 0));
|
||||
contentPanel.add(mainPanel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||
contentPanel.add(mainPanel,
|
||||
new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null,
|
||||
null, null, 0, false));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,11 +28,16 @@ import com.github.lgooddatepicker.components.DatePicker;
|
||||
import com.intellij.uiDesigner.core.GridConstraints;
|
||||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||
import com.intellij.uiDesigner.core.Spacer;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.CardLayout;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Insets;
|
||||
import javax.swing.ButtonGroup;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JToggleButton;
|
||||
|
||||
public class CajasView {
|
||||
|
||||
private JToggleButton egresosButton;
|
||||
private JToggleButton ingresosButton;
|
||||
private JPanel contentPanel;
|
||||
@@ -41,6 +46,13 @@ public class CajasView {
|
||||
private JToggleButton arqueoButton;
|
||||
private DatePicker datePicker;
|
||||
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
// >>> IMPORTANT!! <<<
|
||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||
$$$setupUI$$$();
|
||||
}
|
||||
|
||||
public JToggleButton getEgresosButton() {
|
||||
return egresosButton;
|
||||
}
|
||||
@@ -65,18 +77,9 @@ public class CajasView {
|
||||
return cardPanel;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
// >>> IMPORTANT!! <<<
|
||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||
$$$setupUI$$$();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method generated by IntelliJ IDEA GUI Designer
|
||||
* >>> IMPORTANT!! <<<
|
||||
* DO NOT edit this method OR call it in your code!
|
||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
|
||||
* call it in your code!
|
||||
*
|
||||
* @noinspection ALL
|
||||
*/
|
||||
@@ -85,29 +88,54 @@ public class CajasView {
|
||||
contentPanel.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||
cardPanel = new JPanel();
|
||||
cardPanel.setLayout(new CardLayout(0, 0));
|
||||
contentPanel.add(cardPanel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
contentPanel.add(cardPanel,
|
||||
new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
controlsPanel = new JPanel();
|
||||
controlsPanel.setLayout(new GridLayoutManager(1, 5, new Insets(0, 0, 0, 0), -1, -1));
|
||||
contentPanel.add(controlsPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
|
||||
contentPanel.add(controlsPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_NORTH,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null,
|
||||
null, 0, false));
|
||||
egresosButton = new JToggleButton();
|
||||
egresosButton.setText("Egresos");
|
||||
egresosButton.setMnemonic('E');
|
||||
egresosButton.setDisplayedMnemonicIndex(0);
|
||||
controlsPanel.add(egresosButton, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, -1), null, 0, false));
|
||||
controlsPanel.add(egresosButton,
|
||||
new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
|
||||
new Dimension(200, -1), null, 0, false));
|
||||
ingresosButton = new JToggleButton();
|
||||
ingresosButton.setText("Ingresos");
|
||||
ingresosButton.setMnemonic('I');
|
||||
ingresosButton.setDisplayedMnemonicIndex(0);
|
||||
controlsPanel.add(ingresosButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, -1), null, 0, false));
|
||||
controlsPanel.add(ingresosButton,
|
||||
new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
|
||||
new Dimension(200, -1), null, 0, false));
|
||||
arqueoButton = new JToggleButton();
|
||||
arqueoButton.setText("Arqueo");
|
||||
arqueoButton.setMnemonic('A');
|
||||
arqueoButton.setDisplayedMnemonicIndex(0);
|
||||
controlsPanel.add(arqueoButton, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, -1), null, 0, false));
|
||||
controlsPanel.add(arqueoButton,
|
||||
new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
|
||||
new Dimension(200, -1), null, 0, false));
|
||||
datePicker = new DatePicker();
|
||||
controlsPanel.add(datePicker, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
controlsPanel.add(datePicker,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
final Spacer spacer1 = new Spacer();
|
||||
controlsPanel.add(spacer1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
|
||||
controlsPanel.add(spacer1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null,
|
||||
0, false));
|
||||
ButtonGroup buttonGroup;
|
||||
buttonGroup = new ButtonGroup();
|
||||
buttonGroup.add(egresosButton);
|
||||
|
||||
@@ -28,13 +28,22 @@ import com.intellij.uiDesigner.core.GridConstraints;
|
||||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||
import danielcortes.xyz.views.components.NumberFormatedTextField;
|
||||
import danielcortes.xyz.views.components.table_model.FondoTableModel;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Insets;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.JTextField;
|
||||
import javax.swing.ListSelectionModel;
|
||||
import javax.swing.RowSorter;
|
||||
import javax.swing.table.TableModel;
|
||||
import javax.swing.table.TableRowSorter;
|
||||
import java.awt.*;
|
||||
|
||||
public class CalcularFondoView {
|
||||
|
||||
private JPanel contentPanel;
|
||||
private JTable table;
|
||||
private JButton guardarButton;
|
||||
@@ -121,9 +130,8 @@ public class CalcularFondoView {
|
||||
}
|
||||
|
||||
/**
|
||||
* Method generated by IntelliJ IDEA GUI Designer
|
||||
* >>> IMPORTANT!! <<<
|
||||
* DO NOT edit this method OR call it in your code!
|
||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
|
||||
* call it in your code!
|
||||
*
|
||||
* @noinspection ALL
|
||||
*/
|
||||
@@ -132,53 +140,103 @@ public class CalcularFondoView {
|
||||
contentPanel = new JPanel();
|
||||
contentPanel.setLayout(new GridLayoutManager(4, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||
final JScrollPane scrollPane1 = new JScrollPane();
|
||||
contentPanel.add(scrollPane1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||
contentPanel.add(scrollPane1,
|
||||
new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null,
|
||||
null, null, 0, false));
|
||||
scrollPane1.setViewportView(table);
|
||||
final JPanel panel1 = new JPanel();
|
||||
panel1.setLayout(new GridLayoutManager(2, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||||
contentPanel.add(panel1, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
contentPanel.add(panel1,
|
||||
new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
fondoField = new NumberFormatedTextField();
|
||||
panel1.add(fondoField, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel1.add(fondoField, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JLabel label1 = new JLabel();
|
||||
label1.setText("Fondo");
|
||||
panel1.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel1.add(label1,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label2 = new JLabel();
|
||||
label2.setText("Suma de dinero");
|
||||
panel1.add(label2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel1.add(label2,
|
||||
new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label3 = new JLabel();
|
||||
label3.setText("Deposito");
|
||||
panel1.add(label3, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel1.add(label3,
|
||||
new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
sumaField = new NumberFormatedTextField();
|
||||
sumaField.setEditable(false);
|
||||
panel1.add(sumaField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel1.add(sumaField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
depositoField = new NumberFormatedTextField();
|
||||
depositoField.setEditable(false);
|
||||
panel1.add(depositoField, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel1.add(depositoField, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JPanel panel2 = new JPanel();
|
||||
panel2.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||||
contentPanel.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
contentPanel.add(panel2,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
valorField = new NumberFormatedTextField();
|
||||
panel2.add(valorField, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(valorField, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
descripcionField = new JTextField();
|
||||
panel2.add(descripcionField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(descripcionField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JLabel label4 = new JLabel();
|
||||
label4.setText("Valor");
|
||||
panel2.add(label4, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(label4,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label5 = new JLabel();
|
||||
label5.setText("Descripcion");
|
||||
panel2.add(label5, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(label5,
|
||||
new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JPanel panel3 = new JPanel();
|
||||
panel3.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||||
contentPanel.add(panel3, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
contentPanel.add(panel3,
|
||||
new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
guardarButton = new JButton();
|
||||
guardarButton.setText("Guardar");
|
||||
panel3.add(guardarButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(guardarButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
editarButton = new JButton();
|
||||
editarButton.setText("Editar");
|
||||
panel3.add(editarButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(editarButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
eliminarButton = new JButton();
|
||||
eliminarButton.setText("Eliminar");
|
||||
panel3.add(eliminarButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(eliminarButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -30,12 +30,24 @@ import com.intellij.uiDesigner.core.Spacer;
|
||||
import danielcortes.xyz.models.tipo_egreso.TipoEgresoToStringWrapper;
|
||||
import danielcortes.xyz.views.components.NumberFormatedTextField;
|
||||
import danielcortes.xyz.views.components.table_model.EgresosTableModel;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Insets;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.JTextField;
|
||||
import javax.swing.ListSelectionModel;
|
||||
import javax.swing.RowSorter;
|
||||
import javax.swing.table.TableRowSorter;
|
||||
import java.awt.*;
|
||||
|
||||
public class EgresosView {
|
||||
|
||||
public JPanel contentPanel;
|
||||
private JTable egresosTable;
|
||||
private JButton guardarButton;
|
||||
@@ -55,6 +67,13 @@ public class EgresosView {
|
||||
|
||||
private EgresosTableModel egresosTableModel;
|
||||
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
// >>> IMPORTANT!! <<<
|
||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||
$$$setupUI$$$();
|
||||
}
|
||||
|
||||
private void createUIComponents() {
|
||||
createEgresosTable();
|
||||
createTipoCombo();
|
||||
@@ -133,18 +152,9 @@ public class EgresosView {
|
||||
return errorTipoEgreso;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
// >>> IMPORTANT!! <<<
|
||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||
$$$setupUI$$$();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method generated by IntelliJ IDEA GUI Designer
|
||||
* >>> IMPORTANT!! <<<
|
||||
* DO NOT edit this method OR call it in your code!
|
||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
|
||||
* call it in your code!
|
||||
*
|
||||
* @noinspection ALL
|
||||
*/
|
||||
@@ -154,91 +164,164 @@ public class EgresosView {
|
||||
contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||||
final JPanel panel1 = new JPanel();
|
||||
panel1.setLayout(new GridLayoutManager(3, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||
contentPanel.add(panel1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Egresos"));
|
||||
contentPanel.add(panel1,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
panel1
|
||||
.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Egresos"));
|
||||
final JScrollPane scrollPane1 = new JScrollPane();
|
||||
panel1.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||
panel1.add(scrollPane1,
|
||||
new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null,
|
||||
null, null, 0, false));
|
||||
scrollPane1.setViewportView(egresosTable);
|
||||
final JPanel panel2 = new JPanel();
|
||||
panel2.setLayout(new GridLayoutManager(3, 4, new Insets(0, 0, 0, 0), -1, -1));
|
||||
panel1.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel1.add(panel2,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
final JLabel label1 = new JLabel();
|
||||
label1.setText("N°");
|
||||
panel2.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(label1,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label2 = new JLabel();
|
||||
label2.setText("Descripcion");
|
||||
panel2.add(label2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(label2,
|
||||
new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
descripcionField = new JTextField();
|
||||
panel2.add(descripcionField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(descripcionField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
nroField = new JTextField();
|
||||
panel2.add(nroField, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(nroField, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
valorField = new NumberFormatedTextField();
|
||||
panel2.add(valorField, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(valorField, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JLabel label3 = new JLabel();
|
||||
label3.setText("Valor");
|
||||
panel2.add(label3, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(label3,
|
||||
new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label4 = new JLabel();
|
||||
label4.setText("Tipo");
|
||||
panel2.add(label4, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(tipoCombo, new GridConstraints(1, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(label4,
|
||||
new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
panel2.add(tipoCombo, new GridConstraints(1, 3, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
errorNumero = new JLabel();
|
||||
errorNumero.setEnabled(true);
|
||||
errorNumero.setForeground(new Color(-65536));
|
||||
errorNumero.setText("Error");
|
||||
errorNumero.setVisible(false);
|
||||
panel2.add(errorNumero, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(errorNumero,
|
||||
new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
errorDescripcion = new JLabel();
|
||||
errorDescripcion.setEnabled(true);
|
||||
errorDescripcion.setForeground(new Color(-65536));
|
||||
errorDescripcion.setText("Error");
|
||||
errorDescripcion.setVisible(false);
|
||||
panel2.add(errorDescripcion, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(errorDescripcion,
|
||||
new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
errorValor = new JLabel();
|
||||
errorValor.setEnabled(true);
|
||||
errorValor.setForeground(new Color(-65536));
|
||||
errorValor.setText("Error");
|
||||
errorValor.setVisible(false);
|
||||
panel2.add(errorValor, new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(errorValor,
|
||||
new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
errorTipoEgreso = new JLabel();
|
||||
errorTipoEgreso.setEnabled(true);
|
||||
errorTipoEgreso.setForeground(new Color(-65536));
|
||||
errorTipoEgreso.setText("Error");
|
||||
errorTipoEgreso.setVisible(false);
|
||||
panel2.add(errorTipoEgreso, new GridConstraints(2, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(errorTipoEgreso,
|
||||
new GridConstraints(2, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JPanel panel3 = new JPanel();
|
||||
panel3.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||||
panel1.add(panel3, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel1.add(panel3,
|
||||
new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
final JPanel panel4 = new JPanel();
|
||||
panel4.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||||
panel3.add(panel4, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel3.add(panel4,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
guardarButton = new JButton();
|
||||
guardarButton.setText("Añadir");
|
||||
guardarButton.setMnemonic('A');
|
||||
guardarButton.setDisplayedMnemonicIndex(0);
|
||||
panel4.add(guardarButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel4.add(guardarButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
eliminarButton = new JButton();
|
||||
eliminarButton.setEnabled(false);
|
||||
eliminarButton.setText("Eliminar");
|
||||
eliminarButton.setMnemonic('E');
|
||||
eliminarButton.setDisplayedMnemonicIndex(0);
|
||||
panel4.add(eliminarButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel4.add(eliminarButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
editarButton = new JButton();
|
||||
editarButton.setEnabled(false);
|
||||
editarButton.setText("Editar");
|
||||
editarButton.setMnemonic('D');
|
||||
editarButton.setDisplayedMnemonicIndex(1);
|
||||
panel4.add(editarButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel4.add(editarButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final Spacer spacer1 = new Spacer();
|
||||
panel3.add(spacer1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
|
||||
panel3.add(spacer1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null,
|
||||
0, false));
|
||||
final JPanel panel5 = new JPanel();
|
||||
panel5.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||||
panel3.add(panel5, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel3.add(panel5,
|
||||
new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
final JLabel label5 = new JLabel();
|
||||
label5.setText("Total Egresos:");
|
||||
panel5.add(label5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel5.add(label5,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
totalEgresosField = new NumberFormatedTextField();
|
||||
totalEgresosField.setEditable(false);
|
||||
panel5.add(totalEgresosField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel5.add(totalEgresosField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,14 +6,22 @@ import com.intellij.uiDesigner.core.Spacer;
|
||||
import danielcortes.xyz.views.components.DoubleFormatedTextField;
|
||||
import danielcortes.xyz.views.components.NumberFormatedTextField;
|
||||
import danielcortes.xyz.views.components.YearSpinnerModel;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Insets;
|
||||
import java.time.LocalDate;
|
||||
import java.time.YearMonth;
|
||||
import java.util.ArrayList;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JSpinner;
|
||||
import javax.swing.SpinnerModel;
|
||||
|
||||
public class EstadoResultadoView {
|
||||
|
||||
private NumberFormatedTextField ventaBrutaField;
|
||||
private NumberFormatedTextField ventaNetaField;
|
||||
private NumberFormatedTextField ventaIVAField;
|
||||
@@ -235,9 +243,8 @@ public class EstadoResultadoView {
|
||||
}
|
||||
|
||||
/**
|
||||
* Method generated by IntelliJ IDEA GUI Designer
|
||||
* >>> IMPORTANT!! <<<
|
||||
* DO NOT edit this method OR call it in your code!
|
||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
|
||||
* call it in your code!
|
||||
*
|
||||
* @noinspection ALL
|
||||
*/
|
||||
@@ -247,248 +254,496 @@ public class EstadoResultadoView {
|
||||
contentPanel.setLayout(new GridLayoutManager(3, 3, new Insets(10, 10, 10, 10), -1, -1));
|
||||
final JPanel panel1 = new JPanel();
|
||||
panel1.setLayout(new GridLayoutManager(6, 2, new Insets(10, 10, 10, 10), -1, -1));
|
||||
contentPanel.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
contentPanel.add(panel1,
|
||||
new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Venta"));
|
||||
final JLabel label1 = new JLabel();
|
||||
label1.setText("Bruto:");
|
||||
panel1.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel1.add(label1,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label2 = new JLabel();
|
||||
label2.setText("Neto:");
|
||||
panel1.add(label2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel1.add(label2,
|
||||
new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label3 = new JLabel();
|
||||
label3.setText("IVA:");
|
||||
panel1.add(label3, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel1.add(label3,
|
||||
new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label4 = new JLabel();
|
||||
label4.setText("Exentas:");
|
||||
panel1.add(label4, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel1.add(label4,
|
||||
new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label5 = new JLabel();
|
||||
label5.setText("Neto + Exentas:");
|
||||
panel1.add(label5, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel1.add(label5,
|
||||
new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
ventaBrutaField = new NumberFormatedTextField();
|
||||
ventaBrutaField.setEditable(false);
|
||||
panel1.add(ventaBrutaField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel1.add(ventaBrutaField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
ventaNetaField = new NumberFormatedTextField();
|
||||
ventaNetaField.setEditable(false);
|
||||
panel1.add(ventaNetaField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel1.add(ventaNetaField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
ventaIVAField = new NumberFormatedTextField();
|
||||
ventaIVAField.setEditable(false);
|
||||
panel1.add(ventaIVAField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel1.add(ventaIVAField, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
ventaExentasField = new NumberFormatedTextField();
|
||||
ventaExentasField.setEditable(false);
|
||||
panel1.add(ventaExentasField, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel1.add(ventaExentasField, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
ventasNetaExentasField = new NumberFormatedTextField();
|
||||
ventasNetaExentasField.setEditable(false);
|
||||
panel1.add(ventasNetaExentasField, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel1.add(ventasNetaExentasField, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final Spacer spacer1 = new Spacer();
|
||||
panel1.add(spacer1, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||
panel1.add(spacer1, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0,
|
||||
false));
|
||||
final JPanel panel2 = new JPanel();
|
||||
panel2.setLayout(new GridLayoutManager(9, 2, new Insets(10, 10, 10, 10), -1, -1));
|
||||
contentPanel.add(panel2, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel2.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Resumen"));
|
||||
contentPanel.add(panel2,
|
||||
new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
panel2
|
||||
.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Resumen"));
|
||||
resumenUtilidad = new NumberFormatedTextField();
|
||||
resumenUtilidad.setEditable(false);
|
||||
panel2.add(resumenUtilidad, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(resumenUtilidad, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
resumenPPMMes = new NumberFormatedTextField();
|
||||
resumenPPMMes.setEditable(false);
|
||||
panel2.add(resumenPPMMes, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(resumenPPMMes, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
resumenIVAMes = new NumberFormatedTextField();
|
||||
resumenIVAMes.setEditable(false);
|
||||
panel2.add(resumenIVAMes, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(resumenIVAMes, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
resumenIVAFavor = new NumberFormatedTextField();
|
||||
resumenIVAFavor.setEditable(true);
|
||||
panel2.add(resumenIVAFavor, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(resumenIVAFavor, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
resumenResultado = new NumberFormatedTextField();
|
||||
resumenResultado.setEditable(false);
|
||||
panel2.add(resumenResultado, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(resumenResultado, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JLabel label6 = new JLabel();
|
||||
label6.setText("Utilidad:");
|
||||
panel2.add(label6, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(label6,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label7 = new JLabel();
|
||||
label7.setText("PPM Mes:");
|
||||
panel2.add(label7, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(label7,
|
||||
new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label8 = new JLabel();
|
||||
label8.setText("+ IVA Mes:");
|
||||
panel2.add(label8, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(label8,
|
||||
new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label9 = new JLabel();
|
||||
label9.setText("- IVA A Favor:");
|
||||
panel2.add(label9, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(label9,
|
||||
new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label10 = new JLabel();
|
||||
label10.setText("Resultado:");
|
||||
panel2.add(label10, new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(label10,
|
||||
new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final Spacer spacer2 = new Spacer();
|
||||
panel2.add(spacer2, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||
panel2.add(spacer2, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label11 = new JLabel();
|
||||
label11.setText("PPM:");
|
||||
panel2.add(label11, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(label11,
|
||||
new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
resumenAPagar = new NumberFormatedTextField();
|
||||
resumenAPagar.setEditable(false);
|
||||
panel2.add(resumenAPagar, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(resumenAPagar, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JLabel label12 = new JLabel();
|
||||
label12.setText("A Pagar PPM + IVA");
|
||||
panel2.add(label12, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(label12,
|
||||
new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
resumenIVAPPM = new NumberFormatedTextField();
|
||||
resumenIVAPPM.setEditable(false);
|
||||
panel2.add(resumenIVAPPM, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(resumenIVAPPM, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
resumenPPM = new DoubleFormatedTextField();
|
||||
panel2.add(resumenPPM, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(resumenPPM, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JPanel panel3 = new JPanel();
|
||||
panel3.setLayout(new GridLayoutManager(1, 7, new Insets(0, 0, 0, 0), -1, -1));
|
||||
contentPanel.add(panel3, new GridConstraints(0, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
contentPanel.add(panel3,
|
||||
new GridConstraints(0, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
final Spacer spacer3 = new Spacer();
|
||||
panel3.add(spacer3, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
|
||||
panel3.add(spacer3, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null,
|
||||
0, false));
|
||||
final JLabel label13 = new JLabel();
|
||||
label13.setText("Mes:");
|
||||
panel3.add(label13, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(monthCombo, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel3.add(label13,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
panel3.add(monthCombo, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JLabel label14 = new JLabel();
|
||||
label14.setText("Año:");
|
||||
panel3.add(label14, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(yearSpinner, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel3.add(label14,
|
||||
new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
panel3.add(yearSpinner, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
guardarButton = new JButton();
|
||||
guardarButton.setText("Guardar");
|
||||
panel3.add(guardarButton, new GridConstraints(0, 6, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel3.add(guardarButton, new GridConstraints(0, 6, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
exportarButton = new JButton();
|
||||
exportarButton.setText("Exportar");
|
||||
panel3.add(exportarButton, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel3.add(exportarButton, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JPanel panel4 = new JPanel();
|
||||
panel4.setLayout(new GridLayoutManager(10, 3, new Insets(10, 10, 10, 10), -1, -1));
|
||||
contentPanel.add(panel4, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel4.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Gastos Operacionales"));
|
||||
contentPanel.add(panel4,
|
||||
new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
panel4.setBorder(BorderFactory
|
||||
.createTitledBorder(BorderFactory.createEtchedBorder(), "Gastos Operacionales"));
|
||||
final JLabel label15 = new JLabel();
|
||||
label15.setText("Costo de Venta:");
|
||||
panel4.add(label15, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel4.add(label15,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label16 = new JLabel();
|
||||
label16.setText("Remuneraciones:");
|
||||
panel4.add(label16, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel4.add(label16,
|
||||
new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label17 = new JLabel();
|
||||
label17.setText("Finiquitos:");
|
||||
panel4.add(label17, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel4.add(label17,
|
||||
new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label18 = new JLabel();
|
||||
label18.setText("Aguinaldo:");
|
||||
panel4.add(label18, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel4.add(label18,
|
||||
new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label19 = new JLabel();
|
||||
label19.setText("Partime:");
|
||||
panel4.add(label19, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel4.add(label19,
|
||||
new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label20 = new JLabel();
|
||||
label20.setText("Bonos Personal:");
|
||||
panel4.add(label20, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel4.add(label20,
|
||||
new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label21 = new JLabel();
|
||||
label21.setText("Honorarios Contador:");
|
||||
panel4.add(label21, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel4.add(label21,
|
||||
new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label22 = new JLabel();
|
||||
label22.setText("Arriendo:");
|
||||
panel4.add(label22, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel4.add(label22,
|
||||
new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
gastosOperacionalesCostoVenta = new NumberFormatedTextField();
|
||||
panel4.add(gastosOperacionalesCostoVenta, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel4.add(gastosOperacionalesCostoVenta,
|
||||
new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
gastosOperacionalesRemuneraciones = new NumberFormatedTextField();
|
||||
panel4.add(gastosOperacionalesRemuneraciones, new GridConstraints(1, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel4.add(gastosOperacionalesRemuneraciones,
|
||||
new GridConstraints(1, 1, 1, 2, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
gastosOperacionalesFiniquitos = new NumberFormatedTextField();
|
||||
panel4.add(gastosOperacionalesFiniquitos, new GridConstraints(2, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel4.add(gastosOperacionalesFiniquitos,
|
||||
new GridConstraints(2, 1, 1, 2, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
gastosOperacionalesAguinaldo = new NumberFormatedTextField();
|
||||
panel4.add(gastosOperacionalesAguinaldo, new GridConstraints(3, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel4.add(gastosOperacionalesAguinaldo,
|
||||
new GridConstraints(3, 1, 1, 2, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
gastosOperacionalesPartime = new NumberFormatedTextField();
|
||||
gastosOperacionalesPartime.setEditable(false);
|
||||
panel4.add(gastosOperacionalesPartime, new GridConstraints(4, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel4.add(gastosOperacionalesPartime,
|
||||
new GridConstraints(4, 1, 1, 2, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
gastosOperacionalesBonos = new NumberFormatedTextField();
|
||||
panel4.add(gastosOperacionalesBonos, new GridConstraints(5, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel4.add(gastosOperacionalesBonos,
|
||||
new GridConstraints(5, 1, 1, 2, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
gastosOperacionalesHonorariosContador = new NumberFormatedTextField();
|
||||
panel4.add(gastosOperacionalesHonorariosContador, new GridConstraints(6, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel4.add(gastosOperacionalesHonorariosContador,
|
||||
new GridConstraints(6, 1, 1, 2, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
gastosOperacionalesArriendo = new NumberFormatedTextField();
|
||||
panel4.add(gastosOperacionalesArriendo, new GridConstraints(7, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel4.add(gastosOperacionalesArriendo,
|
||||
new GridConstraints(7, 1, 1, 2, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JLabel label23 = new JLabel();
|
||||
label23.setText("Total:");
|
||||
panel4.add(label23, new GridConstraints(9, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel4.add(label23,
|
||||
new GridConstraints(9, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
gastosOperacionalesTotal = new NumberFormatedTextField();
|
||||
gastosOperacionalesTotal.setEditable(false);
|
||||
panel4.add(gastosOperacionalesTotal, new GridConstraints(9, 1, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel4.add(gastosOperacionalesTotal,
|
||||
new GridConstraints(9, 1, 1, 2, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final Spacer spacer4 = new Spacer();
|
||||
panel4.add(spacer4, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||
panel4.add(spacer4, new GridConstraints(8, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0,
|
||||
false));
|
||||
gastosOperacionesPorcentajeCostoVenta = new DoubleFormatedTextField();
|
||||
gastosOperacionesPorcentajeCostoVenta.setColumns(6);
|
||||
gastosOperacionesPorcentajeCostoVenta.setEditable(false);
|
||||
panel4.add(gastosOperacionesPorcentajeCostoVenta, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel4.add(gastosOperacionesPorcentajeCostoVenta,
|
||||
new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
final JPanel panel5 = new JPanel();
|
||||
panel5.setLayout(new GridLayoutManager(7, 2, new Insets(10, 10, 10, 10), -1, -1));
|
||||
contentPanel.add(panel5, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel5.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Servicios"));
|
||||
contentPanel.add(panel5,
|
||||
new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
panel5.setBorder(
|
||||
BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Servicios"));
|
||||
final JLabel label24 = new JLabel();
|
||||
label24.setText("Agua:");
|
||||
panel5.add(label24, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel5.add(label24,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label25 = new JLabel();
|
||||
label25.setText("Luz:");
|
||||
panel5.add(label25, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel5.add(label25,
|
||||
new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label26 = new JLabel();
|
||||
label26.setText("Gas:");
|
||||
panel5.add(label26, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel5.add(label26,
|
||||
new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label27 = new JLabel();
|
||||
label27.setText("Telefono:");
|
||||
panel5.add(label27, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel5.add(label27,
|
||||
new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label28 = new JLabel();
|
||||
label28.setText("Total:");
|
||||
panel5.add(label28, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel5.add(label28,
|
||||
new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
serviciosAgua = new NumberFormatedTextField();
|
||||
panel5.add(serviciosAgua, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel5.add(serviciosAgua, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
serviciosLuz = new NumberFormatedTextField();
|
||||
panel5.add(serviciosLuz, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel5.add(serviciosLuz, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
serviciosGas = new NumberFormatedTextField();
|
||||
panel5.add(serviciosGas, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel5.add(serviciosGas, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
serviciosTelefono = new NumberFormatedTextField();
|
||||
panel5.add(serviciosTelefono, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel5.add(serviciosTelefono, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
serviciosTotal = new NumberFormatedTextField();
|
||||
serviciosTotal.setEditable(false);
|
||||
panel5.add(serviciosTotal, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel5.add(serviciosTotal, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final Spacer spacer5 = new Spacer();
|
||||
panel5.add(spacer5, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||
panel5.add(spacer5, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0,
|
||||
false));
|
||||
serviciosOtro = new NumberFormatedTextField();
|
||||
panel5.add(serviciosOtro, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel5.add(serviciosOtro, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JLabel label29 = new JLabel();
|
||||
label29.setText("Otros:");
|
||||
panel5.add(label29, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel5.add(label29,
|
||||
new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JPanel panel6 = new JPanel();
|
||||
panel6.setLayout(new GridLayoutManager(8, 2, new Insets(10, 10, 10, 10), -1, -1));
|
||||
contentPanel.add(panel6, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel6.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Gastos Generales"));
|
||||
contentPanel.add(panel6,
|
||||
new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
panel6.setBorder(
|
||||
BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Gastos Generales"));
|
||||
gastosGeneralesCuentaCorrienteFactura = new NumberFormatedTextField();
|
||||
panel6.add(gastosGeneralesCuentaCorrienteFactura, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel6.add(gastosGeneralesCuentaCorrienteFactura,
|
||||
new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
gastosGeneralesCuentaCorrienteBoleta = new NumberFormatedTextField();
|
||||
panel6.add(gastosGeneralesCuentaCorrienteBoleta, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel6.add(gastosGeneralesCuentaCorrienteBoleta,
|
||||
new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
gastosGeneralesCuentaCorrienteSinRespaldo = new NumberFormatedTextField();
|
||||
panel6.add(gastosGeneralesCuentaCorrienteSinRespaldo, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel6.add(gastosGeneralesCuentaCorrienteSinRespaldo,
|
||||
new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
gastosGeneralesEfectivoFacturaField = new NumberFormatedTextField();
|
||||
gastosGeneralesEfectivoFacturaField.setEditable(false);
|
||||
panel6.add(gastosGeneralesEfectivoFacturaField, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel6.add(gastosGeneralesEfectivoFacturaField,
|
||||
new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
gastosGeneralesEfectivoBoletaField = new NumberFormatedTextField();
|
||||
gastosGeneralesEfectivoBoletaField.setEditable(false);
|
||||
panel6.add(gastosGeneralesEfectivoBoletaField, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel6.add(gastosGeneralesEfectivoBoletaField,
|
||||
new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
gastosGeneralesEfectivoSinRespaldo = new NumberFormatedTextField();
|
||||
gastosGeneralesEfectivoSinRespaldo.setEditable(false);
|
||||
panel6.add(gastosGeneralesEfectivoSinRespaldo, new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel6.add(gastosGeneralesEfectivoSinRespaldo,
|
||||
new GridConstraints(5, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
gastosGeneralesTotal = new NumberFormatedTextField();
|
||||
gastosGeneralesTotal.setEditable(false);
|
||||
panel6.add(gastosGeneralesTotal, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel6.add(gastosGeneralesTotal, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JLabel label30 = new JLabel();
|
||||
label30.setText("CTA CTE Con Factura:");
|
||||
panel6.add(label30, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel6.add(label30,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label31 = new JLabel();
|
||||
label31.setText("CTA CTE Con Boleta:");
|
||||
panel6.add(label31, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel6.add(label31,
|
||||
new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label32 = new JLabel();
|
||||
label32.setText("CTA CTE Sin Respaldo:");
|
||||
panel6.add(label32, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel6.add(label32,
|
||||
new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label33 = new JLabel();
|
||||
label33.setText("Efectivo Con Factura:");
|
||||
panel6.add(label33, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel6.add(label33,
|
||||
new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label34 = new JLabel();
|
||||
label34.setText("Efectivo Con Boleta:");
|
||||
panel6.add(label34, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel6.add(label34,
|
||||
new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label35 = new JLabel();
|
||||
label35.setText("Efectivo Sin Respaldo");
|
||||
panel6.add(label35, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel6.add(label35,
|
||||
new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label36 = new JLabel();
|
||||
label36.setText("Total:");
|
||||
panel6.add(label36, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel6.add(label36,
|
||||
new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final Spacer spacer6 = new Spacer();
|
||||
panel6.add(spacer6, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||
panel6.add(spacer6, new GridConstraints(6, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0,
|
||||
false));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,17 +27,27 @@ package danielcortes.xyz.views;
|
||||
import com.intellij.uiDesigner.core.GridConstraints;
|
||||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||
import com.intellij.uiDesigner.core.Spacer;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.Insets;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
public class InformesSideBar {
|
||||
|
||||
private JButton generarLibroVentasButton;
|
||||
private JPanel contentPanel;
|
||||
private JButton GenerarEgresosFacturasMateriaPrimaButton;
|
||||
private JButton estadoResultadoButton;
|
||||
private JButton volverButton;
|
||||
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
// >>> IMPORTANT!! <<<
|
||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||
$$$setupUI$$$();
|
||||
}
|
||||
|
||||
public JPanel getContentPanel() {
|
||||
return contentPanel;
|
||||
}
|
||||
@@ -58,17 +68,9 @@ public class InformesSideBar {
|
||||
return volverButton;
|
||||
}
|
||||
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
// >>> IMPORTANT!! <<<
|
||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||
$$$setupUI$$$();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method generated by IntelliJ IDEA GUI Designer
|
||||
* >>> IMPORTANT!! <<<
|
||||
* DO NOT edit this method OR call it in your code!
|
||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
|
||||
* call it in your code!
|
||||
*
|
||||
* @noinspection ALL
|
||||
*/
|
||||
@@ -77,22 +79,43 @@ public class InformesSideBar {
|
||||
contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||||
final JPanel panel1 = new JPanel();
|
||||
panel1.setLayout(new GridLayoutManager(5, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||
contentPanel.add(panel1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Informes Mensuales"));
|
||||
contentPanel.add(panel1,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
panel1.setBorder(
|
||||
BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Informes Mensuales"));
|
||||
generarLibroVentasButton = new JButton();
|
||||
generarLibroVentasButton.setText("Libro de Ventas Mensual");
|
||||
panel1.add(generarLibroVentasButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel1.add(generarLibroVentasButton,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
GenerarEgresosFacturasMateriaPrimaButton = new JButton();
|
||||
GenerarEgresosFacturasMateriaPrimaButton.setText("Informe de Egresos");
|
||||
panel1.add(GenerarEgresosFacturasMateriaPrimaButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel1.add(GenerarEgresosFacturasMateriaPrimaButton,
|
||||
new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
final Spacer spacer1 = new Spacer();
|
||||
panel1.add(spacer1, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||
panel1.add(spacer1, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0,
|
||||
false));
|
||||
estadoResultadoButton = new JButton();
|
||||
estadoResultadoButton.setText("Estado Resultado");
|
||||
panel1.add(estadoResultadoButton, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel1.add(estadoResultadoButton, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
volverButton = new JButton();
|
||||
volverButton.setText("Volver");
|
||||
panel1.add(volverButton, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel1.add(volverButton, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,16 +27,28 @@ package danielcortes.xyz.views;
|
||||
import com.intellij.uiDesigner.core.GridConstraints;
|
||||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||
import com.intellij.uiDesigner.core.Spacer;
|
||||
import danielcortes.xyz.models.tipo_ingreso.TipoIngreso;
|
||||
import danielcortes.xyz.models.tipo_ingreso.TipoIngresoToStringWrapper;
|
||||
import danielcortes.xyz.views.components.NumberFormatedTextField;
|
||||
import danielcortes.xyz.views.components.table_model.IngresosTableModel;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Insets;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.DefaultComboBoxModel;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTable;
|
||||
import javax.swing.JTextField;
|
||||
import javax.swing.ListSelectionModel;
|
||||
import javax.swing.RowSorter;
|
||||
import javax.swing.table.TableRowSorter;
|
||||
import java.awt.*;
|
||||
|
||||
public class IngresosView {
|
||||
|
||||
private JPanel contentPanel;
|
||||
private JTable ingresosTable;
|
||||
private JButton guardarButton;
|
||||
@@ -58,6 +70,13 @@ public class IngresosView {
|
||||
|
||||
private IngresosTableModel ingresosTableModel;
|
||||
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
// >>> IMPORTANT!! <<<
|
||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||
$$$setupUI$$$();
|
||||
}
|
||||
|
||||
private void createUIComponents() {
|
||||
this.createIngresosTable();
|
||||
this.createTipoCombo();
|
||||
@@ -152,18 +171,9 @@ public class IngresosView {
|
||||
return errorNroZInicial;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
// >>> IMPORTANT!! <<<
|
||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||
$$$setupUI$$$();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method generated by IntelliJ IDEA GUI Designer
|
||||
* >>> IMPORTANT!! <<<
|
||||
* DO NOT edit this method OR call it in your code!
|
||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
|
||||
* call it in your code!
|
||||
*
|
||||
* @noinspection ALL
|
||||
*/
|
||||
@@ -173,98 +183,184 @@ public class IngresosView {
|
||||
contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||||
final JPanel panel1 = new JPanel();
|
||||
panel1.setLayout(new GridLayoutManager(3, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||
contentPanel.add(panel1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Ingresos"));
|
||||
contentPanel.add(panel1,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
panel1.setBorder(
|
||||
BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Ingresos"));
|
||||
final JScrollPane scrollPane1 = new JScrollPane();
|
||||
panel1.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||
panel1.add(scrollPane1,
|
||||
new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null,
|
||||
null, null, 0, false));
|
||||
scrollPane1.setViewportView(ingresosTable);
|
||||
final JPanel panel2 = new JPanel();
|
||||
panel2.setLayout(new GridLayoutManager(3, 6, new Insets(0, 0, 0, 0), -1, -1));
|
||||
panel1.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(150, -1), null, 0, false));
|
||||
panel1.add(panel2,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null,
|
||||
new Dimension(150, -1), null, 0, false));
|
||||
final JLabel label1 = new JLabel();
|
||||
label1.setText("Tipo");
|
||||
panel2.add(label1, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(label1,
|
||||
new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();
|
||||
tipoCombo.setModel(defaultComboBoxModel1);
|
||||
panel2.add(tipoCombo, new GridConstraints(1, 5, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(tipoCombo, new GridConstraints(1, 5, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JLabel label2 = new JLabel();
|
||||
label2.setText("Valor");
|
||||
panel2.add(label2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(label2,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
valorField = new NumberFormatedTextField();
|
||||
panel2.add(valorField, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(valorField, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JLabel label3 = new JLabel();
|
||||
label3.setText("N° Inicial");
|
||||
panel2.add(label3, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(label3,
|
||||
new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label4 = new JLabel();
|
||||
label4.setText("N° Final");
|
||||
panel2.add(label4, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(label4,
|
||||
new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
nroInicialField = new JTextField();
|
||||
panel2.add(nroInicialField, new GridConstraints(1, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(nroInicialField, new GridConstraints(1, 3, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
nroFinalField = new JTextField();
|
||||
panel2.add(nroFinalField, new GridConstraints(1, 4, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(nroFinalField, new GridConstraints(1, 4, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
errorTipoIngreso = new JLabel();
|
||||
errorTipoIngreso.setForeground(new Color(-65536));
|
||||
errorTipoIngreso.setText("Label");
|
||||
errorTipoIngreso.setVisible(false);
|
||||
panel2.add(errorTipoIngreso, new GridConstraints(2, 5, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(errorTipoIngreso,
|
||||
new GridConstraints(2, 5, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
errorNroInicial = new JLabel();
|
||||
errorNroInicial.setForeground(new Color(-65536));
|
||||
errorNroInicial.setText("Label");
|
||||
errorNroInicial.setVisible(false);
|
||||
panel2.add(errorNroInicial, new GridConstraints(2, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(errorNroInicial,
|
||||
new GridConstraints(2, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
errorNroFinal = new JLabel();
|
||||
errorNroFinal.setForeground(new Color(-65536));
|
||||
errorNroFinal.setText("Label");
|
||||
errorNroFinal.setVisible(false);
|
||||
panel2.add(errorNroFinal, new GridConstraints(2, 4, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(errorNroFinal,
|
||||
new GridConstraints(2, 4, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label5 = new JLabel();
|
||||
label5.setText("N° Z Inicial");
|
||||
panel2.add(label5, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(label5,
|
||||
new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JLabel label6 = new JLabel();
|
||||
label6.setText("N° Z Final");
|
||||
panel2.add(label6, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(label6,
|
||||
new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
nroZInicialField = new JTextField();
|
||||
panel2.add(nroZInicialField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(nroZInicialField, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
nroZFinalField = new JTextField();
|
||||
panel2.add(nroZFinalField, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel2.add(nroZFinalField, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
errorNroZInicial = new JLabel();
|
||||
errorNroZInicial.setForeground(new Color(-65536));
|
||||
errorNroZInicial.setText("Label");
|
||||
errorNroZInicial.setVisible(false);
|
||||
panel2.add(errorNroZInicial, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(errorNroZInicial,
|
||||
new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
errorNroZFinal = new JLabel();
|
||||
errorNroZFinal.setForeground(new Color(-65536));
|
||||
errorNroZFinal.setText("Label");
|
||||
errorNroZFinal.setVisible(false);
|
||||
panel2.add(errorNroZFinal, new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(errorNroZFinal,
|
||||
new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
final JPanel panel3 = new JPanel();
|
||||
panel3.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||||
panel1.add(panel3, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel1.add(panel3,
|
||||
new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
final JPanel panel4 = new JPanel();
|
||||
panel4.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||||
panel3.add(panel4, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel3.add(panel4,
|
||||
new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
final JLabel label7 = new JLabel();
|
||||
label7.setText("Total Ingresos");
|
||||
panel4.add(label7, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel4.add(label7,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
totalIngresoField = new NumberFormatedTextField();
|
||||
totalIngresoField.setEditable(false);
|
||||
panel4.add(totalIngresoField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel4.add(totalIngresoField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final JPanel panel5 = new JPanel();
|
||||
panel5.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||||
panel3.add(panel5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel3.add(panel5,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
guardarButton = new JButton();
|
||||
guardarButton.setText("Añadir");
|
||||
guardarButton.setMnemonic('A');
|
||||
guardarButton.setDisplayedMnemonicIndex(0);
|
||||
panel5.add(guardarButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel5.add(guardarButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
eliminarButton = new JButton();
|
||||
eliminarButton.setText("Eliminar");
|
||||
panel5.add(eliminarButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel5.add(eliminarButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
editarButton = new JButton();
|
||||
editarButton.setText("Editar");
|
||||
panel5.add(editarButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
panel5.add(editarButton, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||
final Spacer spacer1 = new Spacer();
|
||||
panel3.add(spacer1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
|
||||
panel3.add(spacer1,
|
||||
new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,16 +3,26 @@ package danielcortes.xyz.views;
|
||||
import com.intellij.uiDesigner.core.GridConstraints;
|
||||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||
import com.intellij.uiDesigner.core.Spacer;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.Insets;
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
public class MainSideBar {
|
||||
|
||||
private JPanel contentPanel;
|
||||
private JButton informesMensualesButton;
|
||||
private JButton cajasButton;
|
||||
private JPanel buttonPanel;
|
||||
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
// >>> IMPORTANT!! <<<
|
||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||
$$$setupUI$$$();
|
||||
}
|
||||
|
||||
public JPanel getContentPanel() {
|
||||
return contentPanel;
|
||||
}
|
||||
@@ -29,18 +39,9 @@ public class MainSideBar {
|
||||
return cajasButton;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
// >>> IMPORTANT!! <<<
|
||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||
$$$setupUI$$$();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method generated by IntelliJ IDEA GUI Designer
|
||||
* >>> IMPORTANT!! <<<
|
||||
* DO NOT edit this method OR call it in your code!
|
||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
|
||||
* call it in your code!
|
||||
*
|
||||
* @noinspection ALL
|
||||
*/
|
||||
@@ -49,16 +50,30 @@ public class MainSideBar {
|
||||
contentPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||||
buttonPanel = new JPanel();
|
||||
buttonPanel.setLayout(new GridLayoutManager(3, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||
contentPanel.add(buttonPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
buttonPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), null));
|
||||
contentPanel.add(buttonPanel,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
buttonPanel
|
||||
.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), null));
|
||||
cajasButton = new JButton();
|
||||
cajasButton.setText("Cajas");
|
||||
buttonPanel.add(cajasButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
buttonPanel.add(cajasButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
final Spacer spacer1 = new Spacer();
|
||||
buttonPanel.add(spacer1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||
buttonPanel.add(spacer1, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0,
|
||||
false));
|
||||
informesMensualesButton = new JButton();
|
||||
informesMensualesButton.setText("Informes Mensuales");
|
||||
buttonPanel.add(informesMensualesButton, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
buttonPanel.add(informesMensualesButton,
|
||||
new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package danielcortes.xyz.views.components;
|
||||
|
||||
import org.mariuszgromada.math.mxparser.Expression;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.FocusEvent;
|
||||
import java.awt.event.FocusListener;
|
||||
import java.text.NumberFormat;
|
||||
import javax.swing.JTextField;
|
||||
import org.mariuszgromada.math.mxparser.Expression;
|
||||
|
||||
public class DoubleFormatedTextField extends JTextField {
|
||||
|
||||
private double value;
|
||||
private NumberFormat nf;
|
||||
|
||||
|
||||
@@ -24,21 +24,20 @@
|
||||
|
||||
package danielcortes.xyz.views.components;
|
||||
|
||||
import org.mariuszgromada.math.mxparser.Expression;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.FocusEvent;
|
||||
import java.awt.event.FocusListener;
|
||||
import java.text.NumberFormat;
|
||||
import javax.swing.JTextField;
|
||||
import org.mariuszgromada.math.mxparser.Expression;
|
||||
|
||||
/**
|
||||
* Crea un JTextField que formatea automaticamente su texto como un integer el cual se puede obtener
|
||||
* con el metodo getValue. Ademas de tener comportamientos especiales:
|
||||
* - Al ganar foco se selecciona todo el texto.
|
||||
* - Al perder foco formatea el texto como numero.
|
||||
* - Evalua la operacion matematica que se ingrese en el campo
|
||||
* con el metodo getValue. Ademas de tener comportamientos especiales: - Al ganar foco se selecciona
|
||||
* todo el texto. - Al perder foco formatea el texto como numero. - Evalua la operacion matematica
|
||||
* que se ingrese en el campo
|
||||
*/
|
||||
public class NumberFormatedTextField extends JTextField {
|
||||
|
||||
private int value;
|
||||
private NumberFormat nf;
|
||||
|
||||
@@ -54,9 +53,9 @@ public class NumberFormatedTextField extends JTextField {
|
||||
}
|
||||
|
||||
/**
|
||||
* Llama a readValue por un bug seguramente relacionado con el focus listener:
|
||||
* - No actualizaba el valor al momento de hacer requestfocus a otro componente, probablemente porque no alcanza
|
||||
* a realizarse la accion antes que ocurra la siguiente
|
||||
* Llama a readValue por un bug seguramente relacionado con el focus listener: - No actualizaba el
|
||||
* valor al momento de hacer requestfocus a otro componente, probablemente porque no alcanza a
|
||||
* realizarse la accion antes que ocurra la siguiente
|
||||
* <p>
|
||||
* Fuerza a que se lea el valor en el textfield antes de retornarlo
|
||||
*/
|
||||
@@ -74,8 +73,8 @@ public class NumberFormatedTextField extends JTextField {
|
||||
}
|
||||
|
||||
/**
|
||||
* Lee el valor en el texto, ejecuta la operacion matematica que en caso que exista una y la almacena en el valor
|
||||
* Si la operacion matematica es invalida, almacenara un 0
|
||||
* Lee el valor en el texto, ejecuta la operacion matematica que en caso que exista una y la
|
||||
* almacena en el valor Si la operacion matematica es invalida, almacenara un 0
|
||||
*/
|
||||
private void readValue() {
|
||||
String currentText = this.getText();
|
||||
@@ -97,6 +96,7 @@ public class NumberFormatedTextField extends JTextField {
|
||||
}
|
||||
|
||||
private class FieldFocusListener implements FocusListener {
|
||||
|
||||
/**
|
||||
* Selecciona todo al momento de ganar foco
|
||||
*/
|
||||
|
||||
@@ -24,10 +24,11 @@
|
||||
|
||||
package danielcortes.xyz.views.components;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.time.Year;
|
||||
import javax.swing.AbstractSpinnerModel;
|
||||
|
||||
public class YearSpinnerModel extends AbstractSpinnerModel {
|
||||
|
||||
private int value;
|
||||
private String showingValue;
|
||||
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
package danielcortes.xyz.views.components.table_model;
|
||||
|
||||
import danielcortes.xyz.models.egreso.Egreso;
|
||||
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.ArrayList;
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
|
||||
public class EgresosTableModel extends AbstractTableModel {
|
||||
|
||||
private String[] columns;
|
||||
private ArrayList<Egreso> rows;
|
||||
private NumberFormat nf;
|
||||
|
||||
@@ -25,10 +25,9 @@
|
||||
package danielcortes.xyz.views.components.table_model;
|
||||
|
||||
import danielcortes.xyz.models.calculo_fondo.CalculoFondo;
|
||||
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.ArrayList;
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
|
||||
public class FondoTableModel extends AbstractTableModel {
|
||||
|
||||
|
||||
@@ -25,19 +25,20 @@
|
||||
package danielcortes.xyz.views.components.table_model;
|
||||
|
||||
import danielcortes.xyz.models.ingreso.Ingreso;
|
||||
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.ArrayList;
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
|
||||
public class IngresosTableModel extends AbstractTableModel {
|
||||
|
||||
private String[] columns;
|
||||
private ArrayList<Ingreso> rows;
|
||||
private NumberFormat nf;
|
||||
|
||||
public IngresosTableModel() {
|
||||
super();
|
||||
this.columns = new String[]{"Valor", "N° Z Inicial", "N° Z Final", "N° Inicial", "N° Final", "Tipo"};
|
||||
this.columns = new String[]{"Valor", "N° Z Inicial", "N° Z Final", "N° Inicial", "N° Final",
|
||||
"Tipo"};
|
||||
this.rows = new ArrayList<>();
|
||||
this.nf = NumberFormat.getIntegerInstance();
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package danielcortes.xyz.views.dialogs;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.Desktop;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
public class InformeGeneratedConfirmation {
|
||||
|
||||
private Path path;
|
||||
|
||||
public InformeGeneratedConfirmation(Path path) {
|
||||
|
||||
@@ -29,15 +29,23 @@ import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||
import com.intellij.uiDesigner.core.Spacer;
|
||||
import danielcortes.xyz.views.components.YearSpinnerModel;
|
||||
import danielcortes.xyz.views.listeners.WindowClosingListener;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.Insets;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.time.LocalDate;
|
||||
import java.time.YearMonth;
|
||||
import java.util.ArrayList;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JSpinner;
|
||||
import javax.swing.KeyStroke;
|
||||
import javax.swing.SpinnerModel;
|
||||
|
||||
public class MonthSelectDialog extends JDialog {
|
||||
|
||||
private JPanel contentPane;
|
||||
private JButton buttonOK;
|
||||
private JButton buttonCancel;
|
||||
@@ -64,7 +72,9 @@ public class MonthSelectDialog extends JDialog {
|
||||
|
||||
this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
|
||||
this.addWindowListener((WindowClosingListener) e -> onCancel());
|
||||
this.contentPane.registerKeyboardAction(e -> onCancel(), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
|
||||
this.contentPane
|
||||
.registerKeyboardAction(e -> onCancel(), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),
|
||||
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
|
||||
|
||||
this.setLocationRelativeTo(null);
|
||||
pack();
|
||||
@@ -138,9 +148,8 @@ public class MonthSelectDialog extends JDialog {
|
||||
}
|
||||
|
||||
/**
|
||||
* Method generated by IntelliJ IDEA GUI Designer
|
||||
* >>> IMPORTANT!! <<<
|
||||
* DO NOT edit this method OR call it in your code!
|
||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
|
||||
* call it in your code!
|
||||
*
|
||||
* @noinspection ALL
|
||||
*/
|
||||
@@ -150,32 +159,64 @@ public class MonthSelectDialog extends JDialog {
|
||||
contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||
final JPanel panel1 = new JPanel();
|
||||
panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||||
contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
|
||||
contentPane.add(panel1,
|
||||
new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null,
|
||||
null, null, 0, false));
|
||||
final Spacer spacer1 = new Spacer();
|
||||
panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
|
||||
panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null,
|
||||
0, false));
|
||||
final JPanel panel2 = new JPanel();
|
||||
panel2.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));
|
||||
panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel1.add(panel2,
|
||||
new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
buttonOK = new JButton();
|
||||
buttonOK.setText("OK");
|
||||
panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
buttonCancel = new JButton();
|
||||
buttonCancel.setText("Cancelar");
|
||||
panel2.add(buttonCancel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(buttonCancel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
final JPanel panel3 = new JPanel();
|
||||
panel3.setLayout(new GridLayoutManager(3, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||||
contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
contentPane.add(panel3,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
final JLabel label1 = new JLabel();
|
||||
label1.setText("Mes");
|
||||
panel3.add(label1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(monthCombo, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(label1,
|
||||
new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
panel3.add(monthCombo, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
final JLabel label2 = new JLabel();
|
||||
label2.setText("Año");
|
||||
panel3.add(label2, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(yearSpinner, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(label2,
|
||||
new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
panel3.add(yearSpinner, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
final JLabel label3 = new JLabel();
|
||||
label3.setText("Seleccione Mes y Año");
|
||||
panel3.add(label3, new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(label3,
|
||||
new GridConstraints(0, 0, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -30,12 +30,18 @@ import danielcortes.xyz.data.DAOManager;
|
||||
import danielcortes.xyz.models.tipo_egreso.TipoEgreso;
|
||||
import danielcortes.xyz.models.tipo_egreso.TipoEgresoToStringWrapper;
|
||||
import danielcortes.xyz.views.listeners.WindowClosingListener;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.Insets;
|
||||
import java.awt.event.KeyEvent;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.KeyStroke;
|
||||
|
||||
public class TipoEgresoSelectDialog extends JDialog {
|
||||
|
||||
private JPanel contentPane;
|
||||
private JButton buttonOK;
|
||||
private JButton buttonCancel;
|
||||
@@ -58,7 +64,9 @@ public class TipoEgresoSelectDialog extends JDialog {
|
||||
|
||||
this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
|
||||
this.addWindowListener((WindowClosingListener) e -> onCancel());
|
||||
this.contentPane.registerKeyboardAction(e -> onCancel(), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
|
||||
this.contentPane
|
||||
.registerKeyboardAction(e -> onCancel(), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),
|
||||
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
|
||||
|
||||
this.setLocationRelativeTo(null);
|
||||
this.pack();
|
||||
@@ -104,9 +112,8 @@ public class TipoEgresoSelectDialog extends JDialog {
|
||||
}
|
||||
|
||||
/**
|
||||
* Method generated by IntelliJ IDEA GUI Designer
|
||||
* >>> IMPORTANT!! <<<
|
||||
* DO NOT edit this method OR call it in your code!
|
||||
* Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
|
||||
* call it in your code!
|
||||
*
|
||||
* @noinspection ALL
|
||||
*/
|
||||
@@ -116,23 +123,45 @@ public class TipoEgresoSelectDialog extends JDialog {
|
||||
contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||
final JPanel panel1 = new JPanel();
|
||||
panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||||
contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
|
||||
contentPane.add(panel1,
|
||||
new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null,
|
||||
null, null, 0, false));
|
||||
final JPanel panel2 = new JPanel();
|
||||
panel2.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));
|
||||
panel1.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel1.add(panel2,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
buttonOK = new JButton();
|
||||
buttonOK.setText("OK");
|
||||
panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
buttonCancel = new JButton();
|
||||
buttonCancel.setText("Cancel");
|
||||
panel2.add(buttonCancel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel2.add(buttonCancel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER,
|
||||
GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
final JPanel panel3 = new JPanel();
|
||||
panel3.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||||
contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||
panel3.add(tipoEgresoCombo, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
contentPane.add(panel3,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null,
|
||||
null, 0, false));
|
||||
panel3.add(tipoEgresoCombo, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST,
|
||||
GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
final JLabel label1 = new JLabel();
|
||||
label1.setText("Seleccione el Tipo de Egreso:");
|
||||
panel3.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
panel3.add(label1,
|
||||
new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0,
|
||||
false));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
package danielcortes.xyz.views.dialogs;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.filechooser.FileNameExtensionFilter;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.*;
|
||||
import java.nio.file.FileAlreadyExistsException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.InvalidPathException;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.filechooser.FileNameExtensionFilter;
|
||||
|
||||
public class XLSFileChooser {
|
||||
|
||||
private JFileChooser chooser;
|
||||
|
||||
public XLSFileChooser(String suggestedName) {
|
||||
|
||||
@@ -4,8 +4,10 @@ import java.awt.event.FocusEvent;
|
||||
import java.awt.event.FocusListener;
|
||||
|
||||
public interface FocusLostListener extends FocusListener {
|
||||
|
||||
@Override
|
||||
default void focusGained(FocusEvent e){ }
|
||||
default void focusGained(FocusEvent e) {
|
||||
}
|
||||
|
||||
@Override
|
||||
void focusLost(FocusEvent e);
|
||||
|
||||
@@ -7,12 +7,24 @@ import java.awt.event.WindowListener;
|
||||
* Simple wraper for WindowListener to simple use the windowClosing method in a lambda function
|
||||
*/
|
||||
public interface WindowClosingListener extends WindowListener {
|
||||
default void windowOpened(WindowEvent e){}
|
||||
default void windowClosed(WindowEvent e){}
|
||||
default void windowIconified(WindowEvent e){}
|
||||
default void windowDeiconified(WindowEvent e){}
|
||||
default void windowActivated(WindowEvent e){}
|
||||
default void windowDeactivated(WindowEvent e){}
|
||||
|
||||
default void windowOpened(WindowEvent e) {
|
||||
}
|
||||
|
||||
default void windowClosed(WindowEvent e) {
|
||||
}
|
||||
|
||||
default void windowIconified(WindowEvent e) {
|
||||
}
|
||||
|
||||
default void windowDeiconified(WindowEvent e) {
|
||||
}
|
||||
|
||||
default void windowActivated(WindowEvent e) {
|
||||
}
|
||||
|
||||
default void windowDeactivated(WindowEvent e) {
|
||||
}
|
||||
|
||||
void windowClosing(WindowEvent e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user