- LISTADO DE POLIZAS (SEPARAR POR TABS)
ACTIVAS: SON LAS POLIZAS QUE ESTAN VIGENTES Y PAGADAS EMITIDAS: SON POLIZAS EMITIDAS DE MANERA INICIAL Y ESTA CORRIENDO SU PLAZO DE GRACIA PENDIENTE DE PAGO: SON POLIZAS QUE ESTABAN VENCIDAS Y SE LES ASIGNO NUEVO PLAZO A PAGAR VENCIDAS: LAS QUE PASO SU FECHA DE PAGO Y NO SE REALIZO EL PAGO, CUANDO ESTÉN EN ESTE ESTATUS QUE SE PUEDA AGREGAR NUEVO PLAZO PARA PAGAR Y PASEN A ESTATUS “PENDIENTE DE PAGO” NOTA: Se agregaron 2 categorías extra para mostrar las pólizas que no entraban en las categorías definidas en la tarea FINALIZADAS: pólizas pagadas y cuya fecha de fin ya paso CANCELADAS: pólizas canceladas por solicitud
This commit is contained in:
parent
a266bf4f68
commit
1264aa127b
@ -81,6 +81,40 @@ public class PagosPolizaController extends ConnectionManager implements Serializ
|
|||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<PagosPoliza> fillPagosPedientesPolizaByPoliza(Poliza poliza) {
|
||||||
|
logger.info("fillPagosPolizaByPoliza");
|
||||||
|
List<PagosPoliza> resultList = null;
|
||||||
|
Transaction transaction = null;
|
||||||
|
try {
|
||||||
|
logger.info("Searching pagos for poliza..");
|
||||||
|
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
|
||||||
|
transaction = session.beginTransaction();
|
||||||
|
CriteriaBuilder builder = session.getCriteriaBuilder();
|
||||||
|
|
||||||
|
CriteriaQuery<PagosPoliza> criteria = builder.createQuery(PagosPoliza.class);
|
||||||
|
Root<PagosPoliza> root = criteria.from(PagosPoliza.class);
|
||||||
|
|
||||||
|
Predicate criterio1 = builder.equal(root.get("poliza"), poliza);
|
||||||
|
Predicate criterio2 = builder.equal(root.get("estatusActivo"), GenericEnumType.ENABLED);
|
||||||
|
Predicate criterio3 = builder.equal(root.get("pagoEstatus"), GenericEnumType.DISABLED);
|
||||||
|
Predicate criterio4 = builder.equal(root.get("pagoEstatus"), GenericEnumType.INCOMPLETE);
|
||||||
|
criteria.where(builder.and(criterio1, criterio2), builder.or(criterio3, criterio4));
|
||||||
|
criteria.orderBy(builder.asc(root.get("fechaAPagar")));
|
||||||
|
|
||||||
|
resultList = session.createQuery(criteria).getResultList();
|
||||||
|
|
||||||
|
logger.info("Total of pagos found: " + (null == resultList ? -1 : resultList.size()));
|
||||||
|
transaction.commit();
|
||||||
|
} catch (HibernateException e) {
|
||||||
|
logger.error("Pagos cannot be loaded ");
|
||||||
|
rollback(transaction);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("Method fillPagosPolizaByPoliza ", e);
|
||||||
|
rollback(transaction);
|
||||||
|
}
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
|
||||||
public List<PagosPoliza> fillPagosPolizaFechaAPagarByLocationFechaInicioAndFechaFin(Location location, Date startDate, Date endDate) {
|
public List<PagosPoliza> fillPagosPolizaFechaAPagarByLocationFechaInicioAndFechaFin(Location location, Date startDate, Date endDate) {
|
||||||
logger.info("fillPagosPolizaByPoliza");
|
logger.info("fillPagosPolizaByPoliza");
|
||||||
List<PagosPoliza> resultList = null;
|
List<PagosPoliza> resultList = null;
|
||||||
@ -175,6 +209,44 @@ public class PagosPolizaController extends ConnectionManager implements Serializ
|
|||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PagosPoliza getSiguintePagosPolizaARealizarByPoliza(Poliza poliza) {
|
||||||
|
logger.info("getSiguintePagosPolizaARealizarByPoliza");
|
||||||
|
PagosPoliza result = null;
|
||||||
|
Transaction transaction = null;
|
||||||
|
try {
|
||||||
|
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
|
||||||
|
transaction = session.beginTransaction();
|
||||||
|
CriteriaBuilder builder = session.getCriteriaBuilder();
|
||||||
|
|
||||||
|
CriteriaQuery<PagosPoliza> criteria = builder.createQuery(PagosPoliza.class);
|
||||||
|
Root<PagosPoliza> root = criteria.from(PagosPoliza.class);
|
||||||
|
|
||||||
|
Predicate criterio1 = builder.equal(root.get("poliza"), poliza);
|
||||||
|
Predicate criterio2 = builder.equal(root.get("estatusActivo"), GenericEnumType.ENABLED);
|
||||||
|
Predicate criterio3 = builder.equal(root.get("pagoEstatus"), GenericEnumType.DISABLED);
|
||||||
|
Predicate criterio4 = builder.equal(root.get("pagoEstatus"), GenericEnumType.INCOMPLETE);
|
||||||
|
|
||||||
|
criteria.where(builder.and(criterio1, criterio2), builder.or(criterio3, criterio4));
|
||||||
|
criteria.orderBy(builder.desc(root.get("fechaAPagar")));
|
||||||
|
|
||||||
|
TypedQuery<PagosPoliza> query = session.createQuery(criteria);
|
||||||
|
query.setMaxResults(1);
|
||||||
|
result = query.getSingleResult();
|
||||||
|
|
||||||
|
transaction.commit();
|
||||||
|
} catch (NoResultException e) {
|
||||||
|
logger.info("No se encontró el pago: " + poliza.getFolio());
|
||||||
|
rollback(transaction);
|
||||||
|
} catch (HibernateException e) {
|
||||||
|
logger.error("Error al obtener el pago " + poliza.getFolio(), e);
|
||||||
|
rollback(transaction);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("Error en getSiguintePagosPolizaARealizarByPoliza(" + poliza.getFolio() + ")", e);
|
||||||
|
rollback(transaction);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean createDetellePago(DetellePagoPoliza dpago, User user) {
|
public boolean createDetellePago(DetellePagoPoliza dpago, User user) {
|
||||||
logger.info("createDetellePago");
|
logger.info("createDetellePago");
|
||||||
boolean success = false;
|
boolean success = false;
|
||||||
|
@ -107,6 +107,38 @@ public class PolizaController extends ConnectionManager implements Serializable
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Poliza> getAllPolizasByLocation(Location location) {
|
||||||
|
logger.info("findDisable");
|
||||||
|
List<Poliza> results = new ArrayList<>();
|
||||||
|
|
||||||
|
Transaction transaction = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
|
||||||
|
transaction = session.beginTransaction();
|
||||||
|
CriteriaBuilder builder = session.getCriteriaBuilder();
|
||||||
|
CriteriaQuery<Poliza> query = builder.createQuery(Poliza.class);
|
||||||
|
Root<Poliza> root = query.from(Poliza.class);
|
||||||
|
Predicate locations = builder.equal(root.get("location"), location);
|
||||||
|
|
||||||
|
query.where(builder.and(locations));
|
||||||
|
query.orderBy(builder.asc(root.get("createdOn")));
|
||||||
|
|
||||||
|
results = session.createQuery(query).getResultList();
|
||||||
|
|
||||||
|
transaction.commit();
|
||||||
|
|
||||||
|
logger.info("Poliza's list " + results.size());
|
||||||
|
} catch (HibernateException e) {
|
||||||
|
logger.error("Can not load Poliza list ", e);
|
||||||
|
rollback(transaction);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("Method findDisable() ", e);
|
||||||
|
rollback(transaction);
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param location
|
* @param location
|
||||||
* @return List of all Poliza.
|
* @return List of all Poliza.
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
package com.crov.prase.model.catalog;
|
package com.crov.prase.model.catalog;
|
||||||
|
|
||||||
import com.arrebol.taxiservicios.model.core.User;
|
import com.arrebol.taxiservicios.model.core.User;
|
||||||
import com.arrebol.taxiservicios.model.enums.PeriodoPago;
|
|
||||||
import com.arrebol.taxiservicios.model.enums.PolizaType;
|
import com.arrebol.taxiservicios.model.enums.PolizaType;
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
@ -28,164 +28,163 @@ import org.hibernate.annotations.GenericGenerator;
|
|||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "tipo_poliza")
|
@Table(name = "tipo_poliza")
|
||||||
public class TipoPoliza {
|
public class TipoPoliza implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -6653037938225719593L;
|
|
||||||
|
|
||||||
@Id
|
private static final long serialVersionUID = -6653037938225719593L;
|
||||||
@GeneratedValue(generator = "uuid")
|
|
||||||
@GenericGenerator(name = "uuid", strategy = "uuid2")
|
|
||||||
@Column(name = "id", length = 36)
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
@Column(name = "name", nullable = true)
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
@Column(name = "costo", nullable = true)
|
|
||||||
private Double costo;
|
|
||||||
|
|
||||||
@Column(name = "costo_semestral", nullable = true)
|
|
||||||
private Double costoSemestral;
|
|
||||||
|
|
||||||
@Column(name = "costo_trimestral", nullable = true)
|
|
||||||
private Double costoTrimestral;
|
|
||||||
|
|
||||||
@Column(name = "costo_mensual", nullable = true)
|
|
||||||
private Double costoMensual;
|
|
||||||
|
|
||||||
@Enumerated(EnumType.STRING)
|
|
||||||
@Column(name = "tipo", nullable = true)
|
|
||||||
private PolizaType tipo;
|
|
||||||
|
|
||||||
@Column(name = "active", nullable = true)
|
|
||||||
private boolean active;
|
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
|
||||||
@JoinColumn(
|
|
||||||
name = "created_by",
|
|
||||||
referencedColumnName = "id",
|
|
||||||
nullable = false
|
|
||||||
)
|
|
||||||
private User createdBy;
|
|
||||||
|
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
|
||||||
@Column(name = "created_on", length = 19)
|
|
||||||
private Date createdOn;
|
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY, optional = true)
|
|
||||||
@JoinColumn(
|
|
||||||
name = "last_updated_by",
|
|
||||||
referencedColumnName = "id",
|
|
||||||
nullable = true
|
|
||||||
)
|
|
||||||
private User lastUpdatedBy;
|
|
||||||
|
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
|
||||||
@Column(name = "last_updated_on", length = 19, nullable = true)
|
|
||||||
private Date lastUpdatedOn;
|
|
||||||
|
|
||||||
public String getId() {
|
@Id
|
||||||
return id;
|
@GeneratedValue(generator = "uuid")
|
||||||
}
|
@GenericGenerator(name = "uuid", strategy = "uuid2")
|
||||||
|
@Column(name = "id", length = 36)
|
||||||
|
private String id;
|
||||||
|
|
||||||
public void setId(String id) {
|
@Column(name = "name", nullable = true)
|
||||||
this.id = id;
|
private String name;
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
@Column(name = "costo", nullable = true)
|
||||||
return name;
|
private Double costo;
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
@Column(name = "costo_semestral", nullable = true)
|
||||||
this.name = name;
|
private Double costoSemestral;
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isActive() {
|
@Column(name = "costo_trimestral", nullable = true)
|
||||||
return active;
|
private Double costoTrimestral;
|
||||||
}
|
|
||||||
|
|
||||||
public void setActive(boolean active) {
|
@Column(name = "costo_mensual", nullable = true)
|
||||||
this.active = active;
|
private Double costoMensual;
|
||||||
}
|
|
||||||
|
|
||||||
public User getCreatedBy() {
|
@Enumerated(EnumType.STRING)
|
||||||
return createdBy;
|
@Column(name = "tipo", nullable = true)
|
||||||
}
|
private PolizaType tipo;
|
||||||
|
|
||||||
public void setCreatedBy(User createdBy) {
|
@Column(name = "active", nullable = true)
|
||||||
this.createdBy = createdBy;
|
private boolean active;
|
||||||
}
|
|
||||||
|
|
||||||
public Date getCreatedOn() {
|
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
||||||
return createdOn;
|
@JoinColumn(
|
||||||
}
|
name = "created_by",
|
||||||
|
referencedColumnName = "id",
|
||||||
|
nullable = false
|
||||||
|
)
|
||||||
|
private User createdBy;
|
||||||
|
|
||||||
public void setCreatedOn(Date createdOn) {
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
this.createdOn = createdOn;
|
@Column(name = "created_on", length = 19)
|
||||||
}
|
private Date createdOn;
|
||||||
|
|
||||||
public User getLastUpdatedBy() {
|
@ManyToOne(fetch = FetchType.LAZY, optional = true)
|
||||||
return lastUpdatedBy;
|
@JoinColumn(
|
||||||
}
|
name = "last_updated_by",
|
||||||
|
referencedColumnName = "id",
|
||||||
|
nullable = true
|
||||||
|
)
|
||||||
|
private User lastUpdatedBy;
|
||||||
|
|
||||||
public void setLastUpdatedBy(User lastUpdatedBy) {
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
this.lastUpdatedBy = lastUpdatedBy;
|
@Column(name = "last_updated_on", length = 19, nullable = true)
|
||||||
}
|
private Date lastUpdatedOn;
|
||||||
|
|
||||||
public Date getLastUpdatedOn() {
|
public String getId() {
|
||||||
return lastUpdatedOn;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLastUpdatedOn(Date lastUpdatedOn) {
|
public void setId(String id) {
|
||||||
this.lastUpdatedOn = lastUpdatedOn;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Double getCosto() {
|
public String getName() {
|
||||||
return costo;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCosto(Double costo) {
|
public void setName(String name) {
|
||||||
this.costo = costo;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PolizaType getTipo() {
|
public boolean isActive() {
|
||||||
return tipo;
|
return active;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTipo(PolizaType tipo) {
|
public void setActive(boolean active) {
|
||||||
this.tipo = tipo;
|
this.active = active;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Double getCostoSemestral() {
|
public User getCreatedBy() {
|
||||||
return costoSemestral;
|
return createdBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCostoSemestral(Double costoSemestral) {
|
public void setCreatedBy(User createdBy) {
|
||||||
this.costoSemestral = costoSemestral;
|
this.createdBy = createdBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Double getCostoTrimestral() {
|
public Date getCreatedOn() {
|
||||||
return costoTrimestral;
|
return createdOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCostoTrimestral(Double costoTrimestral) {
|
public void setCreatedOn(Date createdOn) {
|
||||||
this.costoTrimestral = costoTrimestral;
|
this.createdOn = createdOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Double getCostoMensual() {
|
public User getLastUpdatedBy() {
|
||||||
return costoMensual;
|
return lastUpdatedBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCostoMensual(Double costoMensual) {
|
public void setLastUpdatedBy(User lastUpdatedBy) {
|
||||||
this.costoMensual = costoMensual;
|
this.lastUpdatedBy = lastUpdatedBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TipoPoliza(String id) {
|
public Date getLastUpdatedOn() {
|
||||||
this.id = id;
|
return lastUpdatedOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setLastUpdatedOn(Date lastUpdatedOn) {
|
||||||
|
this.lastUpdatedOn = lastUpdatedOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getCosto() {
|
||||||
|
return costo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCosto(Double costo) {
|
||||||
|
this.costo = costo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PolizaType getTipo() {
|
||||||
|
return tipo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTipo(PolizaType tipo) {
|
||||||
|
this.tipo = tipo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getCostoSemestral() {
|
||||||
|
return costoSemestral;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCostoSemestral(Double costoSemestral) {
|
||||||
|
this.costoSemestral = costoSemestral;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getCostoTrimestral() {
|
||||||
|
return costoTrimestral;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCostoTrimestral(Double costoTrimestral) {
|
||||||
|
this.costoTrimestral = costoTrimestral;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getCostoMensual() {
|
||||||
|
return costoMensual;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCostoMensual(Double costoMensual) {
|
||||||
|
this.costoMensual = costoMensual;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TipoPoliza(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TipoPoliza() {
|
||||||
|
}
|
||||||
|
|
||||||
public TipoPoliza() {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -32,231 +32,243 @@ import org.hibernate.annotations.GenericGenerator;
|
|||||||
@Table(name = "pagos_poliza")
|
@Table(name = "pagos_poliza")
|
||||||
public class PagosPoliza implements Serializable {
|
public class PagosPoliza implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -6653037938225719593L;
|
private static final long serialVersionUID = -6653037938225719593L;
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(generator = "uuid")
|
@GeneratedValue(generator = "uuid")
|
||||||
@GenericGenerator(name = "uuid", strategy = "uuid2")
|
@GenericGenerator(name = "uuid", strategy = "uuid2")
|
||||||
@Column(name = "id", length = 36)
|
@Column(name = "id", length = 36)
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
||||||
@JoinColumn(
|
@JoinColumn(
|
||||||
name = "id_poliza",
|
name = "id_poliza",
|
||||||
referencedColumnName = "id",
|
referencedColumnName = "id",
|
||||||
nullable = false
|
nullable = false
|
||||||
)
|
)
|
||||||
private Poliza poliza;
|
private Poliza poliza;
|
||||||
|
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
@Column(name = "estatus_activo", nullable = false)
|
@Column(name = "estatus_activo", nullable = false)
|
||||||
private GenericEnumType estatusActivo;
|
private GenericEnumType estatusActivo;
|
||||||
|
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
@Column(name = "tipo_pago", nullable = false)
|
@Column(name = "tipo_pago", nullable = false)
|
||||||
private TipoAbono tipoPago;
|
private TipoAbono tipoPago;
|
||||||
|
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
@Column(name = "pago_estatus", nullable = false)
|
@Column(name = "pago_estatus", nullable = false)
|
||||||
private GenericEnumType pagoEstatus;
|
private GenericEnumType pagoEstatus;
|
||||||
|
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
@Column(name = "metodo_pago", nullable = true)
|
@Column(name = "metodo_pago", nullable = true)
|
||||||
private MetodoPago metodoPago;
|
private MetodoPago metodoPago;
|
||||||
|
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
@Column(name = "fecha_a_pagar")
|
@Column(name = "fecha_a_pagar")
|
||||||
private Date fechaAPagar;
|
private Date fechaAPagar;
|
||||||
|
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
@Column(name = "fecha_pago")
|
@Column(name = "nueva_fecha_a_pagar")
|
||||||
private Date fechaPago;
|
private Date nuevaFechaAPagar;
|
||||||
|
|
||||||
@Column(name = "pago")
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
private Double pago;
|
@Column(name = "fecha_pago")
|
||||||
|
private Date fechaPago;
|
||||||
|
|
||||||
@Column(name = "cantidad_pagada")
|
@Column(name = "pago")
|
||||||
private Double cantidadPagada;
|
private Double pago;
|
||||||
|
|
||||||
@Column(name = "diferencia_pago")
|
@Column(name = "cantidad_pagada")
|
||||||
private Double diferenciaPago;
|
private Double cantidadPagada;
|
||||||
|
|
||||||
@Column(name = "folio")
|
@Column(name = "diferencia_pago")
|
||||||
private String folio;
|
private Double diferenciaPago;
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY, optional = true)
|
@Column(name = "folio")
|
||||||
@JoinColumn(
|
private String folio;
|
||||||
name = "cobro",
|
|
||||||
referencedColumnName = "id",
|
|
||||||
nullable = true
|
|
||||||
)
|
|
||||||
private User cobro;
|
|
||||||
|
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
@ManyToOne(fetch = FetchType.LAZY, optional = true)
|
||||||
@Column(name = "created_on")
|
@JoinColumn(
|
||||||
private Date createdOn;
|
name = "cobro",
|
||||||
|
referencedColumnName = "id",
|
||||||
|
nullable = true
|
||||||
|
)
|
||||||
|
private User cobro;
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
@JoinColumn(
|
@Column(name = "created_on")
|
||||||
name = "created_by",
|
private Date createdOn;
|
||||||
referencedColumnName = "id",
|
|
||||||
nullable = false
|
|
||||||
)
|
|
||||||
private User createdBy;
|
|
||||||
|
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
||||||
@Column(name = "last_updated_on")
|
@JoinColumn(
|
||||||
private Date lastUpdatedOn;
|
name = "created_by",
|
||||||
|
referencedColumnName = "id",
|
||||||
|
nullable = false
|
||||||
|
)
|
||||||
|
private User createdBy;
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY, optional = true)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
@JoinColumn(
|
@Column(name = "last_updated_on")
|
||||||
name = "last_updated_by",
|
private Date lastUpdatedOn;
|
||||||
referencedColumnName = "id",
|
|
||||||
nullable = true
|
|
||||||
)
|
|
||||||
private User lastUpdatedBy;
|
|
||||||
|
|
||||||
public PagosPoliza() {
|
@ManyToOne(fetch = FetchType.LAZY, optional = true)
|
||||||
}
|
@JoinColumn(
|
||||||
|
name = "last_updated_by",
|
||||||
|
referencedColumnName = "id",
|
||||||
|
nullable = true
|
||||||
|
)
|
||||||
|
private User lastUpdatedBy;
|
||||||
|
|
||||||
public PagosPoliza(String id) {
|
public PagosPoliza() {
|
||||||
this.id = id;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public String getId() {
|
public PagosPoliza(String id) {
|
||||||
return id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(String id) {
|
public String getId() {
|
||||||
this.id = id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Poliza getPoliza() {
|
public void setId(String id) {
|
||||||
return poliza;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPoliza(Poliza poliza) {
|
public Poliza getPoliza() {
|
||||||
this.poliza = poliza;
|
return poliza;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GenericEnumType getEstatusActivo() {
|
public void setPoliza(Poliza poliza) {
|
||||||
return estatusActivo;
|
this.poliza = poliza;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEstatusActivo(GenericEnumType estatusActivo) {
|
public GenericEnumType getEstatusActivo() {
|
||||||
this.estatusActivo = estatusActivo;
|
return estatusActivo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TipoAbono getTipoPago() {
|
public void setEstatusActivo(GenericEnumType estatusActivo) {
|
||||||
return tipoPago;
|
this.estatusActivo = estatusActivo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTipoPago(TipoAbono tipoPago) {
|
public TipoAbono getTipoPago() {
|
||||||
this.tipoPago = tipoPago;
|
return tipoPago;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GenericEnumType getPagoEstatus() {
|
public void setTipoPago(TipoAbono tipoPago) {
|
||||||
return pagoEstatus;
|
this.tipoPago = tipoPago;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPagoEstatus(GenericEnumType pagoEstatus) {
|
public GenericEnumType getPagoEstatus() {
|
||||||
this.pagoEstatus = pagoEstatus;
|
return pagoEstatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getFechaAPagar() {
|
public void setPagoEstatus(GenericEnumType pagoEstatus) {
|
||||||
return fechaAPagar;
|
this.pagoEstatus = pagoEstatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFechaAPagar(Date fechaAPagar) {
|
public Date getFechaAPagar() {
|
||||||
this.fechaAPagar = fechaAPagar;
|
return fechaAPagar;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getFechaPago() {
|
public void setFechaAPagar(Date fechaAPagar) {
|
||||||
return fechaPago;
|
this.fechaAPagar = fechaAPagar;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFechaPago(Date fechaPago) {
|
public Date getFechaPago() {
|
||||||
this.fechaPago = fechaPago;
|
return fechaPago;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Double getPago() {
|
public void setFechaPago(Date fechaPago) {
|
||||||
return pago;
|
this.fechaPago = fechaPago;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPago(Double pago) {
|
public Double getPago() {
|
||||||
this.pago = pago;
|
return pago;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Double getCantidadPagada() {
|
public void setPago(Double pago) {
|
||||||
return cantidadPagada;
|
this.pago = pago;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCantidadPagada(Double cantidadPagada) {
|
public Double getCantidadPagada() {
|
||||||
this.cantidadPagada = cantidadPagada;
|
return cantidadPagada;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Double getDiferenciaPago() {
|
public void setCantidadPagada(Double cantidadPagada) {
|
||||||
return diferenciaPago;
|
this.cantidadPagada = cantidadPagada;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDiferenciaPago(Double diferenciaPago) {
|
public Double getDiferenciaPago() {
|
||||||
this.diferenciaPago = diferenciaPago;
|
return diferenciaPago;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFolio() {
|
public void setDiferenciaPago(Double diferenciaPago) {
|
||||||
return folio;
|
this.diferenciaPago = diferenciaPago;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFolio(String folio) {
|
public String getFolio() {
|
||||||
this.folio = folio;
|
return folio;
|
||||||
}
|
}
|
||||||
|
|
||||||
public User getCobro() {
|
public void setFolio(String folio) {
|
||||||
return cobro;
|
this.folio = folio;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCobro(User cobro) {
|
public User getCobro() {
|
||||||
this.cobro = cobro;
|
return cobro;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getCreatedOn() {
|
public void setCobro(User cobro) {
|
||||||
return createdOn;
|
this.cobro = cobro;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreatedOn(Date createdOn) {
|
public Date getCreatedOn() {
|
||||||
this.createdOn = createdOn;
|
return createdOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public User getCreatedBy() {
|
public void setCreatedOn(Date createdOn) {
|
||||||
return createdBy;
|
this.createdOn = createdOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreatedBy(User createdBy) {
|
public User getCreatedBy() {
|
||||||
this.createdBy = createdBy;
|
return createdBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getLastUpdatedOn() {
|
public void setCreatedBy(User createdBy) {
|
||||||
return lastUpdatedOn;
|
this.createdBy = createdBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLastUpdatedOn(Date lastUpdatedOn) {
|
public Date getLastUpdatedOn() {
|
||||||
this.lastUpdatedOn = lastUpdatedOn;
|
return lastUpdatedOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public User getLastUpdatedBy() {
|
public void setLastUpdatedOn(Date lastUpdatedOn) {
|
||||||
return lastUpdatedBy;
|
this.lastUpdatedOn = lastUpdatedOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLastUpdatedBy(User lastUpdatedBy) {
|
public User getLastUpdatedBy() {
|
||||||
this.lastUpdatedBy = lastUpdatedBy;
|
return lastUpdatedBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MetodoPago getMetodoPago() {
|
public void setLastUpdatedBy(User lastUpdatedBy) {
|
||||||
return metodoPago;
|
this.lastUpdatedBy = lastUpdatedBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMetodoPago(MetodoPago metodoPago) {
|
public MetodoPago getMetodoPago() {
|
||||||
this.metodoPago = metodoPago;
|
return metodoPago;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setMetodoPago(MetodoPago metodoPago) {
|
||||||
|
this.metodoPago = metodoPago;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getNuevaFechaAPagar() {
|
||||||
|
return nuevaFechaAPagar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNuevaFechaAPagar(Date nuevaFechaAPagar) {
|
||||||
|
this.nuevaFechaAPagar = nuevaFechaAPagar;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -254,6 +254,28 @@ public class PolizaBean extends TaxiGenericBean implements Serializable, Datatab
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void cargarPagos() {
|
||||||
|
logger.info("cargarPagos()");
|
||||||
|
try {
|
||||||
|
setPagosPolizaList(getPagosPolizaController().fillPagosPedientesPolizaByPoliza(getSelectedPoliza()));
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("cargarPagos(): " + e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void actualizarPagoPoliza() {
|
||||||
|
logger.info("actualizarPagoPoliza()");
|
||||||
|
try {
|
||||||
|
getPagosPolizaController().updatePago(getSelectedPago(), getLoggedUser());
|
||||||
|
getPolizaList();
|
||||||
|
cargarPagos();
|
||||||
|
showMessage(FacesMessage.SEVERITY_INFO, "Pago actualizado", "Se actualizó la nueva fecha de pago");
|
||||||
|
} catch (Exception e) {
|
||||||
|
showMessage(FacesMessage.SEVERITY_ERROR, "Error", "Ocurrió un error al actualizar el pago");
|
||||||
|
logger.error("actualizarPagoPoliza(): " + e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void cargarDevolucion() {
|
public void cargarDevolucion() {
|
||||||
setComentario("");
|
setComentario("");
|
||||||
setMontoRenbolso(getSelectedPoliza().getCantidadPagada());
|
setMontoRenbolso(getSelectedPoliza().getCantidadPagada());
|
||||||
@ -771,6 +793,14 @@ public class PolizaBean extends TaxiGenericBean implements Serializable, Datatab
|
|||||||
private GenericPersonController genericPersonController;
|
private GenericPersonController genericPersonController;
|
||||||
|
|
||||||
private List<Poliza> poliza;
|
private List<Poliza> poliza;
|
||||||
|
private List<Poliza> polizasActivasList;
|
||||||
|
private List<Poliza> polizasEmitidasList;
|
||||||
|
private List<Poliza> polizasPedientesDePagoList;
|
||||||
|
private List<Poliza> polizasVencidasList;
|
||||||
|
private List<Poliza> polizasFinalizadasList;
|
||||||
|
private List<Poliza> polizasCaseladasList;
|
||||||
|
private List<PagosPoliza> pagosPolizaList;
|
||||||
|
private PagosPoliza selectedPago;
|
||||||
private List<Taxi> taxi;
|
private List<Taxi> taxi;
|
||||||
private List<TipoPoliza> tipoPoliza;
|
private List<TipoPoliza> tipoPoliza;
|
||||||
private List<Person> asesor;
|
private List<Person> asesor;
|
||||||
@ -1238,12 +1268,116 @@ public class PolizaBean extends TaxiGenericBean implements Serializable, Datatab
|
|||||||
this.montoRenbolso = montoRenbolso;
|
this.montoRenbolso = montoRenbolso;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Poliza> getPolizasActivasList() {
|
||||||
|
return polizasActivasList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPolizasActivasList(List<Poliza> polizasActivasList) {
|
||||||
|
this.polizasActivasList = polizasActivasList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Poliza> getPolizasEmitidasList() {
|
||||||
|
return polizasEmitidasList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPolizasEmitidasList(List<Poliza> polizasEmitidasList) {
|
||||||
|
this.polizasEmitidasList = polizasEmitidasList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Poliza> getPolizasPedientesDePagoList() {
|
||||||
|
return polizasPedientesDePagoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPolizasPedientesDePagoList(List<Poliza> polizasPedientesDePagoList) {
|
||||||
|
this.polizasPedientesDePagoList = polizasPedientesDePagoList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Poliza> getPolizasVencidasList() {
|
||||||
|
return polizasVencidasList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPolizasVencidasList(List<Poliza> polizasVencidasList) {
|
||||||
|
this.polizasVencidasList = polizasVencidasList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Poliza> getPolizasCaseladasList() {
|
||||||
|
return polizasCaseladasList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPolizasCaseladasList(List<Poliza> polizasCaseladasList) {
|
||||||
|
this.polizasCaseladasList = polizasCaseladasList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Poliza> getPolizasFinalizadasList() {
|
||||||
|
return polizasFinalizadasList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPolizasFinalizadasList(List<Poliza> polizasFinalizadasList) {
|
||||||
|
this.polizasFinalizadasList = polizasFinalizadasList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<PagosPoliza> getPagosPolizaList() {
|
||||||
|
return pagosPolizaList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPagosPolizaList(List<PagosPoliza> pagosPolizaList) {
|
||||||
|
this.pagosPolizaList = pagosPolizaList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PagosPoliza getSelectedPago() {
|
||||||
|
return selectedPago;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSelectedPago(PagosPoliza selectedPago) {
|
||||||
|
this.selectedPago = selectedPago;
|
||||||
|
}
|
||||||
|
|
||||||
public void getPolizaList() {
|
public void getPolizaList() {
|
||||||
List<Poliza> PolizaActiva = getController().findActive(getLoggedUser().getLocation());
|
try {
|
||||||
List<Poliza> PolizaDeshabilitada = getController().findDisable(getLoggedUser().getLocation());
|
setPoliza(getController().getAllPolizasByLocation(getLoggedUser().getLocation()));
|
||||||
setPoliza(new ArrayList<>());
|
setPolizasActivasList(new ArrayList<>());
|
||||||
getPoliza().addAll(PolizaActiva);
|
setPolizasEmitidasList(new ArrayList<>());
|
||||||
getPoliza().addAll(PolizaDeshabilitada);
|
setPolizasPedientesDePagoList(new ArrayList<>());
|
||||||
|
setPolizasVencidasList(new ArrayList<>());
|
||||||
|
setPolizasFinalizadasList(new ArrayList<>());
|
||||||
|
setPolizasCaseladasList(new ArrayList<>());
|
||||||
|
Date fechaActual = new Date();
|
||||||
|
int NoPolizasConErrorDeCargado = 0;
|
||||||
|
for (Poliza selecPoliza : getPoliza()) {
|
||||||
|
switch (selecPoliza.getEstatus()) {
|
||||||
|
case CANCELADO:
|
||||||
|
getPolizasCaseladasList().add(selecPoliza);
|
||||||
|
break;
|
||||||
|
case LIQUIDADO:
|
||||||
|
if (selecPoliza.getEndDate().after(fechaActual)) {
|
||||||
|
getPolizasActivasList().add(selecPoliza);
|
||||||
|
} else {
|
||||||
|
getPolizasFinalizadasList().add(selecPoliza);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
PagosPoliza proximoPago = getPagosPolizaController().getSiguintePagosPolizaARealizarByPoliza(selecPoliza);
|
||||||
|
if (proximoPago == null) {
|
||||||
|
NoPolizasConErrorDeCargado++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (proximoPago.getNuevaFechaAPagar() != null) {
|
||||||
|
getPolizasPedientesDePagoList().add(selecPoliza);
|
||||||
|
} else if (proximoPago.getFechaAPagar().before(fechaActual)) {
|
||||||
|
getPolizasVencidasList().add(selecPoliza);
|
||||||
|
} else {
|
||||||
|
getPolizasEmitidasList().add(selecPoliza);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (NoPolizasConErrorDeCargado > 0) {
|
||||||
|
showMessage(FacesMessage.SEVERITY_WARN, "ADVERTENCIA", NoPolizasConErrorDeCargado + " pólizas no se pudieron cargar correctamente ");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
showMessage(FacesMessage.SEVERITY_FATAL, "ERROR", "OCURRIÓ UN ERROR AL TRATA DE CARGAR LAS PÓLIZAS");
|
||||||
|
logger.error("getPolizaList(): " + e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String validarColores(Boolean estatus) {
|
public String validarColores(Boolean estatus) {
|
||||||
|
@ -8,6 +8,14 @@
|
|||||||
<ui:define name="head">
|
<ui:define name="head">
|
||||||
<h:outputScript library="js" name="catalog/carBrand.js" />
|
<h:outputScript library="js" name="catalog/carBrand.js" />
|
||||||
<h:outputScript library="serenity-layout" name="js/calendar_es.js" />
|
<h:outputScript library="serenity-layout" name="js/calendar_es.js" />
|
||||||
|
<style type="text/css">
|
||||||
|
.grayRow {
|
||||||
|
background-color: #C4A09B !important;
|
||||||
|
background-image: none !important;
|
||||||
|
color: #f0e9e8 !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
var inputs = document.querySelectorAll('.year');
|
var inputs = document.querySelectorAll('.year');
|
||||||
@ -34,131 +42,696 @@
|
|||||||
<h:form id="form" rendered="#{loginBean.isUserInRole('catalog.brand.car.name')}">
|
<h:form id="form" rendered="#{loginBean.isUserInRole('catalog.brand.car.name')}">
|
||||||
<p:growl id="msgs" showDetail="true"/>
|
<p:growl id="msgs" showDetail="true"/>
|
||||||
|
|
||||||
<style type="text/css">
|
<p:tabView>
|
||||||
.grayRow {
|
<p:tab title="ACTIVAS" id="tap1">
|
||||||
background-color: #C4A09B !important;
|
<p:dataTable widgetVar="dtTable1" id="dtTable1" var="data" draggableRows="true" draggableColumns="true" value="#{polizaBean.polizasActivasList}" style="margin-bottom:20px; text-align: center" reflow="true" rowsPerPageTemplate="5,10,25,50,100" emptyMessage="Sin registros"
|
||||||
background-image: none !important;
|
rowKey="#{data.id}" selection="#{polizaBean.selectedPoliza}" editable="true" selectionMode="single" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
|
||||||
color: #f0e9e8 !important;
|
rowStyleClass="#{polizaBean.validarColores(data.active)}">
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<p:dataTable widgetVar="dtTable" id="dtTable" var="data" draggableRows="true" draggableColumns="true" value="#{polizaBean.poliza}" style="margin-bottom:20px; text-align: center" reflow="true" rowsPerPageTemplate="5,10,25,50,100" emptyMessage="Sin registros"
|
<f:facet name="header">
|
||||||
rowKey="#{data.id}" selection="#{polizaBean.selectedPoliza}" editable="true" selectionMode="single" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
|
<p:commandButton id="toggler" type="button" value="Columnas" style="float:left;" styleClass="amber-btn flat" icon="ui-icon-calendar"/>
|
||||||
rowStyleClass="#{polizaBean.validarColores(data.active)}">
|
<p:columnToggler datasource="dtTable1" trigger="toggler" />
|
||||||
|
<p:commandButton value="#{i18n['button.add']}" styleClass="amber-btn flat" style="float: right;" icon="ui-icon-plus" oncomplete="PF('dlg2').show();" action="#{polizaBean.newPoliza()}" update="carBrandForm:carBrandDialog" rendered="#{loginBean.isUserInRole('catalog.brand.car.add')}"/>
|
||||||
|
<p:commandButton value="Agregar cliente" styleClass="amber-btn flat" style="float: right;background-color: gray" icon="ui-icon-plus" update="agregarClienteForm" action="#{polizaBean.clearFormClient()}" oncomplete="PF('agregarClienteDialog').show();" />
|
||||||
|
|
||||||
<f:facet name="header">
|
<p:outputPanel>
|
||||||
<p:commandButton id="toggler" type="button" value="Columnas" style="float:left;" styleClass="amber-btn flat" icon="ui-icon-calendar"/>
|
<h:outputText value="#{i18n['general.search']}: " />
|
||||||
<p:columnToggler datasource="dtTable" trigger="toggler" />
|
<p:inputText id="globalFilter" onkeyup="PF('dtTable1').filter()" style="width:150px;color: #000000;"/>
|
||||||
<p:commandButton value="#{i18n['button.add']}" styleClass="amber-btn flat" style="float: right;" icon="ui-icon-plus" oncomplete="PF('dlg2').show();" action="#{polizaBean.newPoliza()}" update="carBrandForm:carBrandDialog" rendered="#{loginBean.isUserInRole('catalog.brand.car.add')}"/>
|
</p:outputPanel>
|
||||||
<p:commandButton value="Agregar cliente" styleClass="amber-btn flat" style="float: right;background-color: gray" icon="ui-icon-plus" update="agregarClienteForm" action="#{polizaBean.clearFormClient()}" oncomplete="PF('agregarClienteDialog').show();" />
|
</f:facet>
|
||||||
|
|
||||||
<p:outputPanel>
|
<p:ajax event="rowEdit" listener="#{polizaBean.editRow}" update=":form:msgs" />
|
||||||
<h:outputText value="#{i18n['general.search']}: " />
|
<p:ajax event="rowEditCancel" listener="#{polizaBean.onRowCancel}" update=":form:msgs" />
|
||||||
<p:inputText id="globalFilter" onkeyup="PF('dtTable').filter()" style="width:150px;color: #000000;"/>
|
<p:ajax event="rowReorder" listener="#{polizaBean.onRowReorder}" update=":form:msgs" />
|
||||||
</p:outputPanel>
|
|
||||||
</f:facet>
|
|
||||||
|
|
||||||
<p:ajax event="rowEdit" listener="#{polizaBean.editRow}" update=":form:msgs" />
|
<p:column headerText="Folio" sortBy="#{data.folio}" filterBy="#{data.folio}">
|
||||||
<p:ajax event="rowEditCancel" listener="#{polizaBean.onRowCancel}" update=":form:msgs" />
|
<h:outputText value="#{data.folio}"
|
||||||
<p:ajax event="rowReorder" listener="#{polizaBean.onRowReorder}" update=":form:msgs" />
|
style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Estatus" sortBy="#{data.estatus.value}" filterBy="#{data.estatus.value}">
|
||||||
|
<h:outputText value="#{data.estatus.value}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Cliente" sortBy="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}" filterBy="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}">
|
||||||
|
<h:outputText value="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Teléfono" sortBy="#{data.telefonoCliente}" filterBy="#{data.telefonoCliente}">
|
||||||
|
<h:outputText value="#{data.telefonoCliente}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Vehículo" sortBy="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}" filterBy="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}">
|
||||||
|
<h:outputText value="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Fecha inicial" sortBy="#{data.initDate}" filterBy="#{data.initDate}">
|
||||||
|
<h:outputText value="#{data.initDate}" style="text-transform: capitalize;">
|
||||||
|
<f:convertDateTime type="date" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Fecha vencimiento" sortBy="#{data.endDate}" filterBy="#{data.endDate}">
|
||||||
|
<h:outputText value="#{data.endDate}" style="text-transform: capitalize;">
|
||||||
|
<f:convertDateTime type="date" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Tipo" sortBy="#{data.tipoPoliza.name}" filterBy="#{data.tipoPoliza.name}">
|
||||||
|
<h:outputText value="#{data.tipoPoliza.name}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Costo" sortBy="#{data.amount}" filterBy="#{data.amount}">
|
||||||
|
<h:outputText value="#{data.amount}" style="text-transform: capitalize;">
|
||||||
|
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Asesor" sortBy="#{data.asesor.firstName} #{data.asesor.lastName}" filterBy="#{data.asesor.firstName} #{data.asesor.lastName}">
|
||||||
|
<h:outputText value="#{data.asesor.firstName} #{data.asesor.lastName}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Comentarios" sortBy="#{data.comentarios}" filterBy="#{data.comentarios}">
|
||||||
|
<h:outputText value="#{data.comentarios}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
|
||||||
<p:column headerText="Folio" sortBy="#{data.folio}" filterBy="#{data.folio}">
|
<p:column headerText="Fecha registro" sortBy="#{data.createdOn}" filterBy="#{data.createdOn}">
|
||||||
<h:outputText value="#{data.folio}"
|
<h:outputText value="#{data.createdOn}" style="text-transform: capitalize;">
|
||||||
style="text-transform: capitalize;">
|
<f:convertDateTime type="date" timeZone="GMT-7" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
</h:outputText>
|
</h:outputText>
|
||||||
</p:column>
|
</p:column>
|
||||||
<p:column headerText="Estatus" sortBy="#{data.estatus.value}" filterBy="#{data.estatus.value}">
|
|
||||||
<h:outputText value="#{data.estatus.value}" style="text-transform: capitalize;">
|
|
||||||
</h:outputText>
|
|
||||||
</p:column>
|
|
||||||
<p:column headerText="Cliente" sortBy="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}" filterBy="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}">
|
|
||||||
<h:outputText value="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}" style="text-transform: capitalize;">
|
|
||||||
</h:outputText>
|
|
||||||
</p:column>
|
|
||||||
<p:column headerText="Teléfono" sortBy="#{data.telefonoCliente}" filterBy="#{data.telefonoCliente}">
|
|
||||||
<h:outputText value="#{data.telefonoCliente}" style="text-transform: capitalize;">
|
|
||||||
</h:outputText>
|
|
||||||
</p:column>
|
|
||||||
<p:column headerText="Vehículo" sortBy="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}" filterBy="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}">
|
|
||||||
<h:outputText value="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}" style="text-transform: capitalize;">
|
|
||||||
</h:outputText>
|
|
||||||
</p:column>
|
|
||||||
<p:column headerText="Fecha inicial" sortBy="#{data.initDate}" filterBy="#{data.initDate}">
|
|
||||||
<h:outputText value="#{data.initDate}" style="text-transform: capitalize;">
|
|
||||||
<f:convertDateTime type="date" locale="es" pattern="dd - MMMM - yyyy"/>
|
|
||||||
</h:outputText>
|
|
||||||
</p:column>
|
|
||||||
<p:column headerText="Fecha vencimiento" sortBy="#{data.endDate}" filterBy="#{data.endDate}">
|
|
||||||
<h:outputText value="#{data.endDate}" style="text-transform: capitalize;">
|
|
||||||
<f:convertDateTime type="date" locale="es" pattern="dd - MMMM - yyyy"/>
|
|
||||||
</h:outputText>
|
|
||||||
</p:column>
|
|
||||||
<p:column headerText="Tipo" sortBy="#{data.tipoPoliza.name}" filterBy="#{data.tipoPoliza.name}">
|
|
||||||
<h:outputText value="#{data.tipoPoliza.name}" style="text-transform: capitalize;">
|
|
||||||
</h:outputText>
|
|
||||||
</p:column>
|
|
||||||
<p:column headerText="Costo" sortBy="#{data.amount}" filterBy="#{data.amount}">
|
|
||||||
<h:outputText value="#{data.amount}" style="text-transform: capitalize;">
|
|
||||||
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
|
||||||
</h:outputText>
|
|
||||||
</p:column>
|
|
||||||
<p:column headerText="Asesor" sortBy="#{data.asesor.firstName} #{data.asesor.lastName}" filterBy="#{data.asesor.firstName} #{data.asesor.lastName}">
|
|
||||||
<h:outputText value="#{data.asesor.firstName} #{data.asesor.lastName}" style="text-transform: capitalize;">
|
|
||||||
</h:outputText>
|
|
||||||
</p:column>
|
|
||||||
<p:column headerText="Comentarios" sortBy="#{data.comentarios}" filterBy="#{data.comentarios}">
|
|
||||||
<h:outputText value="#{data.comentarios}" style="text-transform: capitalize;">
|
|
||||||
</h:outputText>
|
|
||||||
</p:column>
|
|
||||||
|
|
||||||
<p:column headerText="Fecha registro" sortBy="#{data.createdOn}" filterBy="#{data.createdOn}">
|
<p:column headerText="Usuario creación" sortBy="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}" filterBy="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}">
|
||||||
<h:outputText value="#{data.createdOn}" style="text-transform: capitalize;">
|
<h:outputText value="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}" />
|
||||||
<f:convertDateTime type="date" timeZone="GMT-7" locale="es" pattern="dd - MMMM - yyyy"/>
|
</p:column>
|
||||||
</h:outputText>
|
|
||||||
</p:column>
|
|
||||||
|
|
||||||
<p:column headerText="Usuario creación" sortBy="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}" filterBy="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}">
|
<p:column headerText="Acciones" style="width: 4em">
|
||||||
<h:outputText value="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}" />
|
<p:commandButton
|
||||||
</p:column>
|
icon="ui-icon-pencil"
|
||||||
|
title="Editar"
|
||||||
|
class="ui-button-icon-only green-pixcua"
|
||||||
|
oncomplete="PF('dlg2').show()"
|
||||||
|
update="carBrandForm:carBrandDialog"
|
||||||
|
action="#{polizaBean.cargarPoliza()}"
|
||||||
|
rendered="#{data.active and (data.estatus eq 'COTIZACION' or data.estatus eq 'PENDIENTE')}">
|
||||||
|
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
||||||
|
</p:commandButton>
|
||||||
|
|
||||||
<p:column headerText="Acciones" style="width: 4em">
|
<p:commandButton
|
||||||
<p:commandButton
|
icon="ui-icon-close"
|
||||||
icon="ui-icon-pencil"
|
title="Cancelar póliza"
|
||||||
title="Editar"
|
class="rounded-button"
|
||||||
class="ui-button-icon-only green-pixcua"
|
style="background: red"
|
||||||
oncomplete="PF('dlg2').show()"
|
oncomplete="PF('eliminarPoliza').show()"
|
||||||
update="carBrandForm:carBrandDialog"
|
update="eliminarPolizaForm:eliminarPoliza"
|
||||||
action="#{polizaBean.cargarPoliza()}"
|
action="#{polizaBean.cargarDevolucion()}"
|
||||||
rendered="#{data.active and (data.estatus eq 'COTIZACION' or data.estatus eq 'PENDIENTE')}">
|
rendered="#{data.active and data.estatus ne 'CANCELADO'}">
|
||||||
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
||||||
</p:commandButton>
|
|
||||||
|
|
||||||
<p:commandButton
|
<p:commandButton title="Deshabilitar póliza" rendered="#{data.active}" styleClass="edit-button rounded-button ui-button-secondary"
|
||||||
icon="ui-icon-close"
|
style="background-color: gray; padding-top: 1em" icon="ui-icon-minusthick" action="#{polizaBean.deleteRow()}" update="form" >
|
||||||
title="Cancelar póliza"
|
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
||||||
class="rounded-button"
|
<p:confirm header="Deshabilitar póliza" message="¿Está seguro de deshabilitar esta póliza?" icon="pi pi-info-circle"/>
|
||||||
style="background: red"
|
</p:commandButton>
|
||||||
oncomplete="PF('eliminarPoliza').show()"
|
|
||||||
update="eliminarPolizaForm:eliminarPoliza"
|
|
||||||
action="#{polizaBean.cargarDevolucion()}"
|
|
||||||
rendered="#{data.active and data.estatus ne 'CANCELADO'}">
|
|
||||||
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
|
||||||
|
|
||||||
<p:commandButton title="Deshabilitar póliza" rendered="#{data.active}" styleClass="edit-button rounded-button ui-button-secondary"
|
</p:commandButton>
|
||||||
style="background-color: gray; padding-top: 1em" icon="ui-icon-minusthick" action="#{polizaBean.deleteRow()}" update="form" >
|
</p:column>
|
||||||
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
</p:dataTable>
|
||||||
<p:confirm header="Deshabilitar póliza" message="¿Está seguro de deshabilitar esta póliza?" icon="pi pi-info-circle"/>
|
</p:tab>
|
||||||
</p:commandButton>
|
<p:tab title="EMITIDAS" id="tap2">
|
||||||
|
<p:dataTable widgetVar="dtTable2" id="dtTable2" var="data" draggableRows="true" draggableColumns="true" value="#{polizaBean.polizasEmitidasList}" style="margin-bottom:20px; text-align: center" reflow="true" rowsPerPageTemplate="5,10,25,50,100" emptyMessage="Sin registros"
|
||||||
|
rowKey="#{data.id}" selection="#{polizaBean.selectedPoliza}" editable="true" selectionMode="single" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
|
||||||
|
rowStyleClass="#{polizaBean.validarColores(data.active)}">
|
||||||
|
|
||||||
</p:commandButton>
|
<f:facet name="header">
|
||||||
</p:column>
|
<p:commandButton id="toggler" type="button" value="Columnas" style="float:left;" styleClass="amber-btn flat" icon="ui-icon-calendar"/>
|
||||||
</p:dataTable>
|
<p:columnToggler datasource="dtTable2" trigger="toggler" />
|
||||||
|
<p:commandButton value="#{i18n['button.add']}" styleClass="amber-btn flat" style="float: right;" icon="ui-icon-plus" oncomplete="PF('dlg2').show();" action="#{polizaBean.newPoliza()}" update="carBrandForm:carBrandDialog" rendered="#{loginBean.isUserInRole('catalog.brand.car.add')}"/>
|
||||||
|
<p:commandButton value="Agregar cliente" styleClass="amber-btn flat" style="float: right;background-color: gray" icon="ui-icon-plus" update="agregarClienteForm" action="#{polizaBean.clearFormClient()}" oncomplete="PF('agregarClienteDialog').show();" />
|
||||||
|
|
||||||
<p:contextMenu for="dtTable" rendered="#{loginBean.isUserInRole('catalog.brand.car.delete')}">
|
<p:outputPanel>
|
||||||
<p:menuitem value="Borrar" update="dtTable,:form:msgs" icon="ui-icon-close" actionListener="#{polizaBean.deleteRow}"/>
|
<h:outputText value="#{i18n['general.search']}: " />
|
||||||
</p:contextMenu>
|
<p:inputText id="globalFilter" onkeyup="PF('dtTable2').filter()" style="width:150px;color: #000000;"/>
|
||||||
|
</p:outputPanel>
|
||||||
|
</f:facet>
|
||||||
|
|
||||||
<p:confirmDialog global="true" showEffect="fade" hideEffect="fade" responsive="true" width="350">
|
<p:ajax event="rowEdit" listener="#{polizaBean.editRow}" update=":form:msgs" />
|
||||||
|
<p:ajax event="rowEditCancel" listener="#{polizaBean.onRowCancel}" update=":form:msgs" />
|
||||||
|
<p:ajax event="rowReorder" listener="#{polizaBean.onRowReorder}" update=":form:msgs" />
|
||||||
|
|
||||||
|
<p:column headerText="Folio" sortBy="#{data.folio}" filterBy="#{data.folio}">
|
||||||
|
<h:outputText value="#{data.folio}"
|
||||||
|
style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Estatus" sortBy="#{data.estatus.value}" filterBy="#{data.estatus.value}">
|
||||||
|
<h:outputText value="#{data.estatus.value}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Cliente" sortBy="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}" filterBy="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}">
|
||||||
|
<h:outputText value="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Teléfono" sortBy="#{data.telefonoCliente}" filterBy="#{data.telefonoCliente}">
|
||||||
|
<h:outputText value="#{data.telefonoCliente}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Vehículo" sortBy="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}" filterBy="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}">
|
||||||
|
<h:outputText value="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Fecha inicial" sortBy="#{data.initDate}" filterBy="#{data.initDate}">
|
||||||
|
<h:outputText value="#{data.initDate}" style="text-transform: capitalize;">
|
||||||
|
<f:convertDateTime type="date" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Fecha vencimiento" sortBy="#{data.endDate}" filterBy="#{data.endDate}">
|
||||||
|
<h:outputText value="#{data.endDate}" style="text-transform: capitalize;">
|
||||||
|
<f:convertDateTime type="date" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Tipo" sortBy="#{data.tipoPoliza.name}" filterBy="#{data.tipoPoliza.name}">
|
||||||
|
<h:outputText value="#{data.tipoPoliza.name}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Costo" sortBy="#{data.amount}" filterBy="#{data.amount}">
|
||||||
|
<h:outputText value="#{data.amount}" style="text-transform: capitalize;">
|
||||||
|
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Asesor" sortBy="#{data.asesor.firstName} #{data.asesor.lastName}" filterBy="#{data.asesor.firstName} #{data.asesor.lastName}">
|
||||||
|
<h:outputText value="#{data.asesor.firstName} #{data.asesor.lastName}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Comentarios" sortBy="#{data.comentarios}" filterBy="#{data.comentarios}">
|
||||||
|
<h:outputText value="#{data.comentarios}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
|
||||||
|
<p:column headerText="Fecha registro" sortBy="#{data.createdOn}" filterBy="#{data.createdOn}">
|
||||||
|
<h:outputText value="#{data.createdOn}" style="text-transform: capitalize;">
|
||||||
|
<f:convertDateTime type="date" timeZone="GMT-7" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
|
||||||
|
<p:column headerText="Usuario creación" sortBy="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}" filterBy="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}">
|
||||||
|
<h:outputText value="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}" />
|
||||||
|
</p:column>
|
||||||
|
|
||||||
|
<p:column headerText="Acciones" style="width: 4em">
|
||||||
|
<p:commandButton
|
||||||
|
icon="ui-icon-pencil"
|
||||||
|
title="Editar"
|
||||||
|
class="ui-button-icon-only green-pixcua"
|
||||||
|
oncomplete="PF('dlg2').show()"
|
||||||
|
update="carBrandForm:carBrandDialog"
|
||||||
|
action="#{polizaBean.cargarPoliza()}"
|
||||||
|
rendered="#{data.active and (data.estatus eq 'COTIZACION' or data.estatus eq 'PENDIENTE')}">
|
||||||
|
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
||||||
|
</p:commandButton>
|
||||||
|
|
||||||
|
<p:commandButton
|
||||||
|
icon="ui-icon-close"
|
||||||
|
title="Cancelar póliza"
|
||||||
|
class="rounded-button"
|
||||||
|
style="background: red"
|
||||||
|
oncomplete="PF('eliminarPoliza').show()"
|
||||||
|
update="eliminarPolizaForm:eliminarPoliza"
|
||||||
|
action="#{polizaBean.cargarDevolucion()}"
|
||||||
|
rendered="#{data.active and data.estatus ne 'CANCELADO'}">
|
||||||
|
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
||||||
|
|
||||||
|
<p:commandButton title="Deshabilitar póliza" rendered="#{data.active}" styleClass="edit-button rounded-button ui-button-secondary"
|
||||||
|
style="background-color: gray; padding-top: 1em" icon="ui-icon-minusthick" action="#{polizaBean.deleteRow()}" update="form" >
|
||||||
|
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
||||||
|
<p:confirm header="Deshabilitar póliza" message="¿Está seguro de deshabilitar esta póliza?" icon="pi pi-info-circle"/>
|
||||||
|
</p:commandButton>
|
||||||
|
|
||||||
|
</p:commandButton>
|
||||||
|
</p:column>
|
||||||
|
</p:dataTable>
|
||||||
|
</p:tab>
|
||||||
|
<p:tab title="PENDIENTE DE PAGO" id="tap3">
|
||||||
|
<p:dataTable widgetVar="dtTable3" id="dtTable3" var="data" draggableRows="true" draggableColumns="true" value="#{polizaBean.polizasPedientesDePagoList}" style="margin-bottom:20px; text-align: center" reflow="true" rowsPerPageTemplate="5,10,25,50,100" emptyMessage="Sin registros"
|
||||||
|
rowKey="#{data.id}" selection="#{polizaBean.selectedPoliza}" editable="true" selectionMode="single" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
|
||||||
|
rowStyleClass="#{polizaBean.validarColores(data.active)}">
|
||||||
|
|
||||||
|
<f:facet name="header">
|
||||||
|
<p:commandButton id="toggler" type="button" value="Columnas" style="float:left;" styleClass="amber-btn flat" icon="ui-icon-calendar"/>
|
||||||
|
<p:columnToggler datasource="dtTable3" trigger="toggler" />
|
||||||
|
<p:commandButton value="#{i18n['button.add']}" styleClass="amber-btn flat" style="float: right;" icon="ui-icon-plus" oncomplete="PF('dlg2').show();" action="#{polizaBean.newPoliza()}" update="carBrandForm:carBrandDialog" rendered="#{loginBean.isUserInRole('catalog.brand.car.add')}"/>
|
||||||
|
<p:commandButton value="Agregar cliente" styleClass="amber-btn flat" style="float: right;background-color: gray" icon="ui-icon-plus" update="agregarClienteForm" action="#{polizaBean.clearFormClient()}" oncomplete="PF('agregarClienteDialog').show();" />
|
||||||
|
|
||||||
|
<p:outputPanel>
|
||||||
|
<h:outputText value="#{i18n['general.search']}: " />
|
||||||
|
<p:inputText id="globalFilter" onkeyup="PF('dtTable3').filter()" style="width:150px;color: #000000;"/>
|
||||||
|
</p:outputPanel>
|
||||||
|
</f:facet>
|
||||||
|
|
||||||
|
<p:ajax event="rowEdit" listener="#{polizaBean.editRow}" update=":form:msgs" />
|
||||||
|
<p:ajax event="rowEditCancel" listener="#{polizaBean.onRowCancel}" update=":form:msgs" />
|
||||||
|
<p:ajax event="rowReorder" listener="#{polizaBean.onRowReorder}" update=":form:msgs" />
|
||||||
|
|
||||||
|
<p:column headerText="Folio" sortBy="#{data.folio}" filterBy="#{data.folio}">
|
||||||
|
<h:outputText value="#{data.folio}"
|
||||||
|
style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Estatus" sortBy="#{data.estatus.value}" filterBy="#{data.estatus.value}">
|
||||||
|
<h:outputText value="#{data.estatus.value}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Cliente" sortBy="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}" filterBy="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}">
|
||||||
|
<h:outputText value="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Teléfono" sortBy="#{data.telefonoCliente}" filterBy="#{data.telefonoCliente}">
|
||||||
|
<h:outputText value="#{data.telefonoCliente}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Vehículo" sortBy="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}" filterBy="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}">
|
||||||
|
<h:outputText value="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Fecha inicial" sortBy="#{data.initDate}" filterBy="#{data.initDate}">
|
||||||
|
<h:outputText value="#{data.initDate}" style="text-transform: capitalize;">
|
||||||
|
<f:convertDateTime type="date" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Fecha vencimiento" sortBy="#{data.endDate}" filterBy="#{data.endDate}">
|
||||||
|
<h:outputText value="#{data.endDate}" style="text-transform: capitalize;">
|
||||||
|
<f:convertDateTime type="date" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Tipo" sortBy="#{data.tipoPoliza.name}" filterBy="#{data.tipoPoliza.name}">
|
||||||
|
<h:outputText value="#{data.tipoPoliza.name}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Costo" sortBy="#{data.amount}" filterBy="#{data.amount}">
|
||||||
|
<h:outputText value="#{data.amount}" style="text-transform: capitalize;">
|
||||||
|
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Asesor" sortBy="#{data.asesor.firstName} #{data.asesor.lastName}" filterBy="#{data.asesor.firstName} #{data.asesor.lastName}">
|
||||||
|
<h:outputText value="#{data.asesor.firstName} #{data.asesor.lastName}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Comentarios" sortBy="#{data.comentarios}" filterBy="#{data.comentarios}">
|
||||||
|
<h:outputText value="#{data.comentarios}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
|
||||||
|
<p:column headerText="Fecha registro" sortBy="#{data.createdOn}" filterBy="#{data.createdOn}">
|
||||||
|
<h:outputText value="#{data.createdOn}" style="text-transform: capitalize;">
|
||||||
|
<f:convertDateTime type="date" timeZone="GMT-7" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
|
||||||
|
<p:column headerText="Usuario creación" sortBy="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}" filterBy="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}">
|
||||||
|
<h:outputText value="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}" />
|
||||||
|
</p:column>
|
||||||
|
|
||||||
|
<p:column headerText="Acciones" style="width: 4em">
|
||||||
|
<p:commandButton
|
||||||
|
value="$"
|
||||||
|
title="Pagos"
|
||||||
|
class="ui-button"
|
||||||
|
style="background: orange; margin-bottom: 0.5em"
|
||||||
|
oncomplete="PF('verPagoPoliza').show()"
|
||||||
|
update="verPagoPolizaForm"
|
||||||
|
action="#{polizaBean.cargarPagos()}"
|
||||||
|
rendered="#{data.active and (data.estatus eq 'COTIZACION' or data.estatus eq 'PENDIENTE')}">
|
||||||
|
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
||||||
|
</p:commandButton>
|
||||||
|
<br/>
|
||||||
|
|
||||||
|
<p:commandButton
|
||||||
|
icon="ui-icon-pencil"
|
||||||
|
title="Editar"
|
||||||
|
class="ui-button-icon-only green-pixcua"
|
||||||
|
oncomplete="PF('dlg2').show()"
|
||||||
|
update="carBrandForm:carBrandDialog"
|
||||||
|
action="#{polizaBean.cargarPoliza()}"
|
||||||
|
rendered="#{data.active and (data.estatus eq 'COTIZACION' or data.estatus eq 'PENDIENTE')}">
|
||||||
|
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
||||||
|
</p:commandButton>
|
||||||
|
|
||||||
|
<p:commandButton
|
||||||
|
icon="ui-icon-close"
|
||||||
|
title="Cancelar póliza"
|
||||||
|
class="rounded-button"
|
||||||
|
style="background: red"
|
||||||
|
oncomplete="PF('eliminarPoliza').show()"
|
||||||
|
update="eliminarPolizaForm:eliminarPoliza"
|
||||||
|
action="#{polizaBean.cargarDevolucion()}"
|
||||||
|
rendered="#{data.active and data.estatus ne 'CANCELADO'}">
|
||||||
|
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
||||||
|
|
||||||
|
<p:commandButton title="Deshabilitar póliza" rendered="#{data.active}" styleClass="edit-button rounded-button ui-button-secondary"
|
||||||
|
style="background-color: gray; padding-top: 1em" icon="ui-icon-minusthick" action="#{polizaBean.deleteRow()}" update="form" >
|
||||||
|
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
||||||
|
<p:confirm header="Deshabilitar póliza" message="¿Está seguro de deshabilitar esta póliza?" icon="pi pi-info-circle"/>
|
||||||
|
</p:commandButton>
|
||||||
|
|
||||||
|
</p:commandButton>
|
||||||
|
</p:column>
|
||||||
|
</p:dataTable>
|
||||||
|
</p:tab>
|
||||||
|
<p:tab title="VENCIDAS" id="tap4">
|
||||||
|
<p:dataTable widgetVar="dtTable4" id="dtTable4" var="data" draggableRows="true" draggableColumns="true" value="#{polizaBean.polizasVencidasList}" style="margin-bottom:20px; text-align: center" reflow="true" rowsPerPageTemplate="5,10,25,50,100" emptyMessage="Sin registros"
|
||||||
|
rowKey="#{data.id}" selection="#{polizaBean.selectedPoliza}" editable="true" selectionMode="single" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
|
||||||
|
rowStyleClass="#{polizaBean.validarColores(data.active)}">
|
||||||
|
|
||||||
|
<f:facet name="header">
|
||||||
|
<p:commandButton id="toggler" type="button" value="Columnas" style="float:left;" styleClass="amber-btn flat" icon="ui-icon-calendar"/>
|
||||||
|
<p:columnToggler datasource="dtTable4" trigger="toggler" />
|
||||||
|
<p:commandButton value="#{i18n['button.add']}" styleClass="amber-btn flat" style="float: right;" icon="ui-icon-plus" oncomplete="PF('dlg2').show();" action="#{polizaBean.newPoliza()}" update="carBrandForm:carBrandDialog" rendered="#{loginBean.isUserInRole('catalog.brand.car.add')}"/>
|
||||||
|
<p:commandButton value="Agregar cliente" styleClass="amber-btn flat" style="float: right;background-color: gray" icon="ui-icon-plus" update="agregarClienteForm" action="#{polizaBean.clearFormClient()}" oncomplete="PF('agregarClienteDialog').show();" />
|
||||||
|
|
||||||
|
<p:outputPanel>
|
||||||
|
<h:outputText value="#{i18n['general.search']}: " />
|
||||||
|
<p:inputText id="globalFilter" onkeyup="PF('dtTable4').filter()" style="width:150px;color: #000000;"/>
|
||||||
|
</p:outputPanel>
|
||||||
|
</f:facet>
|
||||||
|
|
||||||
|
<p:ajax event="rowEdit" listener="#{polizaBean.editRow}" update=":form:msgs" />
|
||||||
|
<p:ajax event="rowEditCancel" listener="#{polizaBean.onRowCancel}" update=":form:msgs" />
|
||||||
|
<p:ajax event="rowReorder" listener="#{polizaBean.onRowReorder}" update=":form:msgs" />
|
||||||
|
|
||||||
|
<p:column headerText="Folio" sortBy="#{data.folio}" filterBy="#{data.folio}">
|
||||||
|
<h:outputText value="#{data.folio}"
|
||||||
|
style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Estatus" sortBy="#{data.estatus.value}" filterBy="#{data.estatus.value}">
|
||||||
|
<h:outputText value="#{data.estatus.value}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Cliente" sortBy="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}" filterBy="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}">
|
||||||
|
<h:outputText value="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Teléfono" sortBy="#{data.telefonoCliente}" filterBy="#{data.telefonoCliente}">
|
||||||
|
<h:outputText value="#{data.telefonoCliente}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Vehículo" sortBy="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}" filterBy="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}">
|
||||||
|
<h:outputText value="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Fecha inicial" sortBy="#{data.initDate}" filterBy="#{data.initDate}">
|
||||||
|
<h:outputText value="#{data.initDate}" style="text-transform: capitalize;">
|
||||||
|
<f:convertDateTime type="date" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Fecha vencimiento" sortBy="#{data.endDate}" filterBy="#{data.endDate}">
|
||||||
|
<h:outputText value="#{data.endDate}" style="text-transform: capitalize;">
|
||||||
|
<f:convertDateTime type="date" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Tipo" sortBy="#{data.tipoPoliza.name}" filterBy="#{data.tipoPoliza.name}">
|
||||||
|
<h:outputText value="#{data.tipoPoliza.name}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Costo" sortBy="#{data.amount}" filterBy="#{data.amount}">
|
||||||
|
<h:outputText value="#{data.amount}" style="text-transform: capitalize;">
|
||||||
|
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Asesor" sortBy="#{data.asesor.firstName} #{data.asesor.lastName}" filterBy="#{data.asesor.firstName} #{data.asesor.lastName}">
|
||||||
|
<h:outputText value="#{data.asesor.firstName} #{data.asesor.lastName}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Comentarios" sortBy="#{data.comentarios}" filterBy="#{data.comentarios}">
|
||||||
|
<h:outputText value="#{data.comentarios}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
|
||||||
|
<p:column headerText="Fecha registro" sortBy="#{data.createdOn}" filterBy="#{data.createdOn}">
|
||||||
|
<h:outputText value="#{data.createdOn}" style="text-transform: capitalize;">
|
||||||
|
<f:convertDateTime type="date" timeZone="GMT-7" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
|
||||||
|
<p:column headerText="Usuario creación" sortBy="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}" filterBy="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}">
|
||||||
|
<h:outputText value="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}" />
|
||||||
|
</p:column>
|
||||||
|
|
||||||
|
<p:column headerText="Acciones" style="width: 4em">
|
||||||
|
<p:commandButton
|
||||||
|
value="$"
|
||||||
|
title="Pagos"
|
||||||
|
class="ui-button"
|
||||||
|
style="background: orange; margin-bottom: 0.5em"
|
||||||
|
oncomplete="PF('verPagoPoliza').show()"
|
||||||
|
update="verPagoPolizaForm"
|
||||||
|
action="#{polizaBean.cargarPagos()}"
|
||||||
|
rendered="#{data.active and (data.estatus eq 'COTIZACION' or data.estatus eq 'PENDIENTE')}">
|
||||||
|
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
||||||
|
</p:commandButton>
|
||||||
|
<br/>
|
||||||
|
<p:commandButton
|
||||||
|
icon="ui-icon-pencil"
|
||||||
|
title="Editar"
|
||||||
|
style="padding-top: 1em"
|
||||||
|
class="ui-button-icon-only green-pixcua"
|
||||||
|
oncomplete="PF('dlg2').show()"
|
||||||
|
update="carBrandForm:carBrandDialog"
|
||||||
|
action="#{polizaBean.cargarPoliza()}"
|
||||||
|
rendered="#{data.active and (data.estatus eq 'COTIZACION' or data.estatus eq 'PENDIENTE')}">
|
||||||
|
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
||||||
|
</p:commandButton>
|
||||||
|
|
||||||
|
<p:commandButton
|
||||||
|
icon="ui-icon-close"
|
||||||
|
title="Cancelar póliza"
|
||||||
|
class="rounded-button"
|
||||||
|
style="background: red; padding-top: 1em"
|
||||||
|
oncomplete="PF('eliminarPoliza').show()"
|
||||||
|
update="eliminarPolizaForm:eliminarPoliza"
|
||||||
|
action="#{polizaBean.cargarDevolucion()}"
|
||||||
|
rendered="#{data.active and data.estatus ne 'CANCELADO'}">
|
||||||
|
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
||||||
|
|
||||||
|
<p:commandButton title="Deshabilitar póliza" rendered="#{data.active}" styleClass="edit-button rounded-button ui-button-secondary"
|
||||||
|
style="background-color: gray; padding-top: 1em" icon="ui-icon-minusthick" action="#{polizaBean.deleteRow()}" update="form" >
|
||||||
|
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
||||||
|
<p:confirm header="Deshabilitar póliza" message="¿Está seguro de deshabilitar esta póliza?" icon="pi pi-info-circle"/>
|
||||||
|
</p:commandButton>
|
||||||
|
|
||||||
|
</p:commandButton>
|
||||||
|
</p:column>
|
||||||
|
</p:dataTable>
|
||||||
|
</p:tab>
|
||||||
|
<p:tab title="FINALIZADAS" id="tap5">
|
||||||
|
<p:dataTable widgetVar="dtTable5" id="dtTable5" var="data" draggableRows="true" draggableColumns="true" value="#{polizaBean.polizasFinalizadasList}" style="margin-bottom:20px; text-align: center" reflow="true" rowsPerPageTemplate="5,10,25,50,100" emptyMessage="Sin registros"
|
||||||
|
rowKey="#{data.id}" selection="#{polizaBean.selectedPoliza}" editable="true" selectionMode="single" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
|
||||||
|
rowStyleClass="#{polizaBean.validarColores(data.active)}">
|
||||||
|
|
||||||
|
<f:facet name="header">
|
||||||
|
<p:commandButton id="toggler" type="button" value="Columnas" style="float:left;" styleClass="amber-btn flat" icon="ui-icon-calendar"/>
|
||||||
|
<p:columnToggler datasource="dtTable5" trigger="toggler" />
|
||||||
|
<p:commandButton value="#{i18n['button.add']}" styleClass="amber-btn flat" style="float: right;" icon="ui-icon-plus" oncomplete="PF('dlg2').show();" action="#{polizaBean.newPoliza()}" update="carBrandForm:carBrandDialog" rendered="#{loginBean.isUserInRole('catalog.brand.car.add')}"/>
|
||||||
|
<p:commandButton value="Agregar cliente" styleClass="amber-btn flat" style="float: right;background-color: gray" icon="ui-icon-plus" update="agregarClienteForm" action="#{polizaBean.clearFormClient()}" oncomplete="PF('agregarClienteDialog').show();" />
|
||||||
|
|
||||||
|
<p:outputPanel>
|
||||||
|
<h:outputText value="#{i18n['general.search']}: " />
|
||||||
|
<p:inputText id="globalFilter" onkeyup="PF('dtTable5').filter()" style="width:150px;color: #000000;"/>
|
||||||
|
</p:outputPanel>
|
||||||
|
</f:facet>
|
||||||
|
|
||||||
|
<p:ajax event="rowEdit" listener="#{polizaBean.editRow}" update=":form:msgs" />
|
||||||
|
<p:ajax event="rowEditCancel" listener="#{polizaBean.onRowCancel}" update=":form:msgs" />
|
||||||
|
<p:ajax event="rowReorder" listener="#{polizaBean.onRowReorder}" update=":form:msgs" />
|
||||||
|
|
||||||
|
<p:column headerText="Folio" sortBy="#{data.folio}" filterBy="#{data.folio}">
|
||||||
|
<h:outputText value="#{data.folio}"
|
||||||
|
style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Estatus" sortBy="#{data.estatus.value}" filterBy="#{data.estatus.value}">
|
||||||
|
<h:outputText value="#{data.estatus.value}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Cliente" sortBy="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}" filterBy="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}">
|
||||||
|
<h:outputText value="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Teléfono" sortBy="#{data.telefonoCliente}" filterBy="#{data.telefonoCliente}">
|
||||||
|
<h:outputText value="#{data.telefonoCliente}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Vehículo" sortBy="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}" filterBy="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}">
|
||||||
|
<h:outputText value="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Fecha inicial" sortBy="#{data.initDate}" filterBy="#{data.initDate}">
|
||||||
|
<h:outputText value="#{data.initDate}" style="text-transform: capitalize;">
|
||||||
|
<f:convertDateTime type="date" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Fecha vencimiento" sortBy="#{data.endDate}" filterBy="#{data.endDate}">
|
||||||
|
<h:outputText value="#{data.endDate}" style="text-transform: capitalize;">
|
||||||
|
<f:convertDateTime type="date" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Tipo" sortBy="#{data.tipoPoliza.name}" filterBy="#{data.tipoPoliza.name}">
|
||||||
|
<h:outputText value="#{data.tipoPoliza.name}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Costo" sortBy="#{data.amount}" filterBy="#{data.amount}">
|
||||||
|
<h:outputText value="#{data.amount}" style="text-transform: capitalize;">
|
||||||
|
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Asesor" sortBy="#{data.asesor.firstName} #{data.asesor.lastName}" filterBy="#{data.asesor.firstName} #{data.asesor.lastName}">
|
||||||
|
<h:outputText value="#{data.asesor.firstName} #{data.asesor.lastName}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Comentarios" sortBy="#{data.comentarios}" filterBy="#{data.comentarios}">
|
||||||
|
<h:outputText value="#{data.comentarios}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
|
||||||
|
<p:column headerText="Fecha registro" sortBy="#{data.createdOn}" filterBy="#{data.createdOn}">
|
||||||
|
<h:outputText value="#{data.createdOn}" style="text-transform: capitalize;">
|
||||||
|
<f:convertDateTime type="date" timeZone="GMT-7" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
|
||||||
|
<p:column headerText="Usuario creación" sortBy="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}" filterBy="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}">
|
||||||
|
<h:outputText value="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}" />
|
||||||
|
</p:column>
|
||||||
|
|
||||||
|
<p:column headerText="Acciones" style="width: 4em">
|
||||||
|
<p:commandButton
|
||||||
|
icon="ui-icon-pencil"
|
||||||
|
title="Editar"
|
||||||
|
class="ui-button-icon-only green-pixcua"
|
||||||
|
oncomplete="PF('dlg2').show()"
|
||||||
|
update="carBrandForm:carBrandDialog"
|
||||||
|
action="#{polizaBean.cargarPoliza()}"
|
||||||
|
rendered="#{data.active and (data.estatus eq 'COTIZACION' or data.estatus eq 'PENDIENTE')}">
|
||||||
|
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
||||||
|
</p:commandButton>
|
||||||
|
|
||||||
|
<p:commandButton
|
||||||
|
icon="ui-icon-close"
|
||||||
|
title="Cancelar póliza"
|
||||||
|
class="rounded-button"
|
||||||
|
style="background: red"
|
||||||
|
oncomplete="PF('eliminarPoliza').show()"
|
||||||
|
update="eliminarPolizaForm:eliminarPoliza"
|
||||||
|
action="#{polizaBean.cargarDevolucion()}"
|
||||||
|
rendered="#{data.active and data.estatus ne 'CANCELADO'}">
|
||||||
|
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
||||||
|
|
||||||
|
<p:commandButton title="Deshabilitar póliza" rendered="#{data.active}" styleClass="edit-button rounded-button ui-button-secondary"
|
||||||
|
style="background-color: gray; padding-top: 1em" icon="ui-icon-minusthick" action="#{polizaBean.deleteRow()}" update="form" >
|
||||||
|
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
||||||
|
<p:confirm header="Deshabilitar póliza" message="¿Está seguro de deshabilitar esta póliza?" icon="pi pi-info-circle"/>
|
||||||
|
</p:commandButton>
|
||||||
|
|
||||||
|
</p:commandButton>
|
||||||
|
</p:column>
|
||||||
|
</p:dataTable>
|
||||||
|
</p:tab>
|
||||||
|
<p:tab title="CANCELADAS" id="tap6">
|
||||||
|
<p:dataTable widgetVar="dtTable6" id="dtTable6" var="data" draggableRows="true" draggableColumns="true" value="#{polizaBean.polizasCaseladasList}" style="margin-bottom:20px; text-align: center" reflow="true" rowsPerPageTemplate="5,10,25,50,100" emptyMessage="Sin registros"
|
||||||
|
rowKey="#{data.id}" selection="#{polizaBean.selectedPoliza}" editable="true" selectionMode="single" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
|
||||||
|
rowStyleClass="#{polizaBean.validarColores(data.active)}">
|
||||||
|
|
||||||
|
<f:facet name="header">
|
||||||
|
<p:commandButton id="toggler" type="button" value="Columnas" style="float:left;" styleClass="amber-btn flat" icon="ui-icon-calendar"/>
|
||||||
|
<p:columnToggler datasource="dtTable6" trigger="toggler" />
|
||||||
|
<p:commandButton value="#{i18n['button.add']}" styleClass="amber-btn flat" style="float: right;" icon="ui-icon-plus" oncomplete="PF('dlg2').show();" action="#{polizaBean.newPoliza()}" update="carBrandForm:carBrandDialog" rendered="#{loginBean.isUserInRole('catalog.brand.car.add')}"/>
|
||||||
|
<p:commandButton value="Agregar cliente" styleClass="amber-btn flat" style="float: right;background-color: gray" icon="ui-icon-plus" update="agregarClienteForm" action="#{polizaBean.clearFormClient()}" oncomplete="PF('agregarClienteDialog').show();" />
|
||||||
|
|
||||||
|
<p:outputPanel>
|
||||||
|
<h:outputText value="#{i18n['general.search']}: " />
|
||||||
|
<p:inputText id="globalFilter" onkeyup="PF('dtTable6').filter()" style="width:150px;color: #000000;"/>
|
||||||
|
</p:outputPanel>
|
||||||
|
</f:facet>
|
||||||
|
|
||||||
|
<p:ajax event="rowEdit" listener="#{polizaBean.editRow}" update=":form:msgs" />
|
||||||
|
<p:ajax event="rowEditCancel" listener="#{polizaBean.onRowCancel}" update=":form:msgs" />
|
||||||
|
<p:ajax event="rowReorder" listener="#{polizaBean.onRowReorder}" update=":form:msgs" />
|
||||||
|
|
||||||
|
<p:column headerText="Folio" sortBy="#{data.folio}" filterBy="#{data.folio}">
|
||||||
|
<h:outputText value="#{data.folio}"
|
||||||
|
style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Estatus" sortBy="#{data.estatus.value}" filterBy="#{data.estatus.value}">
|
||||||
|
<h:outputText value="#{data.estatus.value}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Cliente" sortBy="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}" filterBy="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}">
|
||||||
|
<h:outputText value="#{data.customer.firstName} #{data.customer.secondName} #{data.customer.lastName} #{data.customer.middleName}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Teléfono" sortBy="#{data.telefonoCliente}" filterBy="#{data.telefonoCliente}">
|
||||||
|
<h:outputText value="#{data.telefonoCliente}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Vehículo" sortBy="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}" filterBy="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}">
|
||||||
|
<h:outputText value="#{data.taxi.placa} #{data.taxi.vehicle.name} #{data.taxi.vehicle.brand.name} #{data.taxi.color.name} #{data.taxi.year}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Fecha inicial" sortBy="#{data.initDate}" filterBy="#{data.initDate}">
|
||||||
|
<h:outputText value="#{data.initDate}" style="text-transform: capitalize;">
|
||||||
|
<f:convertDateTime type="date" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Fecha vencimiento" sortBy="#{data.endDate}" filterBy="#{data.endDate}">
|
||||||
|
<h:outputText value="#{data.endDate}" style="text-transform: capitalize;">
|
||||||
|
<f:convertDateTime type="date" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Tipo" sortBy="#{data.tipoPoliza.name}" filterBy="#{data.tipoPoliza.name}">
|
||||||
|
<h:outputText value="#{data.tipoPoliza.name}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Costo" sortBy="#{data.amount}" filterBy="#{data.amount}">
|
||||||
|
<h:outputText value="#{data.amount}" style="text-transform: capitalize;">
|
||||||
|
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Asesor" sortBy="#{data.asesor.firstName} #{data.asesor.lastName}" filterBy="#{data.asesor.firstName} #{data.asesor.lastName}">
|
||||||
|
<h:outputText value="#{data.asesor.firstName} #{data.asesor.lastName}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
<p:column headerText="Comentarios" sortBy="#{data.comentarios}" filterBy="#{data.comentarios}">
|
||||||
|
<h:outputText value="#{data.comentarios}" style="text-transform: capitalize;">
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
|
||||||
|
<p:column headerText="Fecha registro" sortBy="#{data.createdOn}" filterBy="#{data.createdOn}">
|
||||||
|
<h:outputText value="#{data.createdOn}" style="text-transform: capitalize;">
|
||||||
|
<f:convertDateTime type="date" timeZone="GMT-7" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
|
||||||
|
<p:column headerText="Usuario creación" sortBy="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}" filterBy="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}">
|
||||||
|
<h:outputText value="#{data.createdBy.person.firstName} #{data.createdBy.person.secondName} #{data.createdBy.person.lastName} #{data.createdBy.person.middleName}" />
|
||||||
|
</p:column>
|
||||||
|
|
||||||
|
<p:column headerText="Acciones" style="width: 4em">
|
||||||
|
<p:commandButton
|
||||||
|
icon="ui-icon-pencil"
|
||||||
|
title="Editar"
|
||||||
|
class="ui-button-icon-only green-pixcua"
|
||||||
|
oncomplete="PF('dlg2').show()"
|
||||||
|
update="carBrandForm:carBrandDialog"
|
||||||
|
action="#{polizaBean.cargarPoliza()}"
|
||||||
|
rendered="#{data.active and (data.estatus eq 'COTIZACION' or data.estatus eq 'PENDIENTE')}">
|
||||||
|
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPoliza}"/>
|
||||||
|
</p:commandButton>
|
||||||
|
|
||||||
|
</p:column>
|
||||||
|
</p:dataTable>
|
||||||
|
</p:tab>
|
||||||
|
</p:tabView>
|
||||||
|
|
||||||
|
<p:confirmDialog global="true" showEffect="fade" hideEffect="fade" responsive="true" width="350">
|
||||||
<p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no ui-button-flat"/>
|
<p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no ui-button-flat"/>
|
||||||
<p:commandButton value="Si" type="button" styleClass="ui-confirmdialog-yes" />
|
<p:commandButton value="Si" type="button" styleClass="ui-confirmdialog-yes" />
|
||||||
</p:confirmDialog>
|
</p:confirmDialog>
|
||||||
@ -309,8 +882,8 @@
|
|||||||
</h:panelGroup>
|
</h:panelGroup>
|
||||||
|
|
||||||
<div class="ui-g-12" >
|
<div class="ui-g-12" >
|
||||||
<p:commandButton id="addButton1" value="#{i18n['button.save']}" rendered="#{polizaBean.polizaAdd.id==null}" actionListener="#{polizaBean.addRow}" oncomplete="validNewCarBrand(xhr, status, args)" update=":form:dtTable,msgsDialog,carBrandDialog"/>
|
<p:commandButton id="addButton1" value="#{i18n['button.save']}" rendered="#{polizaBean.polizaAdd.id==null}" actionListener="#{polizaBean.addRow}" oncomplete="validNewCarBrand(xhr, status, args)" update=":form,msgsDialog,carBrandDialog"/>
|
||||||
<p:commandButton id="addButton2" value="#{i18n['button.edit']}" rendered="#{polizaBean.polizaAdd.id!=null}" actionListener="#{polizaBean.editarPoliza}" oncomplete="validNewCarBrand(xhr, status, args)" update=":form:dtTable,msgsDialog,carBrandDialog"/>
|
<p:commandButton id="addButton2" value="#{i18n['button.edit']}" rendered="#{polizaBean.polizaAdd.id!=null}" actionListener="#{polizaBean.editarPoliza}" oncomplete="validNewCarBrand(xhr, status, args)" update=":form,msgsDialog,carBrandDialog"/>
|
||||||
</div>
|
</div>
|
||||||
</p:dialog>
|
</p:dialog>
|
||||||
</h:form>
|
</h:form>
|
||||||
@ -634,6 +1207,69 @@
|
|||||||
</p:dialog>
|
</p:dialog>
|
||||||
</h:form>
|
</h:form>
|
||||||
|
|
||||||
|
<h:form id="verPagoPolizaForm">
|
||||||
|
<p:dialog header="Pagos pendientes" widgetVar="verPagoPoliza" modal="true" width="70em" id="verPagoPoliza">
|
||||||
|
<p:ajax event="close" update="verPagoPoliza" />
|
||||||
|
<p:outputPanel id="pagos">
|
||||||
|
<p:dataTable widgetVar="dtTable2" id="dtTable2" var="data" draggableRows="true" draggableColumns="true" value="#{polizaBean.pagosPolizaList}" style="margin-bottom:20px; text-align: center" reflow="true" rowsPerPageTemplate="5,10,25,50,100" emptyMessage="Sin registros"
|
||||||
|
rowKey="#{data.id}" selection="#{polizaBean.selectedPago}" editable="true" selectionMode="single" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}">
|
||||||
|
|
||||||
|
<f:facet name="header">
|
||||||
|
<p:commandButton id="toggler" type="button" value="Columnas" style="float:left;" styleClass="amber-btn flat" icon="ui-icon-calendar"/>
|
||||||
|
<p:columnToggler datasource="dtTable2" trigger="toggler" />
|
||||||
|
<p:outputPanel>
|
||||||
|
<h:outputText value="#{i18n['general.search']}: " />
|
||||||
|
<p:inputText id="globalFilter" onkeyup="PF('dtTable2').filter()" style="width:150px;color: #000000;"/>
|
||||||
|
</p:outputPanel>
|
||||||
|
</f:facet>
|
||||||
|
|
||||||
|
<p:column headerText="Fecha a pagar" sortBy="#{data.fechaAPagar}" filterBy="#{data.fechaAPagar}">
|
||||||
|
<h:outputText value="#{data.fechaAPagar}" >
|
||||||
|
<f:convertDateTime type="date" timeZone="GMT-7" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
|
||||||
|
<p:column headerText="Estatus" sortBy="#{data.pagoEstatus}" filterBy="#{data.pagoEstatus}">
|
||||||
|
<h:outputText value="#{data.pagoEstatus eq 'ENABLED'?'Pagado':data.pagoEstatus eq 'INCOMPLETE'?'Incompleto':'No pagado'}" />
|
||||||
|
</p:column>
|
||||||
|
|
||||||
|
<p:column headerText="Nueva fecha de pago" sortBy="#{data.nuevaFechaAPagar}" filterBy="#{data.nuevaFechaAPagar}">
|
||||||
|
<h:outputText value="#{data.nuevaFechaAPagar}" >
|
||||||
|
<f:convertDateTime type="date" timeZone="GMT-7" locale="es" pattern="dd - MMMM - yyyy"/>
|
||||||
|
</h:outputText>
|
||||||
|
</p:column>
|
||||||
|
|
||||||
|
<p:column headerText="Acciones">
|
||||||
|
<p:commandButton
|
||||||
|
value="Nueva fecha pago"
|
||||||
|
title="Nueva fecha pago"
|
||||||
|
class="ui-button"
|
||||||
|
oncomplete="PF('nuevaFechaPago').show()"
|
||||||
|
update="nuevaFechaPagoForm">
|
||||||
|
<f:setPropertyActionListener value="#{data}" target="#{polizaBean.selectedPago}"/>
|
||||||
|
</p:commandButton>
|
||||||
|
</p:column>
|
||||||
|
</p:dataTable>
|
||||||
|
</p:outputPanel>
|
||||||
|
</p:dialog>
|
||||||
|
</h:form>
|
||||||
|
|
||||||
|
<h:form id="nuevaFechaPagoForm">
|
||||||
|
<p:dialog header="Actualizar nueva fecha de pago" widgetVar="nuevaFechaPago" modal="true" height="30%" width="30%" id="nuevaFechaPago">
|
||||||
|
<p:ajax event="close" update="nuevaFechaPago" />
|
||||||
|
<p:outputPanel>
|
||||||
|
|
||||||
|
<h:panelGroup styleClass="md-inputfield" style="margin-top: 2em; margin-bottom: 2em" >
|
||||||
|
<p:calendar id="paymentDate" value="#{polizaBean.selectedPago.nuevaFechaAPagar}" readonlyInput="true" navigator="true" locale="es" pattern="dd - MMMM - yyyy" required="true" requiredMessage="La fecha es requerida" style="width: 100%;" />
|
||||||
|
<label>Nueva fecha de pago </label>
|
||||||
|
<p:message for="paymentDate" display="text"/>
|
||||||
|
</h:panelGroup>
|
||||||
|
|
||||||
|
<p:commandButton id="addButtonC" value="Confirmar" actionListener="#{polizaBean.actualizarPagoPoliza()}" update="nuevaFechaPagoForm, form, verPagoPolizaForm:pagos" />
|
||||||
|
</p:outputPanel>
|
||||||
|
</p:dialog>
|
||||||
|
</h:form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</ui:define>
|
</ui:define>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user