Agregado en documentos el campo de retiros

This commit is contained in:
Daniel Cortes
2019-01-12 18:39:29 -03:00
parent 3b6baf3bed
commit aefe3f1bb4
10 changed files with 395 additions and 288 deletions

View File

@@ -109,6 +109,7 @@ public class ArqueoController {
this.documentos = this.documentosDAO.findByCaja(caja);
this.view.getTarjetasField().setValue(documentos.getTarjetas());
this.view.getChequesField().setValue(documentos.getCheques());
this.view.getRetiroField().setValue(documentos.getRetiros());
}
/**
@@ -197,9 +198,12 @@ public class ArqueoController {
this.view.getChequesField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"),"nextField");
this.view.getTarjetasField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"),"save");
this.view.getTarjetasField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"),"nextField");
this.view.getRetiroField().getInputMap(JComponent.WHEN_FOCUSED).put(KeyStroke.getKeyStroke("ENTER"),"save");
this.view.getChequesField().getActionMap().put("nextField", new NextAction(this.view.getTarjetasField()));
this.view.getTarjetasField().getActionMap().put("save", new GuardarDocumentosAction(this));
this.view.getTarjetasField().getActionMap().put("nextField", new NextAction(this.view.getRetiroField()));
this.view.getRetiroField().getActionMap().put("save", new GuardarDocumentosAction(this));
this.view.getGuardarEfectivoButton().addActionListener(e ->{
this.guardarEfectivoActionListener();
@@ -266,9 +270,11 @@ public class ArqueoController {
private void guardarDocumentos() {
int tarjetas = this.view.getTarjetasField().getValue();
int cheques = this.view.getChequesField().getValue();
int retiros = this.view.getRetiroField().getValue();
this.documentos.setTarjetas(tarjetas);
this.documentos.setCheques(cheques);
this.documentos.setRetiros(retiros);
this.documentosDAO.updateDocumentos(documentos);
this.updateResumenDocumentos();