AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
This commit is contained in:
@@ -2,6 +2,7 @@ package bean;
|
|||||||
|
|
||||||
import beans.CompraTarjetaCreditoFacadeLocal;
|
import beans.CompraTarjetaCreditoFacadeLocal;
|
||||||
import beans.CompraTarjetaDebitoFacadeLocal;
|
import beans.CompraTarjetaDebitoFacadeLocal;
|
||||||
|
import beans.LineaSobregiroFacadeLocal;
|
||||||
import beans.TarjetaCreditoFacadeLocal;
|
import beans.TarjetaCreditoFacadeLocal;
|
||||||
import beans.TarjetaDebitoFacadeLocal;
|
import beans.TarjetaDebitoFacadeLocal;
|
||||||
import entities.CompraTarjetaCredito;
|
import entities.CompraTarjetaCredito;
|
||||||
@@ -28,6 +29,8 @@ public class CompraBean implements Serializable {
|
|||||||
private TarjetaDebitoFacadeLocal tarjetaDebitoFacade;
|
private TarjetaDebitoFacadeLocal tarjetaDebitoFacade;
|
||||||
@EJB
|
@EJB
|
||||||
private TarjetaCreditoFacadeLocal tarjetaCreditoFacade;
|
private TarjetaCreditoFacadeLocal tarjetaCreditoFacade;
|
||||||
|
@EJB
|
||||||
|
private LineaSobregiroFacadeLocal lineaSobregiroFacade;
|
||||||
|
|
||||||
private TarjetaDebito tarjetaDebito;
|
private TarjetaDebito tarjetaDebito;
|
||||||
private TarjetaCredito tarjetaCredito;
|
private TarjetaCredito tarjetaCredito;
|
||||||
@@ -71,19 +74,30 @@ public class CompraBean implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String comprarTarjetaCredito() {
|
public String comprarTarjetaCredito() {
|
||||||
|
int overLimit = 0;
|
||||||
|
int overSobregiro = 0;
|
||||||
|
|
||||||
if (tipo.equals("Nacional")) {
|
if (tipo.equals("Nacional")) {
|
||||||
if (tarjetaCredito.getDeudaNacional() + monto > tarjetaCredito.getLimiteNacional()) {
|
overLimit = tarjetaCredito.getDeudaNacional() + monto - tarjetaCredito.getLimiteNacional();
|
||||||
FacesContext context = FacesContext.getCurrentInstance();
|
if (overLimit > 0) {
|
||||||
context.addMessage(null, new FacesMessage("La compra sobrepasa el limite nacional de su cuenta"));
|
overSobregiro = overLimit + tarjetaCredito.getLineaSobregiro().getSobregiro() - tarjetaCredito.getLineaSobregiro().getLimite();
|
||||||
context.validationFailed();
|
if (tarjetaCredito.getLineaSobregiro() != null && overSobregiro > 0) {
|
||||||
return "cliente_tarjeta_credito_compra";
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
|
context.addMessage(null, new FacesMessage("La compra sobrepasa el limite nacional y el de de su linea de sobregiro"));
|
||||||
|
context.validationFailed();
|
||||||
|
return "cliente_tarjeta_credito_compra";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (tipo.equals("Internacional")) {
|
} else if (tipo.equals("Internacional")) {
|
||||||
if (tarjetaCredito.getDeudaInternacional() + monto > tarjetaCredito.getLimiteInternacional()) {
|
overLimit = tarjetaCredito.getDeudaInternacional() + monto - tarjetaCredito.getLimiteInternacional();
|
||||||
FacesContext context = FacesContext.getCurrentInstance();
|
if (overLimit > 0) {
|
||||||
context.addMessage(null, new FacesMessage("La compra sobrepasa el limite internacional de su cuenta"));
|
overSobregiro = overLimit + tarjetaCredito.getLineaSobregiro().getSobregiro() - tarjetaCredito.getLineaSobregiro().getLimite();
|
||||||
context.validationFailed();
|
if (tarjetaCredito.getLineaSobregiro() != null && overSobregiro > 0) {
|
||||||
return "cliente_tarjeta_credito_compra";
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
|
context.addMessage(null, new FacesMessage("La compra sobrepasa el limite internacional y el de de su linea de sobregiro"));
|
||||||
|
context.validationFailed();
|
||||||
|
return "cliente_tarjeta_credito_compra";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,16 +109,30 @@ public class CompraBean implements Serializable {
|
|||||||
|
|
||||||
switch (tipo) {
|
switch (tipo) {
|
||||||
case "Nacional":
|
case "Nacional":
|
||||||
tarjetaCredito.setDeudaNacional(tarjetaCredito.getDeudaNacional() + monto);
|
if (overLimit > 0) {
|
||||||
|
tarjetaCredito.getLineaSobregiro().setSobregiro(tarjetaCredito.getLineaSobregiro().getSobregiro() + overLimit);
|
||||||
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
|
context.addMessage(null, new FacesMessage("Se utilizo la linea de sobregiro para completar la compra"));
|
||||||
|
tarjetaCredito.setDeudaNacional(tarjetaCredito.getDeudaNacional() + monto - overLimit);
|
||||||
|
} else {
|
||||||
|
tarjetaCredito.setDeudaNacional(tarjetaCredito.getDeudaNacional() + monto);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "Internacional":
|
case "Internacional":
|
||||||
tarjetaCredito.setDeudaInternacional(tarjetaCredito.getDeudaInternacional() + monto);
|
if (overLimit > 0) {
|
||||||
|
tarjetaCredito.getLineaSobregiro().setSobregiro(tarjetaCredito.getLineaSobregiro().getSobregiro() + overLimit);
|
||||||
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
|
context.addMessage(null, new FacesMessage("Se utilizo la linea de sobregiro para completar la compra"));
|
||||||
|
tarjetaCredito.setDeudaInternacional(tarjetaCredito.getDeudaInternacional() + monto - overLimit);
|
||||||
|
} else {
|
||||||
|
tarjetaCredito.setDeudaInternacional(tarjetaCredito.getDeudaInternacional() + monto);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
compraTarjetaCreditoFacade.create(compra);
|
compraTarjetaCreditoFacade.create(compra);
|
||||||
tarjetaCreditoFacade.edit(tarjetaCredito);
|
tarjetaCreditoFacade.edit(tarjetaCredito);
|
||||||
|
lineaSobregiroFacade.edit(tarjetaCredito.getLineaSobregiro());
|
||||||
this.resetInput();
|
this.resetInput();
|
||||||
|
|
||||||
return "cliente_tarjeta_credito_view";
|
return "cliente_tarjeta_credito_view";
|
||||||
@@ -136,7 +164,6 @@ public class CompraBean implements Serializable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
switch (compraTarjetaCredito.getTipo()) {
|
switch (compraTarjetaCredito.getTipo()) {
|
||||||
case "Nacional":
|
case "Nacional":
|
||||||
tarjetaCredito.setDeudaNacional(tarjetaCredito.getDeudaNacional() - compraTarjetaCredito.getMonto());
|
tarjetaCredito.setDeudaNacional(tarjetaCredito.getDeudaNacional() - compraTarjetaCredito.getMonto());
|
||||||
@@ -145,11 +172,11 @@ public class CompraBean implements Serializable {
|
|||||||
tarjetaCredito.setDeudaInternacional(tarjetaCredito.getDeudaInternacional() - compraTarjetaCredito.getMonto());
|
tarjetaCredito.setDeudaInternacional(tarjetaCredito.getDeudaInternacional() - compraTarjetaCredito.getMonto());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
tarjetaCredito.getCompraList().remove(compraTarjetaCredito);
|
tarjetaCredito.getCompraList().remove(compraTarjetaCredito);
|
||||||
compraTarjetaCreditoFacade.remove(compraTarjetaCredito);
|
compraTarjetaCreditoFacade.remove(compraTarjetaCredito);
|
||||||
tarjetaCreditoFacade.edit(tarjetaCredito);
|
tarjetaCreditoFacade.edit(tarjetaCredito);
|
||||||
|
|
||||||
return "admin_tarjeta_credito_view";
|
return "admin_tarjeta_credito_view";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,17 @@ package bean;
|
|||||||
|
|
||||||
import beans.ClienteFacadeLocal;
|
import beans.ClienteFacadeLocal;
|
||||||
import beans.CuentaCorrienteFacadeLocal;
|
import beans.CuentaCorrienteFacadeLocal;
|
||||||
|
import beans.DepositoCuentaCorrienteFacade;
|
||||||
|
import beans.DepositoCuentaCorrienteFacadeLocal;
|
||||||
|
import beans.GiroCuentaCorrienteFacadeLocal;
|
||||||
|
import beans.TransferenciaCuentaCorrienteFacadeLocal;
|
||||||
import entities.Cliente;
|
import entities.Cliente;
|
||||||
import entities.CuentaCorriente;
|
import entities.CuentaCorriente;
|
||||||
import entities.DepositoCuentaCorriente;
|
import entities.DepositoCuentaCorriente;
|
||||||
import entities.GiroCuentaCorriente;
|
import entities.GiroCuentaCorriente;
|
||||||
import entities.TransferenciaCuentaCorriente;
|
import entities.TransferenciaCuentaCorriente;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
import javax.ejb.EJB;
|
import javax.ejb.EJB;
|
||||||
import javax.enterprise.context.SessionScoped;
|
import javax.enterprise.context.SessionScoped;
|
||||||
import javax.faces.context.FacesContext;
|
import javax.faces.context.FacesContext;
|
||||||
@@ -18,6 +23,12 @@ import javax.inject.Named;
|
|||||||
public class CuentaCorrienteBean implements Serializable{
|
public class CuentaCorrienteBean implements Serializable{
|
||||||
@EJB
|
@EJB
|
||||||
private CuentaCorrienteFacadeLocal cuentaCorrienteFacade;
|
private CuentaCorrienteFacadeLocal cuentaCorrienteFacade;
|
||||||
|
@EJB
|
||||||
|
private GiroCuentaCorrienteFacadeLocal giroCuentaCorrienteFacade;
|
||||||
|
@EJB
|
||||||
|
private TransferenciaCuentaCorrienteFacadeLocal transferenciaCuentaCorrienteFacadeLocal;
|
||||||
|
@EJB
|
||||||
|
private DepositoCuentaCorrienteFacadeLocal depositoCuentaCorrienteFacadeLocal;
|
||||||
@EJB
|
@EJB
|
||||||
private ClienteFacadeLocal clienteFacade;
|
private ClienteFacadeLocal clienteFacade;
|
||||||
|
|
||||||
@@ -46,7 +57,7 @@ public class CuentaCorrienteBean implements Serializable{
|
|||||||
public String gotoDeleteDeposito(DepositoCuentaCorriente deposito) {
|
public String gotoDeleteDeposito(DepositoCuentaCorriente deposito) {
|
||||||
FacesContext context = FacesContext.getCurrentInstance();
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
DepositoBean db = context.getApplication().evaluateExpressionGet(context, "#{depositoBean}", DepositoBean.class);
|
DepositoBean db = context.getApplication().evaluateExpressionGet(context, "#{depositoBean}", DepositoBean.class);
|
||||||
db.setCuentaCorriente(cuentaCorriente);
|
db.setCuentaCorriente(deposito.getCuentaCorriente());
|
||||||
db.setDepositoCuentaCorriente(deposito);
|
db.setDepositoCuentaCorriente(deposito);
|
||||||
return "admin_cuenta_corriente_delete_deposito";
|
return "admin_cuenta_corriente_delete_deposito";
|
||||||
}
|
}
|
||||||
@@ -62,7 +73,7 @@ public class CuentaCorrienteBean implements Serializable{
|
|||||||
public String gotoDeleteGiro(GiroCuentaCorriente giro) {
|
public String gotoDeleteGiro(GiroCuentaCorriente giro) {
|
||||||
FacesContext context = FacesContext.getCurrentInstance();
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
GiroBean gb = context.getApplication().evaluateExpressionGet(context, "#{giroBean}", GiroBean.class);
|
GiroBean gb = context.getApplication().evaluateExpressionGet(context, "#{giroBean}", GiroBean.class);
|
||||||
gb.setCuentaCorriente(cuentaCorriente);
|
gb.setCuentaCorriente(giro.getCuentaCorriente());
|
||||||
gb.setGiroCuentaCorriente(giro);
|
gb.setGiroCuentaCorriente(giro);
|
||||||
return "admin_cuenta_corriente_delete_giro";
|
return "admin_cuenta_corriente_delete_giro";
|
||||||
}
|
}
|
||||||
@@ -76,11 +87,17 @@ public class CuentaCorrienteBean implements Serializable{
|
|||||||
public String gotoDeleteTransferencia(TransferenciaCuentaCorriente transferencia) {
|
public String gotoDeleteTransferencia(TransferenciaCuentaCorriente transferencia) {
|
||||||
FacesContext context = FacesContext.getCurrentInstance();
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
TransferenciaBean tb = context.getApplication().evaluateExpressionGet(context, "#{transferenciaBean}", TransferenciaBean.class);
|
TransferenciaBean tb = context.getApplication().evaluateExpressionGet(context, "#{transferenciaBean}", TransferenciaBean.class);
|
||||||
tb.setCuentaCorriente(cuentaCorriente);
|
|
||||||
tb.setTransferenciaCuentaCorriente(transferencia);
|
tb.setTransferenciaCuentaCorriente(transferencia);
|
||||||
return "admin_cuenta_corriente_delete_transferencia";
|
return "admin_cuenta_corriente_delete_transferencia";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String gotoPagarSobregiro() {
|
||||||
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
|
LineaSobregiroBean lsb = context.getApplication().evaluateExpressionGet(context, "#{lineaSobregiroBean}", LineaSobregiroBean.class);
|
||||||
|
lsb.setLineaSobregiro(cuentaCorriente.getLineaSobregiro());
|
||||||
|
return "cliente_cuenta_corriente_sobregiro_pagar";
|
||||||
|
}
|
||||||
|
|
||||||
public CuentaCorriente getCuentaCorriente() {
|
public CuentaCorriente getCuentaCorriente() {
|
||||||
return cuentaCorriente;
|
return cuentaCorriente;
|
||||||
}
|
}
|
||||||
@@ -97,5 +114,17 @@ public class CuentaCorrienteBean implements Serializable{
|
|||||||
this.cliente = cliente;
|
this.cliente = cliente;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<GiroCuentaCorriente> getGiroList() {
|
||||||
|
return this.giroCuentaCorrienteFacade.findAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DepositoCuentaCorriente> getDepositoList() {
|
||||||
|
return this.depositoCuentaCorrienteFacadeLocal.findAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<TransferenciaCuentaCorriente> getTransferenciaList() {
|
||||||
|
return this.transferenciaCuentaCorrienteFacadeLocal.findAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import beans.LineaSobregiroFacadeLocal;
|
|||||||
import beans.TarjetaCreditoFacadeLocal;
|
import beans.TarjetaCreditoFacadeLocal;
|
||||||
import entities.CuentaCorriente;
|
import entities.CuentaCorriente;
|
||||||
import entities.LineaSobregiro;
|
import entities.LineaSobregiro;
|
||||||
|
import entities.LineaSobregiro_;
|
||||||
import entities.TarjetaCredito;
|
import entities.TarjetaCredito;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import javax.ejb.EJB;
|
import javax.ejb.EJB;
|
||||||
@@ -16,59 +17,102 @@ import javax.inject.Named;
|
|||||||
@Named(value = "lineaSobregiroBean")
|
@Named(value = "lineaSobregiroBean")
|
||||||
@SessionScoped
|
@SessionScoped
|
||||||
public class LineaSobregiroBean implements Serializable {
|
public class LineaSobregiroBean implements Serializable {
|
||||||
|
|
||||||
@EJB
|
@EJB
|
||||||
private LineaSobregiroFacadeLocal lineaSobregiroFacade;
|
private LineaSobregiroFacadeLocal lineaSobregiroFacade;
|
||||||
@EJB
|
@EJB
|
||||||
private TarjetaCreditoFacadeLocal tarjetaCreditoFacade;
|
private TarjetaCreditoFacadeLocal tarjetaCreditoFacade;
|
||||||
@EJB
|
@EJB
|
||||||
private CuentaCorrienteFacadeLocal cuentaCorrienteFacade;
|
private CuentaCorrienteFacadeLocal cuentaCorrienteFacade;
|
||||||
|
|
||||||
private TarjetaCredito tarjetaCredito;
|
private TarjetaCredito tarjetaCredito;
|
||||||
private CuentaCorriente cuentaCorriente;
|
private CuentaCorriente cuentaCorriente;
|
||||||
|
|
||||||
private LineaSobregiro lineaSobregiro;
|
private LineaSobregiro lineaSobregiro;
|
||||||
|
|
||||||
|
private int monto;
|
||||||
private int limite;
|
private int limite;
|
||||||
|
|
||||||
|
|
||||||
public String contratarParaTarjetaCredito() {
|
public String contratarParaTarjetaCredito() {
|
||||||
if(limite <= 0) {
|
if (limite <= 0) {
|
||||||
FacesContext context = FacesContext.getCurrentInstance();
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
context.addMessage(null, new FacesMessage("El limite tiene que ser mayor a 0"));
|
context.addMessage(null, new FacesMessage("El limite tiene que ser mayor a 0"));
|
||||||
context.validationFailed();
|
context.validationFailed();
|
||||||
return "admin_linea_sobregiro_credito_contratar";
|
return "admin_linea_sobregiro_credito_contratar";
|
||||||
}
|
}
|
||||||
|
|
||||||
LineaSobregiro lineaSobregiro = new LineaSobregiro();
|
LineaSobregiro lineaSobregiro = new LineaSobregiro();
|
||||||
lineaSobregiro.setLimite(limite);
|
lineaSobregiro.setLimite(limite);
|
||||||
|
|
||||||
tarjetaCredito.setLineaSobregiro(lineaSobregiro);
|
tarjetaCredito.setLineaSobregiro(lineaSobregiro);
|
||||||
|
|
||||||
lineaSobregiroFacade.create(lineaSobregiro);
|
lineaSobregiroFacade.create(lineaSobregiro);
|
||||||
tarjetaCreditoFacade.edit(tarjetaCredito);
|
tarjetaCreditoFacade.edit(tarjetaCredito);
|
||||||
|
|
||||||
return "admin_tarjeta_credito_view";
|
return "admin_tarjeta_credito_view";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String contratarParaCuentaCorriente() {
|
public String contratarParaCuentaCorriente() {
|
||||||
if(limite <= 0) {
|
if (limite <= 0) {
|
||||||
FacesContext context = FacesContext.getCurrentInstance();
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
context.addMessage(null, new FacesMessage("El limite tiene que ser mayor a 0"));
|
context.addMessage(null, new FacesMessage("El limite tiene que ser mayor a 0"));
|
||||||
context.validationFailed();
|
context.validationFailed();
|
||||||
return "admin_linea_sobregiro_corriente_contratar";
|
return "admin_linea_sobregiro_corriente_contratar";
|
||||||
}
|
}
|
||||||
|
|
||||||
LineaSobregiro lineaSobregiro = new LineaSobregiro();
|
LineaSobregiro lineaSobregiro = new LineaSobregiro();
|
||||||
lineaSobregiro.setLimite(limite);
|
lineaSobregiro.setLimite(limite);
|
||||||
|
|
||||||
cuentaCorriente.setLineaSobregiro(lineaSobregiro);
|
cuentaCorriente.setLineaSobregiro(lineaSobregiro);
|
||||||
|
|
||||||
lineaSobregiroFacade.create(lineaSobregiro);
|
lineaSobregiroFacade.create(lineaSobregiro);
|
||||||
cuentaCorrienteFacade.edit(cuentaCorriente);
|
cuentaCorrienteFacade.edit(cuentaCorriente);
|
||||||
|
|
||||||
return "admin_cuenta_corriente_view";
|
return "admin_cuenta_corriente_view";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String pagarSobregiroCredito() {
|
||||||
|
if (lineaSobregiro.getSobregiro() == 0) {
|
||||||
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
|
context.addMessage(null, new FacesMessage("No hay ningun sobregiro que pagar"));
|
||||||
|
context.validationFailed();
|
||||||
|
return "cliente_tarjeta_credito_sobregiro_pagar";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lineaSobregiro.getSobregiro() - monto < 0) {
|
||||||
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
|
context.addMessage(null, new FacesMessage("El pago sobrepasa la deuda"));
|
||||||
|
context.validationFailed();
|
||||||
|
return "cliente_tarjeta_credito_sobregiro_pagar";
|
||||||
|
}
|
||||||
|
|
||||||
|
lineaSobregiro.setSobregiro(lineaSobregiro.getSobregiro() - monto);
|
||||||
|
lineaSobregiroFacade.edit(lineaSobregiro);
|
||||||
|
|
||||||
|
return "cliente_tarjeta_credito_view";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String pagarSobregiroCorriente() {
|
||||||
|
if (lineaSobregiro.getSobregiro() == 0) {
|
||||||
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
|
context.addMessage(null, new FacesMessage("No hay ningun sobregiro que pagar"));
|
||||||
|
context.validationFailed();
|
||||||
|
return "cliente_cuenta_corriente_sobregiro_pagar";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lineaSobregiro.getSobregiro() - monto < 0) {
|
||||||
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
|
context.addMessage(null, new FacesMessage("El pago sobrepasa la deuda"));
|
||||||
|
context.validationFailed();
|
||||||
|
return "cliente_cuenta_corriente_sobregiro_pagar";
|
||||||
|
}
|
||||||
|
|
||||||
|
lineaSobregiro.setSobregiro(lineaSobregiro.getSobregiro() - monto);
|
||||||
|
lineaSobregiroFacade.edit(lineaSobregiro);
|
||||||
|
|
||||||
|
return "cliente_cuenta_corriente_view";
|
||||||
|
}
|
||||||
|
|
||||||
public TarjetaCredito getTarjetaCredito() {
|
public TarjetaCredito getTarjetaCredito() {
|
||||||
return tarjetaCredito;
|
return tarjetaCredito;
|
||||||
}
|
}
|
||||||
@@ -85,7 +129,6 @@ public class LineaSobregiroBean implements Serializable {
|
|||||||
this.cuentaCorriente = cuentaCorriente;
|
this.cuentaCorriente = cuentaCorriente;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public LineaSobregiro getLineaSobregiro() {
|
public LineaSobregiro getLineaSobregiro() {
|
||||||
return lineaSobregiro;
|
return lineaSobregiro;
|
||||||
}
|
}
|
||||||
@@ -101,7 +144,12 @@ public class LineaSobregiroBean implements Serializable {
|
|||||||
public void setLimite(int limite) {
|
public void setLimite(int limite) {
|
||||||
this.limite = limite;
|
this.limite = limite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getMonto() {
|
||||||
|
return monto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMonto(int monto) {
|
||||||
|
this.monto = monto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
package bean;
|
package bean;
|
||||||
|
|
||||||
import beans.ClienteFacadeLocal;
|
import beans.ClienteFacadeLocal;
|
||||||
|
import beans.CompraTarjetaCreditoFacade;
|
||||||
|
import beans.CompraTarjetaCreditoFacadeLocal;
|
||||||
|
import beans.PagoTarjetaCreditoFacadeLocal;
|
||||||
import beans.TarjetaCreditoFacadeLocal;
|
import beans.TarjetaCreditoFacadeLocal;
|
||||||
import entities.Cliente;
|
import entities.Cliente;
|
||||||
import entities.CompraTarjetaCredito;
|
import entities.CompraTarjetaCredito;
|
||||||
@@ -8,6 +11,7 @@ import entities.PagoTarjetaCredito;
|
|||||||
import entities.TarjetaCredito;
|
import entities.TarjetaCredito;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import javax.ejb.EJB;
|
import javax.ejb.EJB;
|
||||||
import javax.enterprise.context.SessionScoped;
|
import javax.enterprise.context.SessionScoped;
|
||||||
@@ -22,6 +26,10 @@ public class TarjetaCreditoBean implements Serializable {
|
|||||||
private TarjetaCreditoFacadeLocal tarjetaCreditoFacade;
|
private TarjetaCreditoFacadeLocal tarjetaCreditoFacade;
|
||||||
@EJB
|
@EJB
|
||||||
private ClienteFacadeLocal clienteFacade;
|
private ClienteFacadeLocal clienteFacade;
|
||||||
|
@EJB
|
||||||
|
private CompraTarjetaCreditoFacadeLocal compraTarjetaCreditoFacade;
|
||||||
|
@EJB
|
||||||
|
private PagoTarjetaCreditoFacadeLocal pagoTarjetaCreditoFacade;
|
||||||
|
|
||||||
private Cliente cliente;
|
private Cliente cliente;
|
||||||
private TarjetaCredito tarjetaCredito;
|
private TarjetaCredito tarjetaCredito;
|
||||||
@@ -41,7 +49,7 @@ public class TarjetaCreditoBean implements Serializable {
|
|||||||
this.resetClases();
|
this.resetClases();
|
||||||
return "admin_cliente_view";
|
return "admin_cliente_view";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String gotoContratarLineaSobregiro() {
|
public String gotoContratarLineaSobregiro() {
|
||||||
FacesContext context = FacesContext.getCurrentInstance();
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
LineaSobregiroBean lineaSobregiroBean = context.getApplication().evaluateExpressionGet(context, "#{lineaSobregiroBean}", LineaSobregiroBean.class);
|
LineaSobregiroBean lineaSobregiroBean = context.getApplication().evaluateExpressionGet(context, "#{lineaSobregiroBean}", LineaSobregiroBean.class);
|
||||||
@@ -80,6 +88,13 @@ public class TarjetaCreditoBean implements Serializable {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String gotoPagarSobregiro() {
|
||||||
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
|
LineaSobregiroBean lsb = context.getApplication().evaluateExpressionGet(context, "#{lineaSobregiroBean}", LineaSobregiroBean.class);
|
||||||
|
lsb.setLineaSobregiro(tarjetaCredito.getLineaSobregiro());
|
||||||
|
return "cliente_tarjeta_credito_sobregiro_pagar";
|
||||||
|
}
|
||||||
|
|
||||||
public String edit() {
|
public String edit() {
|
||||||
tarjetaCreditoFacade.edit(tarjetaCredito);
|
tarjetaCreditoFacade.edit(tarjetaCredito);
|
||||||
|
|
||||||
@@ -108,4 +123,11 @@ public class TarjetaCreditoBean implements Serializable {
|
|||||||
this.tarjetaCredito = tarjetaCredito;
|
this.tarjetaCredito = tarjetaCredito;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<CompraTarjetaCredito> getCompraList() {
|
||||||
|
return this.compraTarjetaCreditoFacade.findAll();
|
||||||
|
}
|
||||||
|
public List<PagoTarjetaCredito> getPagoList() {
|
||||||
|
return this.pagoTarjetaCreditoFacade.findAll();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,12 @@
|
|||||||
package bean;
|
package bean;
|
||||||
|
|
||||||
import beans.ClienteFacadeLocal;
|
import beans.ClienteFacadeLocal;
|
||||||
|
import beans.CompraTarjetaDebitoFacade;
|
||||||
|
import beans.CompraTarjetaDebitoFacadeLocal;
|
||||||
|
import beans.DepositoTarjetaDebitoFacadeLocal;
|
||||||
|
import beans.GiroTarjetaDebitoFacadeLocal;
|
||||||
import beans.TarjetaDebitoFacadeLocal;
|
import beans.TarjetaDebitoFacadeLocal;
|
||||||
|
import beans.TransferenciaTarjetaDebitoFacadeLocal;
|
||||||
import entities.Cliente;
|
import entities.Cliente;
|
||||||
import entities.CompraTarjetaDebito;
|
import entities.CompraTarjetaDebito;
|
||||||
import entities.DepositoCuentaCorriente;
|
import entities.DepositoCuentaCorriente;
|
||||||
@@ -13,6 +18,7 @@ import entities.TransferenciaCuentaCorriente;
|
|||||||
import entities.TransferenciaTarjetaDebito;
|
import entities.TransferenciaTarjetaDebito;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import javax.ejb.EJB;
|
import javax.ejb.EJB;
|
||||||
import javax.enterprise.context.SessionScoped;
|
import javax.enterprise.context.SessionScoped;
|
||||||
@@ -27,6 +33,14 @@ public class TarjetaDebitoBean implements Serializable {
|
|||||||
private TarjetaDebitoFacadeLocal tarjetaDebitoFacade;
|
private TarjetaDebitoFacadeLocal tarjetaDebitoFacade;
|
||||||
@EJB
|
@EJB
|
||||||
private ClienteFacadeLocal clienteFacade;
|
private ClienteFacadeLocal clienteFacade;
|
||||||
|
@EJB
|
||||||
|
private GiroTarjetaDebitoFacadeLocal giroTarjetaDebitoFacadeLocal;
|
||||||
|
@EJB
|
||||||
|
private TransferenciaTarjetaDebitoFacadeLocal transferenciaTarjetaDebitoFacadeLocal;
|
||||||
|
@EJB
|
||||||
|
private DepositoTarjetaDebitoFacadeLocal depositoTarjetaDebitoFacadeLocal;
|
||||||
|
@EJB
|
||||||
|
private CompraTarjetaDebitoFacadeLocal compraTarjetaDebitoFacadeLocal;
|
||||||
|
|
||||||
private Cliente cliente;
|
private Cliente cliente;
|
||||||
private TarjetaDebito tarjetaDebito;
|
private TarjetaDebito tarjetaDebito;
|
||||||
@@ -57,7 +71,7 @@ public class TarjetaDebitoBean implements Serializable {
|
|||||||
public String gotoDeleteDeposito(DepositoTarjetaDebito deposito) {
|
public String gotoDeleteDeposito(DepositoTarjetaDebito deposito) {
|
||||||
FacesContext context = FacesContext.getCurrentInstance();
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
DepositoBean db = context.getApplication().evaluateExpressionGet(context, "#{depositoBean}", DepositoBean.class);
|
DepositoBean db = context.getApplication().evaluateExpressionGet(context, "#{depositoBean}", DepositoBean.class);
|
||||||
db.setTarjetaDebito(tarjetaDebito);
|
db.setTarjetaDebito(deposito.getTarjetaDebito());
|
||||||
db.setDepositoTarjetaDebito(deposito);
|
db.setDepositoTarjetaDebito(deposito);
|
||||||
return "admin_tarjeta_debito_delete_deposito";
|
return "admin_tarjeta_debito_delete_deposito";
|
||||||
}
|
}
|
||||||
@@ -72,7 +86,7 @@ public class TarjetaDebitoBean implements Serializable {
|
|||||||
public String gotoDeleteGiro(GiroTarjetaDebito giro) {
|
public String gotoDeleteGiro(GiroTarjetaDebito giro) {
|
||||||
FacesContext context = FacesContext.getCurrentInstance();
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
GiroBean gb = context.getApplication().evaluateExpressionGet(context, "#{giroBean}", GiroBean.class);
|
GiroBean gb = context.getApplication().evaluateExpressionGet(context, "#{giroBean}", GiroBean.class);
|
||||||
gb.setTarjetaDebito(tarjetaDebito);
|
gb.setTarjetaDebito(giro.getTarjetaDebito());
|
||||||
gb.setGiroTarjetaDebito(giro);
|
gb.setGiroTarjetaDebito(giro);
|
||||||
return "admin_tarjeta_debito_delete_giro";
|
return "admin_tarjeta_debito_delete_giro";
|
||||||
}
|
}
|
||||||
@@ -87,7 +101,6 @@ public class TarjetaDebitoBean implements Serializable {
|
|||||||
public String gotoDeleteTransferencia(TransferenciaTarjetaDebito transferencia) {
|
public String gotoDeleteTransferencia(TransferenciaTarjetaDebito transferencia) {
|
||||||
FacesContext context = FacesContext.getCurrentInstance();
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
TransferenciaBean tb = context.getApplication().evaluateExpressionGet(context, "#{transferenciaBean}", TransferenciaBean.class);
|
TransferenciaBean tb = context.getApplication().evaluateExpressionGet(context, "#{transferenciaBean}", TransferenciaBean.class);
|
||||||
tb.setTarjetaDebito(tarjetaDebito);
|
|
||||||
tb.setTransferenciaTarjetaDebito(transferencia);
|
tb.setTransferenciaTarjetaDebito(transferencia);
|
||||||
return "admin_tarjeta_debito_delete_transferencia";
|
return "admin_tarjeta_debito_delete_transferencia";
|
||||||
}
|
}
|
||||||
@@ -102,7 +115,7 @@ public class TarjetaDebitoBean implements Serializable {
|
|||||||
public String gotoDeleteCompra(CompraTarjetaDebito compra) {
|
public String gotoDeleteCompra(CompraTarjetaDebito compra) {
|
||||||
FacesContext context = FacesContext.getCurrentInstance();
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
CompraBean cb = context.getApplication().evaluateExpressionGet(context, "#{compraBean}", CompraBean.class);
|
CompraBean cb = context.getApplication().evaluateExpressionGet(context, "#{compraBean}", CompraBean.class);
|
||||||
cb.setTarjetaDebito(tarjetaDebito);
|
cb.setTarjetaDebito(compra.getTarjetaDebito());
|
||||||
cb.setCompraTarjetaDebito(compra);
|
cb.setCompraTarjetaDebito(compra);
|
||||||
return "admin_tarjeta_debito_delete_compra";
|
return "admin_tarjeta_debito_delete_compra";
|
||||||
}
|
}
|
||||||
@@ -128,4 +141,21 @@ public class TarjetaDebitoBean implements Serializable {
|
|||||||
this.tarjetaDebito = tarjetaDebito;
|
this.tarjetaDebito = tarjetaDebito;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<GiroTarjetaDebito> getGiroList() {
|
||||||
|
return this.giroTarjetaDebitoFacadeLocal.findAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DepositoTarjetaDebito> getDepositoList() {
|
||||||
|
return this.depositoTarjetaDebitoFacadeLocal.findAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<TransferenciaTarjetaDebito> getTransferenciaList() {
|
||||||
|
return this.transferenciaTarjetaDebitoFacadeLocal.findAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<CompraTarjetaDebito> getCompraList() {
|
||||||
|
return this.compraTarjetaDebitoFacadeLocal.findAll();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
</h:commandLink>
|
</h:commandLink>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<h1 class="f1 tc">Clientes</h1>
|
||||||
<h:dataTable class="w-100 pv3" headerClass="fw6 bb b--black-20 tl pb2 pr3 bg-white" value="#{clienteBean.clienteList}" var="cliente">
|
<h:dataTable class="w-100 pv3" headerClass="fw6 bb b--black-20 tl pb2 pr3 bg-white" value="#{clienteBean.clienteList}" var="cliente">
|
||||||
<h:column>
|
<h:column>
|
||||||
<f:facet name="header">
|
<f:facet name="header">
|
||||||
@@ -59,6 +60,326 @@
|
|||||||
</h:commandLink>
|
</h:commandLink>
|
||||||
</h:column>
|
</h:column>
|
||||||
</h:dataTable>
|
</h:dataTable>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h1 class="f2 tc">Transacciones en cuentas corrientes</h1>
|
||||||
|
<h1 class="f3 tc">Depositos</h1>
|
||||||
|
<h:dataTable class="w-100 pv3" headerClass="fw6 bb b--black-20 tl pb2 pr3 bg-white" value="#{cuentaCorrienteBean.depositoList}" var="deposito">
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Fecha"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{deposito.insertedAt}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Cuenta"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{deposito.cuentaCorriente.id}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Comentario"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{deposito.comentario}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Monto"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{deposito.monto}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column class="tr">
|
||||||
|
<h:commandLink class="f6 link dim br2 ph3 pv2 mr2 dib white bg-red tc" action="#{cuentaCorrienteBean.gotoDeleteDeposito(deposito)}">
|
||||||
|
<li class="fas fa-trash"></li>
|
||||||
|
</h:commandLink>
|
||||||
|
</h:column>
|
||||||
|
</h:dataTable>
|
||||||
|
<hr/>
|
||||||
|
<h1 class="f3 tc">Giros</h1>
|
||||||
|
<h:dataTable class="w-100 pv3" headerClass="fw6 bb b--black-20 tl pb2 pr3 bg-white" value="#{cuentaCorrienteBean.giroList}" var="giro">
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Fecha"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{giro.insertedAt}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Cuenta"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{giro.cuentaCorriente.id}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Comentario"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{giro.comentario}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Monto"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{giro.monto}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column class="tr">
|
||||||
|
<h:commandLink class="f6 link dim br2 ph3 pv2 mr2 dib white bg-red tc" action="#{cuentaCorrienteBean.gotoDeleteGiro(giro)}">
|
||||||
|
<li class="fas fa-trash"></li>
|
||||||
|
</h:commandLink>
|
||||||
|
</h:column>
|
||||||
|
</h:dataTable>
|
||||||
|
<hr/>
|
||||||
|
<h1 class="f3 tc">Transferencias</h1>
|
||||||
|
<h:dataTable class="w-100 pv3" headerClass="fw6 bb b--black-20 tl pb2 pr3 bg-white" value="#{cuentaCorrienteBean.transferenciaList}" var="transferencia">
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Fecha"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{transferencia.insertedAt}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Emisor"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{transferencia.cuentaCorrienteFrom.id}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Destinatario"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{transferencia.cuentaCorrienteTo.id}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Comentario"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{transferencia.comentario}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Monto"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{transferencia.monto}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column class="tr">
|
||||||
|
<h:commandLink class="f6 link dim br2 ph3 pv2 mr2 dib white bg-red tc" action="#{cuentaCorrienteBean.gotoDeleteTransferencia(transferencia)}">
|
||||||
|
<li class="fas fa-trash"></li>
|
||||||
|
</h:commandLink>
|
||||||
|
</h:column>
|
||||||
|
</h:dataTable>
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h1 class="f2 tc">Transacciones en tarjetas de debito</h1>
|
||||||
|
<h1 class="f3 tc">Depositos</h1>
|
||||||
|
<h:dataTable class="w-100 pv3" headerClass="fw6 bb b--black-20 tl pb2 pr3 bg-white" value="#{tarjetaDebitoBean.depositoList}" var="deposito">
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Fecha"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{deposito.insertedAt}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Cuenta"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{deposito.tarjetaDebito.id}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Comentario"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{deposito.comentario}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Monto"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{deposito.monto}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column class="tr">
|
||||||
|
<h:commandLink class="f6 link dim br2 ph3 pv2 mr2 dib white bg-red tc" action="#{tarjetaDebitoBean.gotoDeleteDeposito(deposito)}">
|
||||||
|
<li class="fas fa-trash"></li>
|
||||||
|
</h:commandLink>
|
||||||
|
</h:column>
|
||||||
|
</h:dataTable>
|
||||||
|
<hr/>
|
||||||
|
<h1 class="f3 tc">Giros</h1>
|
||||||
|
<h:dataTable class="w-100 pv3" headerClass="fw6 bb b--black-20 tl pb2 pr3 bg-white" value="#{tarjetaDebitoBean.giroList}" var="giro">
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Fecha"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{giro.insertedAt}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Cuenta"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{giro.tarjetaDebito.id}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Comentario"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{giro.comentario}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Monto"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{giro.monto}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column class="tr">
|
||||||
|
<h:commandLink class="f6 link dim br2 ph3 pv2 mr2 dib white bg-red tc" action="#{tarjetaDebitoBean.gotoDeleteGiro(giro)}">
|
||||||
|
<li class="fas fa-trash"></li>
|
||||||
|
</h:commandLink>
|
||||||
|
</h:column>
|
||||||
|
</h:dataTable>
|
||||||
|
<hr/>
|
||||||
|
<h1 class="f3 tc">Transferencias</h1>
|
||||||
|
<h:dataTable class="w-100 pv3" headerClass="fw6 bb b--black-20 tl pb2 pr3 bg-white" value="#{tarjetaDebitoBean.transferenciaList}" var="transferencia">
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Fecha"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{transferencia.insertedAt}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Emisor"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{transferencia.tarjetaDebitoFrom.id}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Destinatario"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{transferencia.tarjetaDebitoTo.id}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Comentario"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{transferencia.comentario}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Monto"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{transferencia.monto}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column class="tr">
|
||||||
|
<h:commandLink class="f6 link dim br2 ph3 pv2 mr2 dib white bg-red tc" action="#{tarjetaDebitoBean.gotoDeleteTransferencia(transferencia)}">
|
||||||
|
<li class="fas fa-trash"></li>
|
||||||
|
</h:commandLink>
|
||||||
|
</h:column>
|
||||||
|
</h:dataTable>
|
||||||
|
<hr/>
|
||||||
|
<h1 class="f3 tc">Compras</h1>
|
||||||
|
<h:dataTable class="w-100 pv3" headerClass="fw6 bb b--black-20 tl pb2 pr3 bg-white" value="#{tarjetaDebitoBean.compraList}" var="compra">
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Fecha"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{compra.insertedAt}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Cuenta"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{compra.tarjetaDebito.id}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Comentario"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{compra.comentario}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Monto"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{compra.monto}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column class="tr">
|
||||||
|
<h:commandLink class="f6 link dim br2 ph3 pv2 mr2 dib white bg-red tc" action="#{tarjetaDebitoBean.gotoDeleteCompra(compra)}">
|
||||||
|
<li class="fas fa-trash"></li>
|
||||||
|
</h:commandLink>
|
||||||
|
</h:column>
|
||||||
|
</h:dataTable>
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h1 class="f2 tc">Transacciones en tarjetas de credito</h1>
|
||||||
|
|
||||||
|
<h1 class="f3">Compras</h1>
|
||||||
|
<h:dataTable class="w-100 pv3" headerClass="fw6 bb b--black-20 tl pb2 pr3 bg-white" value="#{tarjetaCreditoBean.compraList}" var="compra">
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Fecha"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{compra.insertedAt}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Cuenta"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{compra.tarjetaCredito.id}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Comentario"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{compra.comentario}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Tipo de Compra"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{compra.tipo}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Monto"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{compra.monto}"/>
|
||||||
|
</h:column>
|
||||||
|
</h:dataTable>
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h1 class="f3">Pagos</h1>
|
||||||
|
<h:dataTable class="w-100 pv3" headerClass="fw6 bb b--black-20 tl pb2 pr3 bg-white" value="#{tarjetaCreditoBean.pagoList}" var="pago">
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Fecha"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{pago.insertedAt}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Cuenta"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{pago.tarjetaCredito.id}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Comentario"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{pago.comentario}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Tipo de Pago"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{pago.tipo}"/>
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputLabel value="Monto"/>
|
||||||
|
</f:facet>
|
||||||
|
<h:outputLabel value="#{pago.monto}"/>
|
||||||
|
</h:column>
|
||||||
|
</h:dataTable>
|
||||||
</h:form>
|
</h:form>
|
||||||
|
|
||||||
<h:form rendered="#{!userBean.isLogged()}">
|
<h:form rendered="#{!userBean.isLogged()}">
|
||||||
|
|||||||
52
bank-war/web/cliente_cuenta_corriente_sobregiro_pagar.xhtml
Normal file
52
bank-war/web/cliente_cuenta_corriente_sobregiro_pagar.xhtml
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8' ?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3c.org/1999/xhtml"
|
||||||
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
||||||
|
xmlns:f="http://java.sun.com/jsf/core">
|
||||||
|
<h:head>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/tachyons@4.10.0/css/tachyons.min.css"/>
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/normalize.css@8.0.1/normalize.css"/>
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"/>
|
||||||
|
<h:outputStylesheet library="css" name="all.css"/>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</h:head>
|
||||||
|
<body class="black-70 pa4">
|
||||||
|
<h:form rendered="#{userBean.isLogged() and userBean.isClient()}">
|
||||||
|
<div class="flex justify-between">
|
||||||
|
<h1 class="f1">Cuenta Corriente - Pagar Sobregiro</h1>
|
||||||
|
|
||||||
|
<h:commandLink class="f5 tc link w-20 dim br2 ph3 pv2 mb1 mr2 dib white bg-red" immediate="true" action="cliente_cuenta_corriente_view" style="margin-top: auto; margin-bottom: auto">
|
||||||
|
<li class="fas fa-arrow-left"></li> Volver
|
||||||
|
</h:commandLink>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h:messages class="f4 w-40 list tc center white bg-red pa4"/>
|
||||||
|
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" for="monto" value="Monto:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" id="monto" value="#{lineaSobregiroBean.monto}" required="true" label="Monto">
|
||||||
|
<f:validateLongRange minimum="1"/>
|
||||||
|
</h:inputText>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:commandLink class="f5 tc link w-20 dim br2 ph3 pv2 mb1 mr2 dib white bg-green" action="#{lineaSobregiroBean.pagarSobregiroCorriente()}" style="margin-top: auto; margin-bottom: auto">
|
||||||
|
<li class="fas fa-money-bill"></li> Pagar
|
||||||
|
</h:commandLink>
|
||||||
|
</div>
|
||||||
|
</h:form>
|
||||||
|
|
||||||
|
<h:form rendered="#{!userBean.isLogged()}">
|
||||||
|
<div class="tc">
|
||||||
|
<h1 class="f1 tc">Acceso no autorizado</h1>
|
||||||
|
<h:commandLink class="f5 tc link w-20 dim br2 ph3 pv2 mb1 mr2 dib white bg-red" value="Ir al index" action="index"/>
|
||||||
|
</div>
|
||||||
|
</h:form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
@@ -53,6 +53,41 @@
|
|||||||
<li class="fas fa-comments-dollar"></li> Transferir
|
<li class="fas fa-comments-dollar"></li> Transferir
|
||||||
</h:commandLink>
|
</h:commandLink>
|
||||||
</div>
|
</div>
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h:panelGroup layout="block" class="mv3 w-100" rendered="#{cuentaCorrienteBean.cuentaCorriente.lineaSobregiro != null}">
|
||||||
|
<h1 class="f2 tc">Linea Sobregiro</h1>
|
||||||
|
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" value="Id:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{cuentaCorrienteBean.cuentaCorriente.lineaSobregiro.id}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" value="Limite:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{cuentaCorrienteBean.cuentaCorriente.lineaSobregiro.limite}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" value="Sobregiro:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{cuentaCorrienteBean.cuentaCorriente.lineaSobregiro.sobregiro}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" value="Fecha Creacion:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{cuentaCorrienteBean.cuentaCorriente.insertedAt}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:commandLink class="f5 tc link dim br2 ph3 pv2 ma2 dib white bg-gold" action="#{cuentaCorrienteBean.gotoPagarSobregiro()}" style="width: 200px">
|
||||||
|
<li class="fas fa-money-bill"></li> Pagar
|
||||||
|
</h:commandLink>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</h:panelGroup>
|
||||||
|
|
||||||
|
<h:panelGroup layout="block" class="mv3 w-100" rendered="#{cuentaCorrienteBean.cuentaCorriente.lineaSobregiro == null}">
|
||||||
|
<h1 class="f2 tc">Linea Sobregiro</h1>
|
||||||
|
<p class="f6 tc">Sin contratar</p>
|
||||||
|
</h:panelGroup>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
<h1 class="f3">Depositos</h1>
|
<h1 class="f3">Depositos</h1>
|
||||||
<h:dataTable class="w-100 pv3" headerClass="fw6 bb b--black-20 tl pb2 pr3 bg-white" value="#{cuentaCorrienteBean.cuentaCorriente.depositoList}" var="deposito">
|
<h:dataTable class="w-100 pv3" headerClass="fw6 bb b--black-20 tl pb2 pr3 bg-white" value="#{cuentaCorrienteBean.cuentaCorriente.depositoList}" var="deposito">
|
||||||
|
|||||||
52
bank-war/web/cliente_tarjeta_credito_sobregiro_pagar.xhtml
Normal file
52
bank-war/web/cliente_tarjeta_credito_sobregiro_pagar.xhtml
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8' ?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3c.org/1999/xhtml"
|
||||||
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
||||||
|
xmlns:f="http://java.sun.com/jsf/core">
|
||||||
|
<h:head>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/tachyons@4.10.0/css/tachyons.min.css"/>
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/normalize.css@8.0.1/normalize.css"/>
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"/>
|
||||||
|
<h:outputStylesheet library="css" name="all.css"/>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</h:head>
|
||||||
|
<body class="black-70 pa4">
|
||||||
|
<h:form rendered="#{userBean.isLogged() and userBean.isClient()}">
|
||||||
|
<div class="flex justify-between">
|
||||||
|
<h1 class="f1">Tarjeta Credito - Pagar Sobregiro</h1>
|
||||||
|
|
||||||
|
<h:commandLink class="f5 tc link w-20 dim br2 ph3 pv2 mb1 mr2 dib white bg-red" immediate="true" action="cliente_tarjeta_credito_view" style="margin-top: auto; margin-bottom: auto">
|
||||||
|
<li class="fas fa-arrow-left"></li> Volver
|
||||||
|
</h:commandLink>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h:messages class="f4 w-40 list tc center white bg-red pa4"/>
|
||||||
|
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" for="monto" value="Monto:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" id="monto" value="#{lineaSobregiroBean.monto}" required="true" label="Monto">
|
||||||
|
<f:validateLongRange minimum="1"/>
|
||||||
|
</h:inputText>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:commandLink class="f5 tc link w-20 dim br2 ph3 pv2 mb1 mr2 dib white bg-green" action="#{lineaSobregiroBean.pagarSobregiroCredito()}" style="margin-top: auto; margin-bottom: auto">
|
||||||
|
<li class="fas fa-money-bill"></li> Pagar
|
||||||
|
</h:commandLink>
|
||||||
|
</div>
|
||||||
|
</h:form>
|
||||||
|
|
||||||
|
<h:form rendered="#{!userBean.isLogged()}">
|
||||||
|
<div class="tc">
|
||||||
|
<h1 class="f1 tc">Acceso no autorizado</h1>
|
||||||
|
<h:commandLink class="f5 tc link w-20 dim br2 ph3 pv2 mb1 mr2 dib white bg-red" value="Ir al index" action="index"/>
|
||||||
|
</div>
|
||||||
|
</h:form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
||||||
@@ -27,6 +27,8 @@
|
|||||||
</h:commandLink>
|
</h:commandLink>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<h:messages class="f4 w-40 list tc center white bg-green pa4"/>
|
||||||
|
|
||||||
<div class="mt3 tc">
|
<div class="mt3 tc">
|
||||||
<h:outputLabel class="db lh-copy f6" value="Id:"/>
|
<h:outputLabel class="db lh-copy f6" value="Id:"/>
|
||||||
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" id="id" value="#{tarjetaCreditoBean.tarjetaCredito.id}" readonly="true"/>
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" id="id" value="#{tarjetaCreditoBean.tarjetaCredito.id}" readonly="true"/>
|
||||||
@@ -61,6 +63,42 @@
|
|||||||
</h:commandLink>
|
</h:commandLink>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<h:panelGroup layout="block" class="mv3 w-100" rendered="#{tarjetaCreditoBean.tarjetaCredito.lineaSobregiro != null}">
|
||||||
|
<h1 class="f2 tc">Linea Sobregiro</h1>
|
||||||
|
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" value="Id:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{tarjetaCreditoBean.tarjetaCredito.lineaSobregiro.id}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" value="Limite:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{tarjetaCreditoBean.tarjetaCredito.lineaSobregiro.limite}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" value="Sobregiro:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{tarjetaCreditoBean.tarjetaCredito.lineaSobregiro.sobregiro}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:outputLabel class="db fw4 lh-copy f6" value="Fecha Creacion:"/>
|
||||||
|
<h:inputText class="pa2 input-reset ba b--black-20 bg-transparent w-100 measure" value="#{tarjetaCreditoBean.tarjetaCredito.insertedAt}" readonly="true"/>
|
||||||
|
</div>
|
||||||
|
<div class="mt3 tc">
|
||||||
|
<h:commandLink class="f5 tc link dim br2 ph3 pv2 ma2 dib white bg-gold" action="#{tarjetaCreditoBean.gotoPagarSobregiro()}" style="width: 200px">
|
||||||
|
<li class="fas fa-money-bill"></li> Pagar
|
||||||
|
</h:commandLink>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</h:panelGroup>
|
||||||
|
|
||||||
|
<h:panelGroup layout="block" class="mv3 w-100" rendered="#{tarjetaCreditoBean.tarjetaCredito.lineaSobregiro == null}">
|
||||||
|
<h1 class="f2 tc">Linea Sobregiro</h1>
|
||||||
|
<p class="f6 tc">Sin contratar</p>
|
||||||
|
</h:panelGroup>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
<h1 class="f3">Compras</h1>
|
<h1 class="f3">Compras</h1>
|
||||||
<h:dataTable class="w-100 pv3" headerClass="fw6 bb b--black-20 tl pb2 pr3 bg-white" value="#{tarjetaCreditoBean.tarjetaCredito.compraList}" var="compra">
|
<h:dataTable class="w-100 pv3" headerClass="fw6 bb b--black-20 tl pb2 pr3 bg-white" value="#{tarjetaCreditoBean.tarjetaCredito.compraList}" var="compra">
|
||||||
<h:column>
|
<h:column>
|
||||||
|
|||||||
Reference in New Issue
Block a user