SISVECOM - QUE PERMITA HACER EL CORTE DEL DIA, AL DIA SIGUIENTE.
SISVECOM - YA NO HABRÁ AUTORIZACIÓN SERA AUTORIZADO. (ENTREGA) -VENTAS – POR AUTORIZAR – AL APROBAR UN PRÉSTAMO PASARLO DIRECTO A APROBEt SISVECOM - HARÁ UN REPORTE DE CUANTAS TRAE CADA COBRADOR UNO GENERAL Y OTRO AL DIA QUE LO ASIGNARA EL ADMINISTRADOR - CHECAR EN APC – IMPORTAR TABLA “Avance del día” SISVECOM - PRÉSTAMO CAMBIARA A COMPRA DE PRODUCTO. - CORREGIR TEXTOS
This commit is contained in:
parent
63cf262e38
commit
c25d8fb371
@ -7,6 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.arrebol.apc.controller.system.employee;
|
package com.arrebol.apc.controller.system.employee;
|
||||||
|
|
||||||
|
import com.arrebol.apc.controller.util.HibernateUtil;
|
||||||
import com.arrebol.apc.model.ModelParameter;
|
import com.arrebol.apc.model.ModelParameter;
|
||||||
import com.arrebol.apc.model.admin.Bonus;
|
import com.arrebol.apc.model.admin.Bonus;
|
||||||
import com.arrebol.apc.model.admin.constance.BonusCfg;
|
import com.arrebol.apc.model.admin.constance.BonusCfg;
|
||||||
@ -26,6 +27,9 @@ import java.util.List;
|
|||||||
import javax.persistence.Tuple;
|
import javax.persistence.Tuple;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
import org.hibernate.HibernateException;
|
||||||
|
import org.hibernate.Session;
|
||||||
|
import org.hibernate.Transaction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -33,145 +37,169 @@ import org.apache.logging.log4j.Logger;
|
|||||||
*/
|
*/
|
||||||
public class EmployeeController implements Serializable {
|
public class EmployeeController implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find where status EQUALS TO status.
|
* Find where status EQUALS TO status.
|
||||||
*
|
*
|
||||||
* @param office
|
* @param office
|
||||||
* @param status
|
* @param status
|
||||||
* @param hrOwnerId Human resource id from user logged.
|
* @param hrOwnerId Human resource id from user logged.
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<HumanResource> findEmployeesByType(Office office, HumanResourceStatus status, String hrOwnerId) {
|
public List<HumanResource> findEmployeesByType(Office office, HumanResourceStatus status, String hrOwnerId) {
|
||||||
List<ModelParameter> parameters = new ArrayList<>();
|
List<ModelParameter> parameters = new ArrayList<>();
|
||||||
|
|
||||||
parameters.add(new ModelParameter(HumanResourceCfg.FIELD_OFFICE, office));
|
parameters.add(new ModelParameter(HumanResourceCfg.FIELD_OFFICE, office));
|
||||||
parameters.add(new ModelParameter(HumanResourceCfg.FIELD_HR_STATUS, status));
|
parameters.add(new ModelParameter(HumanResourceCfg.FIELD_HR_STATUS, status));
|
||||||
parameters.add(new ModelParameter(HumanResourceByOfficeCfg.HUMAN_RESOURCE, new HumanResource(hrOwnerId)));
|
parameters.add(new ModelParameter(HumanResourceByOfficeCfg.HUMAN_RESOURCE, new HumanResource(hrOwnerId)));
|
||||||
|
|
||||||
return genericEntityRepository.xmlQueryAPCEntities(HumanResource.class, HumanResourceCfg.QUERY_FIND_ALL_BY_STATUS, parameters);
|
return genericEntityRepository.xmlQueryAPCEntities(HumanResource.class, HumanResourceCfg.QUERY_FIND_ALL_BY_STATUS, parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find where status IN status.
|
* Find where status IN status.
|
||||||
*
|
*
|
||||||
* @param office
|
* @param office
|
||||||
* @param statusLst
|
* @param statusLst
|
||||||
* @param hrOwnerId Human resource id from user logged.
|
* @param hrOwnerId Human resource id from user logged.
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<HumanResource> findEmployeesInType(Office office, List<HumanResourceStatus> statusLst, String hrOwnerId) {
|
public List<HumanResource> findEmployeesInType(Office office, List<HumanResourceStatus> statusLst, String hrOwnerId) {
|
||||||
List<ModelParameter> parameters = new ArrayList<>();
|
List<ModelParameter> parameters = new ArrayList<>();
|
||||||
|
|
||||||
parameters.add(new ModelParameter(HumanResourceCfg.FIELD_OFFICE, office));
|
parameters.add(new ModelParameter(HumanResourceCfg.FIELD_OFFICE, office));
|
||||||
parameters.add(new ModelParameter(HumanResourceCfg.FIELD_HR_STATUS, statusLst));
|
parameters.add(new ModelParameter(HumanResourceCfg.FIELD_HR_STATUS, statusLst));
|
||||||
parameters.add(new ModelParameter(HumanResourceByOfficeCfg.HUMAN_RESOURCE, new HumanResource(hrOwnerId)));
|
parameters.add(new ModelParameter(HumanResourceByOfficeCfg.HUMAN_RESOURCE, new HumanResource(hrOwnerId)));
|
||||||
|
|
||||||
return genericEntityRepository.xmlQueryAPCEntities(HumanResource.class, HumanResourceCfg.QUERY_FIND_ALL_IN_STATUS, parameters);
|
return genericEntityRepository.xmlQueryAPCEntities(HumanResource.class, HumanResourceCfg.QUERY_FIND_ALL_IN_STATUS, parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save an entity.
|
* Save an entity.
|
||||||
*
|
*
|
||||||
* @param humanResourceByOffice
|
* @param humanResourceByOffice
|
||||||
* @param humanResource
|
* @param humanResource
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean saveHRController(HumanResourceByOffice humanResourceByOffice, HumanResource humanResource) {
|
public boolean saveHRController(HumanResourceByOffice humanResourceByOffice, HumanResource humanResource) {
|
||||||
logger.debug("saveHRController");
|
logger.debug("saveHRController");
|
||||||
|
|
||||||
boolean success = genericEntityRepository.insertAPCEntity(humanResource);
|
boolean success = genericEntityRepository.insertAPCEntity(humanResource);
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
humanResourceByOffice.setHumanResource(new HumanResource(humanResource.getId()));
|
humanResourceByOffice.setHumanResource(new HumanResource(humanResource.getId()));
|
||||||
success = genericEntityRepository.insertAPCEntity(humanResourceByOffice);
|
success = genericEntityRepository.insertAPCEntity(humanResourceByOffice);
|
||||||
}
|
}
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param hr
|
* @param hr
|
||||||
* @param updateAvatar
|
* @param updateAvatar
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean updateByHumanResourceId(HumanResource hr, boolean updateAvatar) {
|
public boolean updateByHumanResourceId(HumanResource hr, boolean updateAvatar) {
|
||||||
logger.debug("updateByHumanResourceId");
|
logger.debug("updateByHumanResourceId");
|
||||||
|
|
||||||
return humanResourceRepository.updateByHumanResourceId(hr, updateAvatar);
|
return humanResourceRepository.updateByHumanResourceId(hr, updateAvatar);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param status
|
* @param status
|
||||||
* @param userIdToUpdate
|
* @param userIdToUpdate
|
||||||
* @param lastUpdatedBy
|
* @param lastUpdatedBy
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean updateHRByStatus(HumanResourceStatus status, String userIdToUpdate, String lastUpdatedBy) {
|
public boolean updateHRByStatus(HumanResourceStatus status, String userIdToUpdate, String lastUpdatedBy) {
|
||||||
logger.debug("updateHRByStatus");
|
logger.debug("updateHRByStatus");
|
||||||
|
|
||||||
List<ModelParameter> parameters = new ArrayList<>();
|
List<ModelParameter> parameters = new ArrayList<>();
|
||||||
|
|
||||||
parameters.add(new ModelParameter(HumanResourceCfg.FIELD_HR_STATUS, status));
|
parameters.add(new ModelParameter(HumanResourceCfg.FIELD_HR_STATUS, status));
|
||||||
parameters.add(new ModelParameter(HumanResourceCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy));
|
parameters.add(new ModelParameter(HumanResourceCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy));
|
||||||
parameters.add(new ModelParameter(HumanResourceCfg.FIELD_LAST_UPDATED_ON, new Date()));
|
parameters.add(new ModelParameter(HumanResourceCfg.FIELD_LAST_UPDATED_ON, new Date()));
|
||||||
parameters.add(new ModelParameter(HumanResourceCfg.FIELD_ID, userIdToUpdate));
|
parameters.add(new ModelParameter(HumanResourceCfg.FIELD_ID, userIdToUpdate));
|
||||||
|
|
||||||
return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(HumanResourceCfg.UPDATE_HR_BY_STATUS, parameters);
|
return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(HumanResourceCfg.UPDATE_HR_BY_STATUS, parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param officeId
|
* @param officeId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<Bonus> findAllActiveBonus(String officeId) {
|
public List<Bonus> findAllActiveBonus(String officeId) {
|
||||||
logger.debug("findAllActiveBonus");
|
logger.debug("findAllActiveBonus");
|
||||||
|
|
||||||
List<Bonus> results = new ArrayList<>();
|
List<Bonus> results = new ArrayList<>();
|
||||||
try {
|
try {
|
||||||
List<ModelParameter> parameters = new ArrayList<>();
|
List<ModelParameter> parameters = new ArrayList<>();
|
||||||
|
|
||||||
parameters.add(new ModelParameter(BonusCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED));
|
parameters.add(new ModelParameter(BonusCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED));
|
||||||
parameters.add(new ModelParameter(BonusCfg.FIELD_OFFICE, new Office(officeId)));
|
parameters.add(new ModelParameter(BonusCfg.FIELD_OFFICE, new Office(officeId)));
|
||||||
|
|
||||||
List<Tuple> tuples = genericEntityRepository.xmlQueryAPCEntities(
|
List<Tuple> tuples = genericEntityRepository.xmlQueryAPCEntities(
|
||||||
Tuple.class,
|
Tuple.class,
|
||||||
BonusCfg.QUERY_FIND_ALL_ACTIVE_BONUS,
|
BonusCfg.QUERY_FIND_ALL_ACTIVE_BONUS,
|
||||||
parameters);
|
parameters);
|
||||||
|
|
||||||
tuples.forEach((tuple) -> {
|
tuples.forEach((tuple) -> {
|
||||||
results.add(new Bonus(tuple.get("id").toString(), tuple.get("name").toString()));
|
results.add(new Bonus(tuple.get("id").toString(), tuple.get("name").toString()));
|
||||||
});
|
});
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("findAllActiveBonus", e);
|
logger.error("findAllActiveBonus", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public boolean verificarIdentificadorFolio(String identificadorFolio) {
|
||||||
*
|
logger.info("verificarIdentificadorFolio");
|
||||||
* @param hrId
|
boolean success = true;
|
||||||
* @return
|
Transaction transaction = null;
|
||||||
*/
|
try {
|
||||||
public HumanResource findHumanResourceById(String hrId) {
|
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
|
||||||
logger.debug("findHumanResourceById");
|
transaction = session.beginTransaction();
|
||||||
|
String query = "SELECT COUNT(hr.id) "
|
||||||
|
+ "FROM HumanResource hr "
|
||||||
|
+ "WHERE hr.identificadorFolio=:identi ";
|
||||||
|
Long count = (Long) session.createQuery(query).setParameter("identi", identificadorFolio).uniqueResult();
|
||||||
|
if (null != count && count == 0) {
|
||||||
|
success = false;
|
||||||
|
}
|
||||||
|
transaction.commit();
|
||||||
|
logger.info("Total of human resource found: " + count);
|
||||||
|
} catch (HibernateException e) {
|
||||||
|
logger.error("Can not find human resource", e);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("Method verificarIdentificadorFolio()", e);
|
||||||
|
}
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
return (HumanResource) genericEntityRepository.selectAPCEntityById(HumanResource.class, hrId);
|
/**
|
||||||
}
|
*
|
||||||
|
* @param hrId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public HumanResource findHumanResourceById(String hrId) {
|
||||||
|
logger.debug("findHumanResourceById");
|
||||||
|
|
||||||
private static final long serialVersionUID = 2527037592427439763L;
|
return (HumanResource) genericEntityRepository.selectAPCEntityById(HumanResource.class, hrId);
|
||||||
final Logger logger = LogManager.getLogger(EmployeeController.class);
|
}
|
||||||
|
|
||||||
private final GenericEntityRepository genericEntityRepository;
|
private static final long serialVersionUID = 2527037592427439763L;
|
||||||
private final HumanResourceRepository humanResourceRepository;
|
final Logger logger = LogManager.getLogger(EmployeeController.class);
|
||||||
|
|
||||||
public EmployeeController() {
|
private final GenericEntityRepository genericEntityRepository;
|
||||||
this.genericEntityRepository = new GenericEntityRepository();
|
private final HumanResourceRepository humanResourceRepository;
|
||||||
this.humanResourceRepository = new HumanResourceRepository();
|
|
||||||
}
|
public EmployeeController() {
|
||||||
|
this.genericEntityRepository = new GenericEntityRepository();
|
||||||
|
this.humanResourceRepository = new HumanResourceRepository();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -41,388 +41,388 @@ import org.hibernate.annotations.GenericGenerator;
|
|||||||
@Table(name = "APC_HUMAN_RESOURCE")
|
@Table(name = "APC_HUMAN_RESOURCE")
|
||||||
public class HumanResource implements Serializable {
|
public class HumanResource implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -7296859753095844932L;
|
private static final long serialVersionUID = -7296859753095844932L;
|
||||||
|
|
||||||
@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;
|
||||||
|
|
||||||
@Column(name = "first_name", length = 25, nullable = false)
|
@Column(name = "first_name", length = 25, nullable = false)
|
||||||
private String firstName;
|
private String firstName;
|
||||||
|
|
||||||
@Column(name = "second_name", length = 25)
|
@Column(name = "second_name", length = 25)
|
||||||
private String secondName;
|
private String secondName;
|
||||||
|
|
||||||
@Column(name = "last_name", length = 25, nullable = false)
|
@Column(name = "last_name", length = 25, nullable = false)
|
||||||
private String lastName;
|
private String lastName;
|
||||||
|
|
||||||
@Column(name = "middle_name", length = 25, nullable = false)
|
@Column(name = "middle_name", length = 25, nullable = false)
|
||||||
private String middleName;
|
private String middleName;
|
||||||
|
|
||||||
@Temporal(TemporalType.DATE)
|
@Temporal(TemporalType.DATE)
|
||||||
@Column(name = "birthdate")
|
@Column(name = "birthdate")
|
||||||
private Date birthdate;
|
private Date birthdate;
|
||||||
|
|
||||||
@Column(name = "avatar", length = 150, nullable = false)
|
@Column(name = "avatar", length = 150, nullable = false)
|
||||||
private String avatar;
|
private String avatar;
|
||||||
|
|
||||||
@Column(name = "curp", length = 20)
|
@Column(name = "curp", length = 20)
|
||||||
private String curp;
|
private String curp;
|
||||||
|
|
||||||
@Column(name = "rfc", length = 13)
|
@Column(name = "rfc", length = 13)
|
||||||
private String rfc;
|
private String rfc;
|
||||||
|
|
||||||
@Column(name = "ife", length = 20)
|
@Column(name = "ife", length = 20)
|
||||||
private String ife;
|
private String ife;
|
||||||
|
|
||||||
@Temporal(TemporalType.DATE)
|
@Temporal(TemporalType.DATE)
|
||||||
@Column(name = "admission_date")
|
@Column(name = "admission_date")
|
||||||
private Date admissionDate;
|
private Date admissionDate;
|
||||||
|
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
@Column(name = "human_resource_status", nullable = false)
|
@Column(name = "human_resource_status", nullable = false)
|
||||||
private HumanResourceStatus humanResourceStatus;
|
private HumanResourceStatus humanResourceStatus;
|
||||||
|
|
||||||
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
||||||
@JoinColumn(
|
@JoinColumn(
|
||||||
name = "id_role",
|
name = "id_role",
|
||||||
referencedColumnName = "id",
|
referencedColumnName = "id",
|
||||||
nullable = false
|
nullable = false
|
||||||
)
|
)
|
||||||
private RoleCtlg roleCtlg;
|
private RoleCtlg roleCtlg;
|
||||||
|
|
||||||
@OneToOne(fetch = FetchType.LAZY)
|
@OneToOne(fetch = FetchType.LAZY)
|
||||||
@JoinColumn(
|
@JoinColumn(
|
||||||
name = "id_bonus",
|
name = "id_bonus",
|
||||||
referencedColumnName = "id"
|
referencedColumnName = "id"
|
||||||
)
|
)
|
||||||
private Bonus bonus;
|
private Bonus bonus;
|
||||||
|
|
||||||
@Column(name = "payment")
|
@Column(name = "payment")
|
||||||
private BigDecimal payment;
|
private BigDecimal payment;
|
||||||
|
|
||||||
@Column(name = "balance", nullable = false)
|
@Column(name = "balance", nullable = false)
|
||||||
private BigDecimal balance;
|
private BigDecimal balance;
|
||||||
|
|
||||||
@Column(name = "imss")
|
@Column(name = "imss")
|
||||||
private BigDecimal imss;
|
private BigDecimal imss;
|
||||||
|
|
||||||
@Column(name = "employee_saving")
|
@Column(name = "employee_saving")
|
||||||
private BigDecimal employeeSaving;
|
private BigDecimal employeeSaving;
|
||||||
|
|
||||||
@Column(name = "created_by", nullable = false, length = 36)
|
@Column(name = "created_by", nullable = false, length = 36)
|
||||||
private String createdBy;
|
private String createdBy;
|
||||||
|
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
@Column(name = "created_on", length = 19)
|
@Column(name = "created_on", length = 19)
|
||||||
private Date createdOn;
|
private Date createdOn;
|
||||||
|
|
||||||
@Column(name = "last_updated_by", length = 36)
|
@Column(name = "last_updated_by", length = 36)
|
||||||
private String lastUpdatedBy;
|
private String lastUpdatedBy;
|
||||||
|
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
@Column(name = "last_updated_on", length = 19)
|
@Column(name = "last_updated_on", length = 19)
|
||||||
private Date lastUpdatedOn;
|
private Date lastUpdatedOn;
|
||||||
|
|
||||||
@OneToOne(
|
@OneToOne(
|
||||||
mappedBy = "humanResource",
|
mappedBy = "humanResource",
|
||||||
cascade = CascadeType.ALL,
|
cascade = CascadeType.ALL,
|
||||||
orphanRemoval = true,
|
orphanRemoval = true,
|
||||||
fetch = FetchType.LAZY
|
fetch = FetchType.LAZY
|
||||||
)
|
)
|
||||||
private User user;
|
private User user;
|
||||||
|
|
||||||
@OneToMany(
|
@OneToMany(
|
||||||
mappedBy = "humanResource",
|
mappedBy = "humanResource",
|
||||||
cascade = CascadeType.ALL,
|
cascade = CascadeType.ALL,
|
||||||
fetch = FetchType.LAZY,
|
fetch = FetchType.LAZY,
|
||||||
orphanRemoval = true
|
orphanRemoval = true
|
||||||
)
|
)
|
||||||
private List<HumanResourceByOffice> humanResourceByOffices;
|
private List<HumanResourceByOffice> humanResourceByOffices;
|
||||||
|
|
||||||
@OneToMany(
|
@OneToMany(
|
||||||
fetch = FetchType.LAZY,
|
fetch = FetchType.LAZY,
|
||||||
mappedBy = "humanResource",
|
mappedBy = "humanResource",
|
||||||
orphanRemoval = true,
|
orphanRemoval = true,
|
||||||
cascade = CascadeType.ALL
|
cascade = CascadeType.ALL
|
||||||
)
|
)
|
||||||
private List<HumanResourceHasRoute> humanResourceHasRoutes;
|
private List<HumanResourceHasRoute> humanResourceHasRoutes;
|
||||||
|
|
||||||
@OneToMany(
|
@OneToMany(
|
||||||
fetch = FetchType.LAZY,
|
fetch = FetchType.LAZY,
|
||||||
mappedBy = "humanResource",
|
mappedBy = "humanResource",
|
||||||
orphanRemoval = true,
|
orphanRemoval = true,
|
||||||
cascade = CascadeType.ALL
|
cascade = CascadeType.ALL
|
||||||
)
|
)
|
||||||
private List<Advance> advances;
|
private List<Advance> advances;
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
private String fullName;
|
private String fullName;
|
||||||
|
|
||||||
public HumanResource() {
|
public HumanResource() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public HumanResource(String id) {
|
public HumanResource(String id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @param fullName
|
* @param fullName
|
||||||
*/
|
*/
|
||||||
public HumanResource(String id, String fullName) {
|
public HumanResource(String id, String fullName) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.fullName = fullName;
|
this.fullName = fullName;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @param firstName
|
* @param firstName
|
||||||
* @param lastName
|
* @param lastName
|
||||||
* @param avatar
|
* @param avatar
|
||||||
*/
|
*/
|
||||||
public HumanResource(String id, String firstName, String lastName, String avatar) {
|
public HumanResource(String id, String firstName, String lastName, String avatar) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.firstName = firstName;
|
this.firstName = firstName;
|
||||||
this.lastName = lastName;
|
this.lastName = lastName;
|
||||||
this.avatar = avatar;
|
this.avatar = avatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param firstName
|
* @param firstName
|
||||||
* @param lastName
|
* @param lastName
|
||||||
* @param avatar
|
* @param avatar
|
||||||
*/
|
*/
|
||||||
public HumanResource(String firstName, String lastName, String avatar) {
|
public HumanResource(String firstName, String lastName, String avatar) {
|
||||||
this.firstName = firstName;
|
this.firstName = firstName;
|
||||||
this.lastName = lastName;
|
this.lastName = lastName;
|
||||||
this.avatar = avatar;
|
this.avatar = avatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(String id) {
|
public void setId(String id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFirstName() {
|
public String getFirstName() {
|
||||||
return firstName;
|
return firstName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFirstName(String firstName) {
|
public void setFirstName(String firstName) {
|
||||||
this.firstName = firstName;
|
this.firstName = firstName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSecondName() {
|
public String getSecondName() {
|
||||||
return secondName;
|
return secondName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSecondName(String secondName) {
|
public void setSecondName(String secondName) {
|
||||||
this.secondName = secondName;
|
this.secondName = secondName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLastName() {
|
public String getLastName() {
|
||||||
return lastName;
|
return lastName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLastName(String lastName) {
|
public void setLastName(String lastName) {
|
||||||
this.lastName = lastName;
|
this.lastName = lastName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getMiddleName() {
|
public String getMiddleName() {
|
||||||
return middleName;
|
return middleName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMiddleName(String middleName) {
|
public void setMiddleName(String middleName) {
|
||||||
this.middleName = middleName;
|
this.middleName = middleName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getBirthdate() {
|
public Date getBirthdate() {
|
||||||
return birthdate;
|
return birthdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBirthdate(Date birthdate) {
|
public void setBirthdate(Date birthdate) {
|
||||||
this.birthdate = birthdate;
|
this.birthdate = birthdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAvatar() {
|
public String getAvatar() {
|
||||||
return avatar;
|
return avatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAvatar(String avatar) {
|
public void setAvatar(String avatar) {
|
||||||
this.avatar = avatar;
|
this.avatar = avatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCurp() {
|
public String getCurp() {
|
||||||
return curp;
|
return curp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCurp(String curp) {
|
public void setCurp(String curp) {
|
||||||
this.curp = curp;
|
this.curp = curp;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRfc() {
|
public String getRfc() {
|
||||||
return rfc;
|
return rfc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRfc(String rfc) {
|
public void setRfc(String rfc) {
|
||||||
this.rfc = rfc;
|
this.rfc = rfc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getIfe() {
|
public String getIfe() {
|
||||||
return ife;
|
return ife;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIfe(String ife) {
|
public void setIfe(String ife) {
|
||||||
this.ife = ife;
|
this.ife = ife;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getAdmissionDate() {
|
public Date getAdmissionDate() {
|
||||||
return admissionDate;
|
return admissionDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAdmissionDate(Date admissionDate) {
|
public void setAdmissionDate(Date admissionDate) {
|
||||||
this.admissionDate = admissionDate;
|
this.admissionDate = admissionDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HumanResourceStatus getHumanResourceStatus() {
|
public HumanResourceStatus getHumanResourceStatus() {
|
||||||
return humanResourceStatus;
|
return humanResourceStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHumanResourceStatus(HumanResourceStatus humanResourceStatus) {
|
public void setHumanResourceStatus(HumanResourceStatus humanResourceStatus) {
|
||||||
this.humanResourceStatus = humanResourceStatus;
|
this.humanResourceStatus = humanResourceStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RoleCtlg getRoleCtlg() {
|
public RoleCtlg getRoleCtlg() {
|
||||||
return roleCtlg;
|
return roleCtlg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRoleCtlg(RoleCtlg roleCtlg) {
|
public void setRoleCtlg(RoleCtlg roleCtlg) {
|
||||||
this.roleCtlg = roleCtlg;
|
this.roleCtlg = roleCtlg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Bonus getBonus() {
|
public Bonus getBonus() {
|
||||||
return bonus;
|
return bonus;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBonus(Bonus bonus) {
|
public void setBonus(Bonus bonus) {
|
||||||
this.bonus = bonus;
|
this.bonus = bonus;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getBalance() {
|
public BigDecimal getBalance() {
|
||||||
return balance;
|
return balance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBalance(BigDecimal balance) {
|
public void setBalance(BigDecimal balance) {
|
||||||
this.balance = balance;
|
this.balance = balance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getEmployeeSaving() {
|
public BigDecimal getEmployeeSaving() {
|
||||||
return employeeSaving;
|
return employeeSaving;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEmployeeSaving(BigDecimal employeeSaving) {
|
public void setEmployeeSaving(BigDecimal employeeSaving) {
|
||||||
this.employeeSaving = employeeSaving;
|
this.employeeSaving = employeeSaving;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getPayment() {
|
public BigDecimal getPayment() {
|
||||||
return payment;
|
return payment;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPayment(BigDecimal payment) {
|
public void setPayment(BigDecimal payment) {
|
||||||
this.payment = payment;
|
this.payment = payment;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getImss() {
|
public BigDecimal getImss() {
|
||||||
return imss;
|
return imss;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setImss(BigDecimal imss) {
|
public void setImss(BigDecimal imss) {
|
||||||
this.imss = imss;
|
this.imss = imss;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCreatedBy() {
|
public String getCreatedBy() {
|
||||||
return createdBy;
|
return createdBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreatedBy(String createdBy) {
|
public void setCreatedBy(String createdBy) {
|
||||||
this.createdBy = createdBy;
|
this.createdBy = createdBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getCreatedOn() {
|
public Date getCreatedOn() {
|
||||||
return createdOn;
|
return createdOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCreatedOn(Date createdOn) {
|
public void setCreatedOn(Date createdOn) {
|
||||||
this.createdOn = createdOn;
|
this.createdOn = createdOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLastUpdatedBy() {
|
public String getLastUpdatedBy() {
|
||||||
return lastUpdatedBy;
|
return lastUpdatedBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLastUpdatedBy(String lastUpdatedBy) {
|
public void setLastUpdatedBy(String lastUpdatedBy) {
|
||||||
this.lastUpdatedBy = lastUpdatedBy;
|
this.lastUpdatedBy = lastUpdatedBy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getLastUpdatedOn() {
|
public Date getLastUpdatedOn() {
|
||||||
return lastUpdatedOn;
|
return lastUpdatedOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLastUpdatedOn(Date lastUpdatedOn) {
|
public void setLastUpdatedOn(Date lastUpdatedOn) {
|
||||||
this.lastUpdatedOn = lastUpdatedOn;
|
this.lastUpdatedOn = lastUpdatedOn;
|
||||||
}
|
}
|
||||||
|
|
||||||
public User getUser() {
|
public User getUser() {
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUser(User user) {
|
public void setUser(User user) {
|
||||||
this.user = user;
|
this.user = user;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<HumanResourceByOffice> getHumanResourceByOffices() {
|
public List<HumanResourceByOffice> getHumanResourceByOffices() {
|
||||||
return humanResourceByOffices;
|
return humanResourceByOffices;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHumanResourceByOffices(List<HumanResourceByOffice> humanResourceByOffices) {
|
public void setHumanResourceByOffices(List<HumanResourceByOffice> humanResourceByOffices) {
|
||||||
this.humanResourceByOffices = humanResourceByOffices;
|
this.humanResourceByOffices = humanResourceByOffices;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<HumanResourceHasRoute> getHumanResourceHasRoutes() {
|
public List<HumanResourceHasRoute> getHumanResourceHasRoutes() {
|
||||||
return humanResourceHasRoutes;
|
return humanResourceHasRoutes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHumanResourceHasRoutes(List<HumanResourceHasRoute> humanResourceHasRoutes) {
|
public void setHumanResourceHasRoutes(List<HumanResourceHasRoute> humanResourceHasRoutes) {
|
||||||
this.humanResourceHasRoutes = humanResourceHasRoutes;
|
this.humanResourceHasRoutes = humanResourceHasRoutes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Advance> getAdvances() {
|
public List<Advance> getAdvances() {
|
||||||
return advances;
|
return advances;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAdvances(List<Advance> advances) {
|
public void setAdvances(List<Advance> advances) {
|
||||||
this.advances = advances;
|
this.advances = advances;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFullName() {
|
public String getFullName() {
|
||||||
return fullName;
|
return fullName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFullName(String fullName) {
|
public void setFullName(String fullName) {
|
||||||
this.fullName = fullName;
|
this.fullName = fullName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "HumanResource{" + "firstName=" + firstName + ", secondName=" + secondName + ", lastName=" + lastName + ", middleName=" + middleName + '}';
|
return "HumanResource{" + "firstName=" + firstName + ", secondName=" + secondName + ", lastName=" + lastName + ", middleName=" + middleName + '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -305,7 +305,7 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
|||||||
cellGen.setColspan(1);
|
cellGen.setColspan(1);
|
||||||
tableGen.addCell(cellGen);
|
tableGen.addCell(cellGen);
|
||||||
|
|
||||||
cellGen = new PdfPCell(new Paragraph("Entrega de préstamos: ",
|
cellGen = new PdfPCell(new Paragraph("Entrega de compras de producto: ",
|
||||||
FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK)));
|
FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK)));
|
||||||
cellGen.setHorizontalAlignment(Element.ALIGN_LEFT);
|
cellGen.setHorizontalAlignment(Element.ALIGN_LEFT);
|
||||||
cellGen.setBorder(0);
|
cellGen.setBorder(0);
|
||||||
@ -630,7 +630,7 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
|||||||
cellGen.setColspan(1);
|
cellGen.setColspan(1);
|
||||||
tableGen.addCell(cellGen);
|
tableGen.addCell(cellGen);
|
||||||
|
|
||||||
cellGen = new PdfPCell(new Paragraph("Entrega de préstamos: ",
|
cellGen = new PdfPCell(new Paragraph("Entrega de compras de producto: ",
|
||||||
FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK)));
|
FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK)));
|
||||||
cellGen.setHorizontalAlignment(Element.ALIGN_LEFT);
|
cellGen.setHorizontalAlignment(Element.ALIGN_LEFT);
|
||||||
cellGen.setBorder(0);
|
cellGen.setBorder(0);
|
||||||
@ -882,7 +882,7 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
|||||||
|
|
||||||
if (!(dayOfWeek == Calendar.SUNDAY) && !(userId.equalsIgnoreCase("aad0c673-eb93-11ea-b7e1-02907d0fb4e6"))) {
|
if (!(dayOfWeek == Calendar.SUNDAY) && !(userId.equalsIgnoreCase("aad0c673-eb93-11ea-b7e1-02907d0fb4e6"))) {
|
||||||
if (totalCustomerWithOutAction.compareTo(new Long(0)) == 1) {
|
if (totalCustomerWithOutAction.compareTo(new Long(0)) == 1) {
|
||||||
FacesMessage msg = new FacesMessage("ERROR", "El asesor debe de realizar una acción en todos sus préstamos.");
|
FacesMessage msg = new FacesMessage("ERROR", "El asesor debe de realizar una acción en todas sus compras de producto.");
|
||||||
FacesContext.getCurrentInstance().addMessage(null, msg);
|
FacesContext.getCurrentInstance().addMessage(null, msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -9,15 +9,14 @@ import com.arrebol.apc.controller.BitacoraController;
|
|||||||
import com.arrebol.apc.controller.GenericController;
|
import com.arrebol.apc.controller.GenericController;
|
||||||
import com.arrebol.apc.controller.GenericValidationController;
|
import com.arrebol.apc.controller.GenericValidationController;
|
||||||
import com.arrebol.apc.controller.admin.LoanEmployeeController;
|
import com.arrebol.apc.controller.admin.LoanEmployeeController;
|
||||||
import com.arrebol.apc.model.admin.ExpenseCompany;
|
|
||||||
import com.arrebol.apc.model.admin.LoanEmployee;
|
import com.arrebol.apc.model.admin.LoanEmployee;
|
||||||
import com.arrebol.apc.model.admin.LoanEmployeeDetails;
|
import com.arrebol.apc.model.admin.LoanEmployeeDetails;
|
||||||
import com.arrebol.apc.model.core.HumanResource;
|
import com.arrebol.apc.model.core.HumanResource;
|
||||||
import com.arrebol.apc.model.core.Office;
|
import com.arrebol.apc.model.core.Office;
|
||||||
import com.arrebol.apc.model.views.LoanEmployeeView;
|
|
||||||
import com.arrebol.apc.model.enums.ActiveStatus;
|
import com.arrebol.apc.model.enums.ActiveStatus;
|
||||||
import com.arrebol.apc.model.system.logs.Bitacora;
|
import com.arrebol.apc.model.system.logs.Bitacora;
|
||||||
import com.arrebol.apc.model.views.LoanEmployeeDetailAllDataView;
|
import com.arrebol.apc.model.views.LoanEmployeeDetailAllDataView;
|
||||||
|
import com.arrebol.apc.model.views.LoanEmployeeView;
|
||||||
import com.arrebol.apc.web.beans.Datatable;
|
import com.arrebol.apc.web.beans.Datatable;
|
||||||
import com.arrebol.apc.web.beans.GenericBean;
|
import com.arrebol.apc.web.beans.GenericBean;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@ -40,372 +39,369 @@ import org.primefaces.event.RowEditEvent;
|
|||||||
@ViewScoped
|
@ViewScoped
|
||||||
public class LoanEmployeeListBean extends GenericBean implements Serializable, Datatable {
|
public class LoanEmployeeListBean extends GenericBean implements Serializable, Datatable {
|
||||||
|
|
||||||
public List<LoanEmployeeDetailAllDataView> getDetails(String idLoan) {
|
public List<LoanEmployeeDetailAllDataView> getDetails(String idLoan) {
|
||||||
try {
|
try {
|
||||||
setLoanEmployeeDetails(getController().getLoanEmployeeDetailByIdLoan(idLoan));
|
setLoanEmployeeDetails(getController().getLoanEmployeeDetailByIdLoan(idLoan));
|
||||||
|
setTotalAmountLoan(fillTotalAmountLoan());
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
|
return null == loanEmployeeDetails ? new ArrayList<>() : loanEmployeeDetails;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void searchHistoricalAction() {
|
||||||
|
try {
|
||||||
|
if (getStarDate().after(getEndDate())) {
|
||||||
|
showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error"));
|
||||||
|
} else {
|
||||||
|
setLoanEmployee(getController().fillLoanEmployeeDataTable(getStarDate(), getEndDate()));
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal searchTotalAmountLoan() {
|
||||||
|
try {
|
||||||
|
if (getStarDate().after(getEndDate())) {
|
||||||
|
showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error"));
|
||||||
|
} else {
|
||||||
setTotalAmountLoan(fillTotalAmountLoan());
|
setTotalAmountLoan(fillTotalAmountLoan());
|
||||||
} catch (Exception e) {
|
}
|
||||||
}
|
} catch (Exception e) {
|
||||||
return null == loanEmployeeDetails ? new ArrayList<>() : loanEmployeeDetails;
|
}
|
||||||
}
|
return getTotalAmountLoan();
|
||||||
|
}
|
||||||
|
|
||||||
public void searchHistoricalAction() {
|
public BigDecimal fillTotalAmountLoan() {
|
||||||
try {
|
return getController().fillTotalAmountLoan(getStarDate(), getEndDate());
|
||||||
if (getStarDate().after(getEndDate())) {
|
}
|
||||||
showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error"));
|
|
||||||
} else {
|
|
||||||
setLoanEmployee(getController().fillLoanEmployeeDataTable(getStarDate(), getEndDate()));
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal searchTotalAmountLoan() {
|
@Override
|
||||||
try {
|
public void editRow(RowEditEvent event) {
|
||||||
if (getStarDate().after(getEndDate())) {
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error"));
|
}
|
||||||
} else {
|
|
||||||
setTotalAmountLoan(fillTotalAmountLoan());
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
}
|
|
||||||
return getTotalAmountLoan();
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal fillTotalAmountLoan() {
|
@Override
|
||||||
return getController().fillTotalAmountLoan(getStarDate(), getEndDate());
|
public void onRowCancel(RowEditEvent event) {
|
||||||
}
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void editRow(RowEditEvent event) {
|
public void onRowReorder(ReorderEvent event) {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRowCancel(RowEditEvent event) {
|
public void addRow() {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
Date date = new Date();
|
||||||
}
|
if (genericCtrl.existStableGeneralBoxByCreatedOn(date)) {
|
||||||
|
showMessage(FacesMessage.SEVERITY_WARN, "Día cerrado", "No se pueden agregar más compras de producto a empleados porque ya se existe un cuadre de caja general de hoy.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
if (amountLoan.compareTo(BigDecimal.ZERO) == 0 || amountToPay.compareTo(BigDecimal.ZERO) == 0) {
|
||||||
public void onRowReorder(ReorderEvent event) {
|
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
showMessage(FacesMessage.SEVERITY_WARN, "Compra de producto incorrecto", "No se pueden agregar la compra de producto a empleados con monto o monto de abonos de 0");
|
||||||
public void addRow() {
|
return;
|
||||||
Date date = new Date();
|
|
||||||
if (genericCtrl.existStableGeneralBoxByCreatedOn(date)) {
|
|
||||||
showMessage(FacesMessage.SEVERITY_WARN, "Día cerrado", "No se pueden agregar más préstamos a empleados porque ya se existe un cuadre de caja general de hoy.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(amountLoan.compareTo(BigDecimal.ZERO)==0 || amountToPay.compareTo(BigDecimal.ZERO)==0 ){
|
}
|
||||||
|
|
||||||
showMessage(FacesMessage.SEVERITY_WARN, "Prestamo Incorrecto", "No se pueden agregar préstamos a empleados con monto o monto de abonos de 0");
|
if (amountLoan.compareTo(amountToPay) <= 0) {
|
||||||
return;
|
|
||||||
|
|
||||||
}
|
showMessage(FacesMessage.SEVERITY_WARN, "Compra de producto incorrecto", "No se pueden agregar la compra de producto a empleados con valor a pagar menor a sus abonos");
|
||||||
|
return;
|
||||||
|
|
||||||
if(amountLoan.compareTo(amountToPay)<=0){
|
}
|
||||||
|
|
||||||
showMessage(FacesMessage.SEVERITY_WARN, "Prestamo Incorrecto", "No se pueden agregar préstamos a empleados con valor a pagar menor a sus abonos");
|
LoanEmployee loan = new LoanEmployee();
|
||||||
return;
|
loan.setIdEmployee(userId);
|
||||||
|
loan.setCreatedOn(new Date());
|
||||||
|
loan.setCreatedBy(getLoggedUser().getUser().getId());
|
||||||
|
loan.setAmountLoan(amountLoan);
|
||||||
|
loan.setAmountToPay(amountToPay);
|
||||||
|
loan.setLoanEmployeeStatus(ActiveStatus.ENEBLED);
|
||||||
|
|
||||||
}
|
// Calcula numero de semanas
|
||||||
|
Double interes = 0.05;
|
||||||
|
Double interesReal = 0.0;
|
||||||
|
Double semanasD = amountLoan.doubleValue() / amountToPay.doubleValue();
|
||||||
|
int numSemanas = semanasD.intValue();
|
||||||
|
double residuo = semanasD - numSemanas;
|
||||||
|
if (residuo != 0.0) {
|
||||||
|
numSemanas += 1;
|
||||||
|
}
|
||||||
|
|
||||||
LoanEmployee loan = new LoanEmployee();
|
// Calcula número de meses
|
||||||
loan.setIdEmployee(userId);
|
int numMeses = numSemanas / 4;
|
||||||
loan.setCreatedOn(new Date());
|
if (numSemanas % 4 > 0) {
|
||||||
loan.setCreatedBy(getLoggedUser().getUser().getId());
|
numMeses += 1;
|
||||||
loan.setAmountLoan(amountLoan);
|
}
|
||||||
loan.setAmountToPay(amountToPay);
|
|
||||||
loan.setLoanEmployeeStatus(ActiveStatus.ENEBLED);
|
|
||||||
|
|
||||||
// Calcula numero de semanas
|
// Calcula el interes real 0.05 por el número de meses
|
||||||
Double interes = 0.05;
|
interesReal = interes * numMeses;
|
||||||
Double interesReal = 0.0;
|
Double saldoTotal = (amountLoan.doubleValue() * interesReal) + amountLoan.doubleValue();
|
||||||
Double semanasD = amountLoan.doubleValue()/amountToPay.doubleValue();
|
loan.setTotalAmountToPay(new BigDecimal(saldoTotal));
|
||||||
int numSemanas = semanasD.intValue();
|
loan.setBalance(new BigDecimal(saldoTotal));
|
||||||
double residuo = semanasD - numSemanas;
|
|
||||||
if(residuo != 0.0){
|
|
||||||
numSemanas += 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Calcula número de meses
|
HumanResource hr = users.stream().filter(p -> p.getId().equals(userId)).findFirst().get();
|
||||||
int numMeses = numSemanas/4;
|
hr.setBalance(hr.getBalance().add(new BigDecimal(saldoTotal)));
|
||||||
if(numSemanas % 4 > 0){
|
|
||||||
numMeses += 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Calcula el interes real 0.05 por el número de meses
|
getController().saveLoanEmployee(loan, hr);
|
||||||
interesReal = interes * numMeses;
|
|
||||||
Double saldoTotal = (amountLoan.doubleValue() * interesReal) + amountLoan.doubleValue();
|
|
||||||
loan.setTotalAmountToPay(new BigDecimal(saldoTotal));
|
|
||||||
loan.setBalance(new BigDecimal(saldoTotal));
|
|
||||||
|
|
||||||
HumanResource hr = users.stream().filter(p -> p.getId().equals(userId)).findFirst().get();
|
userId = "";
|
||||||
hr.setBalance(hr.getBalance().add(new BigDecimal(saldoTotal)));
|
amountLoan = BigDecimal.ZERO;
|
||||||
|
amountToPay = BigDecimal.ZERO;
|
||||||
|
|
||||||
getController().saveLoanEmployee(loan, hr);
|
setLoanEmployee(getController().fillLoanEmployeeDataTable(getStarDate(), getEndDate()));
|
||||||
|
}
|
||||||
|
|
||||||
userId = "";
|
public void addRowLoanDetail() {
|
||||||
amountLoan = BigDecimal.ZERO;
|
|
||||||
amountToPay = BigDecimal.ZERO;
|
|
||||||
|
|
||||||
setLoanEmployee(getController().fillLoanEmployeeDataTable(getStarDate(), getEndDate()));
|
if (loanDetailAmount.compareTo(BigDecimal.ZERO) == 0) {
|
||||||
}
|
|
||||||
|
|
||||||
public void addRowLoanDetail() {
|
showMessage(FacesMessage.SEVERITY_WARN, "Abono Incorrecto", "No se pueden agregar un abono de 0");
|
||||||
|
return;
|
||||||
|
|
||||||
if(loanDetailAmount.compareTo(BigDecimal.ZERO)==0){
|
}
|
||||||
|
|
||||||
showMessage(FacesMessage.SEVERITY_WARN, "Abono Incorrecto", "No se pueden agregar un abono de 0");
|
if (loanDetailAmount.compareTo(BigDecimal.ZERO) < 0) {
|
||||||
return;
|
|
||||||
|
|
||||||
}
|
showMessage(FacesMessage.SEVERITY_WARN, "Abono Incorrecto", "No se pueden agregar un abono negativo");
|
||||||
|
return;
|
||||||
|
|
||||||
if(loanDetailAmount.compareTo(BigDecimal.ZERO)<0){
|
}
|
||||||
|
|
||||||
showMessage(FacesMessage.SEVERITY_WARN, "Abono Incorrecto", "No se pueden agregar un abono negativo");
|
if (genericCtrl.existStableGeneralBoxByCreatedOn(new Date())) {
|
||||||
return;
|
showMessage(FacesMessage.SEVERITY_WARN, "Día cerrado", "No se pueden hacer mas abonos a compra de productos porque ya se existe un cuadre de caja general de hoy.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
if (loanDetailAmount.compareTo(selectedLoan.getBalance()) <= 0) {
|
||||||
|
if (selectedLoan.getLoanEmployeeStatus() == ActiveStatus.ENEBLED) {
|
||||||
|
LoanEmployeeDetails loanDetail = new LoanEmployeeDetails();
|
||||||
|
loanDetail.setIdLoan(selectedLoan.getId());
|
||||||
|
loanDetail.setIdUser(selectedLoan.getIdUser());
|
||||||
|
loanDetail.setPaymentAmount(loanDetailAmount);
|
||||||
|
loanDetail.setReferenceNumber(selectedLoan.getReferenceNumber() + 1);
|
||||||
|
loanDetail.setCreatedOn(new Date());
|
||||||
|
loanDetail.setCreatedBy(getLoggedUser().getUser().getId());
|
||||||
|
loanDetail.setLoanEmployeeDetailStatus(ActiveStatus.ENEBLED);
|
||||||
|
loanDetail.setPayroll(ActiveStatus.DISABLED);
|
||||||
|
|
||||||
if (genericCtrl.existStableGeneralBoxByCreatedOn(new Date())) {
|
HumanResource hr = users.stream().filter(p -> p.getId().equals(selectedLoan.getIdUser())).findFirst().get();
|
||||||
showMessage(FacesMessage.SEVERITY_WARN, "Día cerrado", "No se pueden hacer mas abonos a prestamos porque ya se existe un cuadre de caja general de hoy.");
|
hr.setBalance(hr.getBalance().subtract(loanDetailAmount));
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
LoanEmployee loan = getController().getLoanEmployeeById(selectedLoan.getId());
|
||||||
|
loan.setBalance(loan.getBalance().subtract(loanDetailAmount));
|
||||||
|
|
||||||
if(loanDetailAmount.compareTo(selectedLoan.getBalance())<=0){
|
getController().saveLoanEmployeeDetail(loanDetail, hr, loan);
|
||||||
if(selectedLoan.getLoanEmployeeStatus()== ActiveStatus.ENEBLED){
|
loanDetailAmount = BigDecimal.ZERO;
|
||||||
LoanEmployeeDetails loanDetail = new LoanEmployeeDetails();
|
|
||||||
loanDetail.setIdLoan(selectedLoan.getId());
|
|
||||||
loanDetail.setIdUser(selectedLoan.getIdUser());
|
|
||||||
loanDetail.setPaymentAmount(loanDetailAmount);
|
|
||||||
loanDetail.setReferenceNumber(selectedLoan.getReferenceNumber() + 1);
|
|
||||||
loanDetail.setCreatedOn(new Date());
|
|
||||||
loanDetail.setCreatedBy(getLoggedUser().getUser().getId());
|
|
||||||
loanDetail.setLoanEmployeeDetailStatus(ActiveStatus.ENEBLED);
|
|
||||||
loanDetail.setPayroll(ActiveStatus.DISABLED);
|
|
||||||
|
|
||||||
HumanResource hr = users.stream().filter(p -> p.getId().equals(selectedLoan.getIdUser())).findFirst().get();
|
setLoanEmployee(getController().fillLoanEmployeeDataTable(getStarDate(), getEndDate()));
|
||||||
hr.setBalance(hr.getBalance().subtract(loanDetailAmount));
|
showMessage(FacesMessage.SEVERITY_INFO, "Abono correcto", "Abono creado correctamente.");
|
||||||
|
} else {
|
||||||
|
showMessage(FacesMessage.SEVERITY_WARN, "Compra de producto deshabilitado", "No se puede abonar a una compra deshabilitado");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
showMessage(FacesMessage.SEVERITY_WARN, "Cantidad incorrecta", "La cantidad a abonar es mayor a la deuda faltante de la compra de producto");
|
||||||
|
}
|
||||||
|
|
||||||
LoanEmployee loan = getController().getLoanEmployeeById(selectedLoan.getId());
|
}
|
||||||
loan.setBalance(loan.getBalance().subtract(loanDetailAmount));
|
|
||||||
|
|
||||||
getController().saveLoanEmployeeDetail(loanDetail, hr, loan);
|
@Override
|
||||||
loanDetailAmount = BigDecimal.ZERO;
|
public void deleteRow() {
|
||||||
|
|
||||||
setLoanEmployee(getController().fillLoanEmployeeDataTable(getStarDate(), getEndDate()));
|
if (genericCtrl.existStableGeneralBoxByCreatedOn(selectedLoan.getCreatedOn())) {
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Abono correcto", "Abono creado correctamente.");}
|
showMessage(FacesMessage.SEVERITY_WARN, "Compra de producto a empleado", "No se puede borrar porque ya se realizó el cuadre de caja general del día.");
|
||||||
else{
|
} else {
|
||||||
showMessage(FacesMessage.SEVERITY_WARN, "Prestamo deshabilitado", "No se puede abonar a un préstamo deshabilitado");
|
if (selectedLoan.getTotalAmountToPay().compareTo(selectedLoan.getBalance()) == 0) {
|
||||||
}
|
boolean delete = true;
|
||||||
}else{
|
|
||||||
showMessage(FacesMessage.SEVERITY_WARN, "Cantidad incorrecta", "La cantidad a abonar es mayor a la deuda faltante del préstamo");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void deleteRow() {
|
|
||||||
|
|
||||||
if (genericCtrl.existStableGeneralBoxByCreatedOn(selectedLoan.getCreatedOn())) {
|
|
||||||
showMessage(FacesMessage.SEVERITY_WARN, "Préstamo a empleado", "No se puede borrar porque ya se realizó el cuadre de caja general del día.");
|
|
||||||
} else {
|
|
||||||
if(selectedLoan.getTotalAmountToPay().compareTo(selectedLoan.getBalance())==0){
|
|
||||||
boolean delete = true;
|
|
||||||
delete = selectedLoan.getLoanEmployeeStatus() == ActiveStatus.ENEBLED ? true : false;
|
delete = selectedLoan.getLoanEmployeeStatus() == ActiveStatus.ENEBLED ? true : false;
|
||||||
|
|
||||||
if (delete) {
|
if (delete) {
|
||||||
getController().updateLoanEmployeeByStatus(ActiveStatus.DISABLED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
getController().updateLoanEmployeeByStatus(ActiveStatus.DISABLED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
||||||
setLoanEmployee(getController().fillLoanEmployeeDataTable(getStarDate(), getEndDate()));
|
setLoanEmployee(getController().fillLoanEmployeeDataTable(getStarDate(), getEndDate()));
|
||||||
|
|
||||||
Bitacora bitacora = new Bitacora();
|
Bitacora bitacora = new Bitacora();
|
||||||
LoanEmployee loan = getController().getLoanEmployeeById(selectedLoan.getId());
|
LoanEmployee loan = getController().getLoanEmployeeById(selectedLoan.getId());
|
||||||
bitacora.setAction("Eliminar gasto administrativo");
|
bitacora.setAction("Eliminar gasto administrativo");
|
||||||
bitacora.setCommentsUser(commentsBitacora);
|
bitacora.setCommentsUser(commentsBitacora);
|
||||||
bitacora.setCreatedBy(getLoggedUser().getUser().getId());
|
bitacora.setCreatedBy(getLoggedUser().getUser().getId());
|
||||||
bitacora.setCreatedOn(new Date());
|
bitacora.setCreatedOn(new Date());
|
||||||
bitacora.setNameUser(getLoggedUser().getUser().getUserName());
|
bitacora.setNameUser(getLoggedUser().getUser().getUserName());
|
||||||
bitacora.setOffice(new Office(getLoggedUser().getOffice().getId()));
|
bitacora.setOffice(new Office(getLoggedUser().getOffice().getId()));
|
||||||
bitacora.setDescription("Se eliminó el prestamo con monto $"
|
bitacora.setDescription("Se eliminó la compra de producto con monto $"
|
||||||
+ loan.getAmountLoan()+ " y fecha " + loan.getCreatedOn());
|
+ loan.getAmountLoan() + " y fecha " + loan.getCreatedOn());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
List<LoanEmployeeDetailAllDataView> details = getDetails(selectedLoan.getId());
|
List<LoanEmployeeDetailAllDataView> details = getDetails(selectedLoan.getId());
|
||||||
if (details != null) {
|
if (details != null) {
|
||||||
for (LoanEmployeeDetailAllDataView detail : details) {
|
for (LoanEmployeeDetailAllDataView detail : details) {
|
||||||
getController().updateLoanEmployeeDetailByStatus(ActiveStatus.DISABLED, detail.getId(), getLoggedUser().getUser().getId());
|
getController().updateLoanEmployeeDetailByStatus(ActiveStatus.DISABLED, detail.getId(), getLoggedUser().getUser().getId());
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
bitacoraCtrl.saveBitacora(bitacora);
|
||||||
bitacoraCtrl.saveBitacora(bitacora);
|
commentsBitacora = "";
|
||||||
commentsBitacora = "";
|
selectedLoan = null;
|
||||||
selectedLoan = null;
|
showMessage(FacesMessage.SEVERITY_INFO, "Compra de producto a empleado eliminado", "Se eliminó correctamente.");
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Préstamo a empleado eliminado", "Se eliminó correctamente.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Préstamo tiene abonos agregados", "No se puede borrar un préstamo con abonos.");
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
showMessage(FacesMessage.SEVERITY_INFO, "La compra de producto tiene abonos agregados", "No se puede borrar una compra de producto con abonos.");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private LoanEmployeeController controller;
|
private LoanEmployeeController controller;
|
||||||
private GenericController genericCtrl;
|
private GenericController genericCtrl;
|
||||||
private List<LoanEmployeeView> loanEmployeeView;
|
private List<LoanEmployeeView> loanEmployeeView;
|
||||||
private List<LoanEmployeeDetailAllDataView> loanEmployeeDetails;
|
private List<LoanEmployeeDetailAllDataView> loanEmployeeDetails;
|
||||||
private LoanEmployeeView selectedLoan;
|
private LoanEmployeeView selectedLoan;
|
||||||
private List<HumanResource> users;
|
private List<HumanResource> users;
|
||||||
private String userId;
|
private String userId;
|
||||||
private BigDecimal amountLoan;
|
private BigDecimal amountLoan;
|
||||||
private BigDecimal amountToPay;
|
private BigDecimal amountToPay;
|
||||||
private BigDecimal loanDetailAmount;
|
private BigDecimal loanDetailAmount;
|
||||||
private BigDecimal totalAmountLoan;
|
private BigDecimal totalAmountLoan;
|
||||||
|
|
||||||
private BitacoraController bitacoraCtrl;
|
private BitacoraController bitacoraCtrl;
|
||||||
private GenericValidationController genericValidateController;
|
private GenericValidationController genericValidateController;
|
||||||
private Date lastStableGeneralBox;
|
private Date lastStableGeneralBox;
|
||||||
private String commentsBitacora;
|
private String commentsBitacora;
|
||||||
|
|
||||||
public BigDecimal getTotalAmountLoan() {
|
public BigDecimal getTotalAmountLoan() {
|
||||||
return totalAmountLoan;
|
return totalAmountLoan;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTotalAmountLoan(BigDecimal totalAmountLoan) {
|
public void setTotalAmountLoan(BigDecimal totalAmountLoan) {
|
||||||
this.totalAmountLoan = totalAmountLoan;
|
this.totalAmountLoan = totalAmountLoan;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getAmountLoan() {
|
public BigDecimal getAmountLoan() {
|
||||||
return amountLoan;
|
return amountLoan;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAmountLoan(BigDecimal amountLoan) {
|
public void setAmountLoan(BigDecimal amountLoan) {
|
||||||
this.amountLoan = amountLoan;
|
this.amountLoan = amountLoan;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getLoanDetailAmount() {
|
public BigDecimal getLoanDetailAmount() {
|
||||||
return loanDetailAmount;
|
return loanDetailAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLoanDetailAmount(BigDecimal loanDetailAmount) {
|
public void setLoanDetailAmount(BigDecimal loanDetailAmount) {
|
||||||
this.loanDetailAmount = loanDetailAmount;
|
this.loanDetailAmount = loanDetailAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getAmountToPay() {
|
public BigDecimal getAmountToPay() {
|
||||||
return amountToPay;
|
return amountToPay;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAmountToPay(BigDecimal amountToPay) {
|
public void setAmountToPay(BigDecimal amountToPay) {
|
||||||
this.amountToPay = amountToPay;
|
this.amountToPay = amountToPay;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUserId() {
|
public String getUserId() {
|
||||||
return userId;
|
return userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUserId(String userId) {
|
public void setUserId(String userId) {
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GenericController getGenericCtrl() {
|
public GenericController getGenericCtrl() {
|
||||||
return genericCtrl;
|
return genericCtrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGenericCtrl(GenericController genericCtrl) {
|
public void setGenericCtrl(GenericController genericCtrl) {
|
||||||
this.genericCtrl = genericCtrl;
|
this.genericCtrl = genericCtrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<HumanResource> getUsers() {
|
public List<HumanResource> getUsers() {
|
||||||
return users;
|
return users;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUsers(List<HumanResource> users) {
|
public void setUsers(List<HumanResource> users) {
|
||||||
this.users = users;
|
this.users = users;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<LoanEmployeeView> getLoanEmployeeView() {
|
public List<LoanEmployeeView> getLoanEmployeeView() {
|
||||||
return loanEmployeeView;
|
return loanEmployeeView;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLoanEmployeeView(List<LoanEmployeeView> loanEmployeeView) {
|
public void setLoanEmployeeView(List<LoanEmployeeView> loanEmployeeView) {
|
||||||
this.loanEmployeeView = loanEmployeeView;
|
this.loanEmployeeView = loanEmployeeView;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LoanEmployeeView getSelectedLoan() {
|
public LoanEmployeeView getSelectedLoan() {
|
||||||
return selectedLoan;
|
return selectedLoan;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSelectedLoan(LoanEmployeeView selectedLoan) {
|
public void setSelectedLoan(LoanEmployeeView selectedLoan) {
|
||||||
this.selectedLoan = selectedLoan;
|
this.selectedLoan = selectedLoan;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LoanEmployeeController getController() {
|
public LoanEmployeeController getController() {
|
||||||
return controller;
|
return controller;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setController(LoanEmployeeController controller) {
|
public void setController(LoanEmployeeController controller) {
|
||||||
this.controller = controller;
|
this.controller = controller;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<LoanEmployeeView> getLoanEmployee() {
|
public List<LoanEmployeeView> getLoanEmployee() {
|
||||||
return loanEmployeeView;
|
return loanEmployeeView;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLoanEmployee(List<LoanEmployeeView> loanEmployee) {
|
public void setLoanEmployee(List<LoanEmployeeView> loanEmployee) {
|
||||||
this.loanEmployeeView = loanEmployee;
|
this.loanEmployeeView = loanEmployee;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<LoanEmployeeDetailAllDataView> getLoanEmployeeDetails() {
|
public List<LoanEmployeeDetailAllDataView> getLoanEmployeeDetails() {
|
||||||
return loanEmployeeDetails;
|
return loanEmployeeDetails;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLoanEmployeeDetails(List<LoanEmployeeDetailAllDataView> loanEmployeeDetails) {
|
public void setLoanEmployeeDetails(List<LoanEmployeeDetailAllDataView> loanEmployeeDetails) {
|
||||||
this.loanEmployeeDetails = loanEmployeeDetails;
|
this.loanEmployeeDetails = loanEmployeeDetails;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCommentsBitacora() {
|
public String getCommentsBitacora() {
|
||||||
return commentsBitacora;
|
return commentsBitacora;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCommentsBitacora(String commentsBitacora) {
|
public void setCommentsBitacora(String commentsBitacora) {
|
||||||
this.commentsBitacora = commentsBitacora;
|
this.commentsBitacora = commentsBitacora;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GenericValidationController getGenericValidateController() {
|
public GenericValidationController getGenericValidateController() {
|
||||||
return genericValidateController;
|
return genericValidateController;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGenericValidateController(GenericValidationController genericController) {
|
public void setGenericValidateController(GenericValidationController genericController) {
|
||||||
this.genericValidateController = genericController;
|
this.genericValidateController = genericController;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getLastStableGeneralBox() {
|
public Date getLastStableGeneralBox() {
|
||||||
return lastStableGeneralBox;
|
return lastStableGeneralBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLastStableGeneralBox(Date lastStableGeneralBox) {
|
public void setLastStableGeneralBox(Date lastStableGeneralBox) {
|
||||||
this.lastStableGeneralBox = lastStableGeneralBox;
|
this.lastStableGeneralBox = lastStableGeneralBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void init() {
|
public void init() {
|
||||||
try {
|
try {
|
||||||
loadBundlePropertyFile();
|
loadBundlePropertyFile();
|
||||||
genericCtrl = new GenericController();
|
genericCtrl = new GenericController();
|
||||||
setController(new LoanEmployeeController());
|
setController(new LoanEmployeeController());
|
||||||
bitacoraCtrl = new BitacoraController();
|
bitacoraCtrl = new BitacoraController();
|
||||||
setGenericValidateController(new GenericValidationController());
|
setGenericValidateController(new GenericValidationController());
|
||||||
setLastStableGeneralBox(getGenericValidateController().lastStableGeneralBoxByDate(getLoggedUser().getUser()));
|
setLastStableGeneralBox(getGenericValidateController().lastStableGeneralBoxByDate(getLoggedUser().getUser()));
|
||||||
setLoanEmployee(getController().fillLoanEmployeeDataTable(getStarDate(), getEndDate()));
|
setLoanEmployee(getController().fillLoanEmployeeDataTable(getStarDate(), getEndDate()));
|
||||||
// users = genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId());
|
// users = genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId());
|
||||||
users = genericCtrl.getAllHRByOffice(getLoggedUser().getOffice().getId());
|
users = genericCtrl.getAllHRByOffice(getLoggedUser().getOffice().getId());
|
||||||
totalAmountLoan = fillTotalAmountLoan();
|
totalAmountLoan = fillTotalAmountLoan();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,42 +41,42 @@ import org.primefaces.event.RowEditEvent;
|
|||||||
@ViewScoped
|
@ViewScoped
|
||||||
public class LoanHistoryBean extends GenericBean implements Serializable, Datatable {
|
public class LoanHistoryBean extends GenericBean implements Serializable, Datatable {
|
||||||
|
|
||||||
public void searchHistoricalAction() {
|
public void searchHistoricalAction() {
|
||||||
try {
|
try {
|
||||||
if (getStarDate().after(getEndDate())) {
|
if (getStarDate().after(getEndDate())) {
|
||||||
showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error"));
|
showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error"));
|
||||||
} else {
|
} else {
|
||||||
setLoan(getLoanCtrl().fillAllLoansViewDatatable(getStarDate(), getEndDate()));
|
setLoan(getLoanCtrl().fillAllLoansViewDatatable(getStarDate(), getEndDate()));
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<HistoryLoanView> fillDatatableLoan() {
|
public List<HistoryLoanView> fillDatatableLoan() {
|
||||||
return getLoanCtrl().fillAllLoansViewDatatable(getStarDate(), getEndDate());
|
return getLoanCtrl().fillAllLoansViewDatatable(getStarDate(), getEndDate());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changeBonusNewCustomer() {
|
public void changeBonusNewCustomer() {
|
||||||
loanCtrl.updateBonusNewCustomer(ActiveStatus.ENEBLED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
loanCtrl.updateBonusNewCustomer(ActiveStatus.ENEBLED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
||||||
loan.clear();
|
loan.clear();
|
||||||
loan = fillDatatableLoan();
|
loan = fillDatatableLoan();
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
|
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de bono", "El préstamo empezó a contar como bono de cliente nuevo.");
|
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de bono", "La compra de producto empezó a contar como bono de cliente nuevo.");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeBonusNewCustomer() {
|
public void removeBonusNewCustomer() {
|
||||||
loanCtrl.updateBonusNewCustomer(ActiveStatus.DISABLED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
loanCtrl.updateBonusNewCustomer(ActiveStatus.DISABLED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
||||||
loan.clear();
|
loan.clear();
|
||||||
loan = fillDatatableLoan();
|
loan = fillDatatableLoan();
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
|
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de bono", "El préstamo ya no contará como bono de cliente nuevo.");
|
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de bono", "La compra de producto ya no contará como bono de cliente nuevo.");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteFeeLoan() {
|
public void deleteFeeLoan() {
|
||||||
|
|
||||||
/* if (selectedLoan.getEstatusPrestamo()== LoanStatus.APPROVED.getValue() || selectedLoan.getEstatusPrestamo() == LoanStatus.PENDING_RENOVATION.getValue()) {
|
/* if (selectedLoan.getEstatusPrestamo()== LoanStatus.APPROVED.getValue() || selectedLoan.getEstatusPrestamo() == LoanStatus.PENDING_RENOVATION.getValue()) {
|
||||||
|
|
||||||
List<LoanDetails> details = loanCtrl.getLoanDetailsFeeCurdatebyIdLoan(selectedLoan.getId());
|
List<LoanDetails> details = loanCtrl.getLoanDetailsFeeCurdatebyIdLoan(selectedLoan.getId());
|
||||||
if (details != null && !details.isEmpty()) {
|
if (details != null && !details.isEmpty()) {
|
||||||
@ -101,71 +101,71 @@ public class LoanHistoryBean extends GenericBean implements Serializable, Datata
|
|||||||
showMessage(FacesMessage.SEVERITY_WARN, "No se puede eliminar la multa", "Solo puedes eliminar la multa de préstamos en estatus Aprobados o Pendiente por renovación");
|
showMessage(FacesMessage.SEVERITY_WARN, "No se puede eliminar la multa", "Solo puedes eliminar la multa de préstamos en estatus Aprobados o Pendiente por renovación");
|
||||||
return;
|
return;
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changeRoute() {
|
public void changeRoute() {
|
||||||
if (!routeId.isEmpty()) {
|
if (!routeId.isEmpty()) {
|
||||||
if (loanCtrl.updateRouteById(new RouteCtlg(routeId), selectedLoan.getId(), getLoggedUser().getUser().getId())) {
|
if (loanCtrl.updateRouteById(new RouteCtlg(routeId), selectedLoan.getId(), getLoggedUser().getUser().getId())) {
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Ruta modificada", "Se modificó correctamente.");
|
showMessage(FacesMessage.SEVERITY_INFO, "Ruta modificada", "Se modificó correctamente.");
|
||||||
} else {
|
} else {
|
||||||
showMessage(FacesMessage.SEVERITY_WARN, "Ruta modificada", "Ocurrió un error durante el proceso.");
|
showMessage(FacesMessage.SEVERITY_WARN, "Ruta modificada", "Ocurrió un error durante el proceso.");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changeLoanType() {
|
public void changeLoanType() {
|
||||||
if (selectedLoan.getEstatusPrestamo() != LoanStatus.TO_DELIVERY.getValue()) {
|
if (selectedLoan.getEstatusPrestamo() != LoanStatus.TO_DELIVERY.getValue()) {
|
||||||
loanTypeId = "";
|
loanTypeId = "";
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
showMessage(FacesMessage.SEVERITY_WARN, "No se puede cambiar el tipo de préstamo", "Solo puedes cambiar el monto a prestar de préstamos en estatus Por liberar");
|
showMessage(FacesMessage.SEVERITY_WARN, "No se puede cambiar el tipo de compra de producto", "Solo puedes cambiar el monto a comprar de compra de producto en estatus Por liberar");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId());
|
Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId());
|
||||||
loanUpdate.setLoanType(new LoanType(loanTypeId));
|
loanUpdate.setLoanType(new LoanType(loanTypeId));
|
||||||
loanUpdate.setAmountToPay(loanTypeCtrl.getLoanTypeById(loanTypeId).getPaymentTotal());
|
loanUpdate.setAmountToPay(loanTypeCtrl.getLoanTypeById(loanTypeId).getPaymentTotal());
|
||||||
if (loanCtrl.updateLoan(loanUpdate)) {
|
if (loanCtrl.updateLoan(loanUpdate)) {
|
||||||
loan.clear();
|
loan.clear();
|
||||||
loan = fillDatatableLoan();
|
loan = fillDatatableLoan();
|
||||||
loanTypeId = "";
|
loanTypeId = "";
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de tipo de préstamo", "El préstamo se cambió correctamente");
|
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de tipo de compra de producto", "La compra de producto se cambió correctamente");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteLoan() {
|
public void deleteLoan() {
|
||||||
/* loanCtrl.updateLoanByStatusWeb(LoanStatus.DELETED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
/* loanCtrl.updateLoanByStatusWeb(LoanStatus.DELETED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
||||||
loanCtrl.updateLoanByUserByStatus(LoanStatus.DELETED, selectedLoan);
|
loanCtrl.updateLoanByUserByStatus(LoanStatus.DELETED, selectedLoan);
|
||||||
loan.remove(selectedLoan);
|
loan.remove(selectedLoan);
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
|
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Eliminado' de forma correcta.");*/
|
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Eliminado' de forma correcta.");*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changeApprovedStatus() {
|
public void changeApprovedStatus() {
|
||||||
/*loanCtrl.updateLoanByStatusWeb(LoanStatus.APPROVED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
/*loanCtrl.updateLoanByStatusWeb(LoanStatus.APPROVED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
||||||
loanCtrl.updateLoanByUserByStatus(LoanStatus.APPROVED, selectedLoan);
|
loanCtrl.updateLoanByUserByStatus(LoanStatus.APPROVED, selectedLoan);
|
||||||
loan.clear();
|
loan.clear();
|
||||||
loan = fillDatatableLoan();
|
loan = fillDatatableLoan();
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
|
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Aprobado' de forma correcta.");*/
|
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Aprobado' de forma correcta.");*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changeFinishStatus() {
|
public void changeFinishStatus() {
|
||||||
/*loanCtrl.updateLoanByStatusWeb(LoanStatus.FINISH, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
/*loanCtrl.updateLoanByStatusWeb(LoanStatus.FINISH, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
||||||
loanCtrl.updateLoanByUserByStatus(LoanStatus.FINISH, selectedLoan);
|
loanCtrl.updateLoanByUserByStatus(LoanStatus.FINISH, selectedLoan);
|
||||||
loan.clear();
|
loan.clear();
|
||||||
loan = fillDatatableLoan();
|
loan = fillDatatableLoan();
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
|
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Aprobado' de forma correcta.");*/
|
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Aprobado' de forma correcta.");*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deletePaymentLoan() {
|
public void deletePaymentLoan() {
|
||||||
|
|
||||||
/*if (selectedLoan.getLoanStatus() == LoanStatus.APPROVED || selectedLoan.getLoanStatus() == LoanStatus.PENDING_RENOVATION) {
|
/*if (selectedLoan.getLoanStatus() == LoanStatus.APPROVED || selectedLoan.getLoanStatus() == LoanStatus.PENDING_RENOVATION) {
|
||||||
|
|
||||||
List<LoanDetails> details = loanCtrl.getLoanDetailsCurdatebyIdLoan(selectedLoan.getId());
|
List<LoanDetails> details = loanCtrl.getLoanDetailsCurdatebyIdLoan(selectedLoan.getId());
|
||||||
if (details != null && !details.isEmpty()) {
|
if (details != null && !details.isEmpty()) {
|
||||||
@ -190,15 +190,15 @@ public class LoanHistoryBean extends GenericBean implements Serializable, Datata
|
|||||||
showMessage(FacesMessage.SEVERITY_WARN, "No se puede eliminar abono", "Solo puedes eliminar el abono de préstamos en estatus Aprobados o Pendiente por renovación");
|
showMessage(FacesMessage.SEVERITY_WARN, "No se puede eliminar abono", "Solo puedes eliminar el abono de préstamos en estatus Aprobados o Pendiente por renovación");
|
||||||
return;
|
return;
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void editRow(RowEditEvent event) {
|
public void editRow(RowEditEvent event) {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addPayment() {
|
public void addPayment() {
|
||||||
/*if (selectedLoan.getLoanStatus() == LoanStatus.APPROVED || selectedLoan.getLoanStatus() == LoanStatus.PENDING_RENOVATION) {
|
/*if (selectedLoan.getLoanStatus() == LoanStatus.APPROVED || selectedLoan.getLoanStatus() == LoanStatus.PENDING_RENOVATION) {
|
||||||
LoanDetails detail = new LoanDetails();
|
LoanDetails detail = new LoanDetails();
|
||||||
detail.setComments(comments);
|
detail.setComments(comments);
|
||||||
detail.setCreatedBy(getLoggedUser().getUser().getId());
|
detail.setCreatedBy(getLoggedUser().getUser().getId());
|
||||||
@ -239,10 +239,10 @@ public class LoanHistoryBean extends GenericBean implements Serializable, Datata
|
|||||||
return;
|
return;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addFee() {
|
public void addFee() {
|
||||||
/*if (selectedLoan.getLoanStatus() != LoanStatus.APPROVED) {
|
/*if (selectedLoan.getLoanStatus() != LoanStatus.APPROVED) {
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
userId = "";
|
userId = "";
|
||||||
comments = "";
|
comments = "";
|
||||||
@ -282,10 +282,10 @@ public class LoanHistoryBean extends GenericBean implements Serializable, Datata
|
|||||||
fee = BigDecimal.ZERO;
|
fee = BigDecimal.ZERO;
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Agregar multa", "Se agregó la multa de forma correcta.");
|
showMessage(FacesMessage.SEVERITY_INFO, "Agregar multa", "Se agregó la multa de forma correcta.");
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changeOwner() {
|
public void changeOwner() {
|
||||||
/*if (selectedLoan.getLoanStatus() != LoanStatus.APPROVED) {
|
/*if (selectedLoan.getLoanStatus() != LoanStatus.APPROVED) {
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
userId = "";
|
userId = "";
|
||||||
showMessage(FacesMessage.SEVERITY_WARN, "No se puede modificar propietario", "Solo puedes cambiar de propietario a préstamos en estatus Aprobados");
|
showMessage(FacesMessage.SEVERITY_WARN, "No se puede modificar propietario", "Solo puedes cambiar de propietario a préstamos en estatus Aprobados");
|
||||||
@ -319,228 +319,228 @@ public class LoanHistoryBean extends GenericBean implements Serializable, Datata
|
|||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
showMessage(FacesMessage.SEVERITY_ERROR, "Cambio de propietario", "Ocurrió un error al intentar hacer el cambio de propietario.");
|
showMessage(FacesMessage.SEVERITY_ERROR, "Cambio de propietario", "Ocurrió un error al intentar hacer el cambio de propietario.");
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private void initStartAndEndDates() {
|
private void initStartAndEndDates() {
|
||||||
try {
|
try {
|
||||||
Calendar starDateCalendar = Calendar.getInstance();
|
Calendar starDateCalendar = Calendar.getInstance();
|
||||||
|
|
||||||
starDateCalendar.setTime(DateWrapper.getTodayMXTime());
|
starDateCalendar.setTime(DateWrapper.getTodayMXTime());
|
||||||
starDateCalendar.add(Calendar.MONTH, -1);
|
starDateCalendar.add(Calendar.MONTH, -1);
|
||||||
|
|
||||||
setStarDate(starDateCalendar.getTime());
|
setStarDate(starDateCalendar.getTime());
|
||||||
setEndDate(DateWrapper.getTodayMXTime());
|
setEndDate(DateWrapper.getTodayMXTime());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void approvedLoan() {
|
public void approvedLoan() {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRowCancel(RowEditEvent event) {
|
public void onRowCancel(RowEditEvent event) {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRowReorder(ReorderEvent event) {
|
public void onRowReorder(ReorderEvent event) {
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1));
|
showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addRow() {
|
public void addRow() {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteRow() {
|
public void deleteRow() {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param outcome
|
* @param outcome
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String detailLoan(String outcome) {
|
public String detailLoan(String outcome) {
|
||||||
return outcome;
|
return outcome;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LoanController getLoanCtrl() {
|
public LoanController getLoanCtrl() {
|
||||||
return loanCtrl;
|
return loanCtrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLoanCtrl(LoanController loanCtrl) {
|
public void setLoanCtrl(LoanController loanCtrl) {
|
||||||
this.loanCtrl = loanCtrl;
|
this.loanCtrl = loanCtrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<HistoryLoanView> getLoan() {
|
public List<HistoryLoanView> getLoan() {
|
||||||
return loan;
|
return loan;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLoan(List<HistoryLoanView> loan) {
|
public void setLoan(List<HistoryLoanView> loan) {
|
||||||
this.loan = loan;
|
this.loan = loan;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryLoanView getSelectedLoan() {
|
public HistoryLoanView getSelectedLoan() {
|
||||||
return selectedLoan;
|
return selectedLoan;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSelectedLoan(HistoryLoanView selectedLoan) {
|
public void setSelectedLoan(HistoryLoanView selectedLoan) {
|
||||||
this.selectedLoan = selectedLoan;
|
this.selectedLoan = selectedLoan;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getComments() {
|
public String getComments() {
|
||||||
return comments;
|
return comments;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setComments(String comments) {
|
public void setComments(String comments) {
|
||||||
this.comments = comments;
|
this.comments = comments;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GenericController getGenericCtrl() {
|
public GenericController getGenericCtrl() {
|
||||||
return genericCtrl;
|
return genericCtrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGenericCtrl(GenericController genericCtrl) {
|
public void setGenericCtrl(GenericController genericCtrl) {
|
||||||
this.genericCtrl = genericCtrl;
|
this.genericCtrl = genericCtrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<User> getUsers() {
|
public List<User> getUsers() {
|
||||||
return users;
|
return users;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUsers(List<User> users) {
|
public void setUsers(List<User> users) {
|
||||||
this.users = users;
|
this.users = users;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUserId() {
|
public String getUserId() {
|
||||||
return userId;
|
return userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUserId(String userId) {
|
public void setUserId(String userId) {
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getPayment() {
|
public BigDecimal getPayment() {
|
||||||
return payment;
|
return payment;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPayment(BigDecimal payment) {
|
public void setPayment(BigDecimal payment) {
|
||||||
this.payment = payment;
|
this.payment = payment;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getFee() {
|
public BigDecimal getFee() {
|
||||||
return fee;
|
return fee;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFee(BigDecimal fee) {
|
public void setFee(BigDecimal fee) {
|
||||||
this.fee = fee;
|
this.fee = fee;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LoanTypeController getLoanTypeCtrl() {
|
public LoanTypeController getLoanTypeCtrl() {
|
||||||
return loanTypeCtrl;
|
return loanTypeCtrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLoanTypeCtrl(LoanTypeController loanTypeCtrl) {
|
public void setLoanTypeCtrl(LoanTypeController loanTypeCtrl) {
|
||||||
this.loanTypeCtrl = loanTypeCtrl;
|
this.loanTypeCtrl = loanTypeCtrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<LoanType> getLoanType() {
|
public List<LoanType> getLoanType() {
|
||||||
return loanType;
|
return loanType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLoanType(List<LoanType> loanType) {
|
public void setLoanType(List<LoanType> loanType) {
|
||||||
this.loanType = loanType;
|
this.loanType = loanType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLoanTypeId() {
|
public String getLoanTypeId() {
|
||||||
return loanTypeId;
|
return loanTypeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLoanTypeId(String loanTypeId) {
|
public void setLoanTypeId(String loanTypeId) {
|
||||||
this.loanTypeId = loanTypeId;
|
this.loanTypeId = loanTypeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRouteId() {
|
public String getRouteId() {
|
||||||
return routeId;
|
return routeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRouteId(String routeId) {
|
public void setRouteId(String routeId) {
|
||||||
this.routeId = routeId;
|
this.routeId = routeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RouteController getRouteCtrl() {
|
public RouteController getRouteCtrl() {
|
||||||
return routeCtrl;
|
return routeCtrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRouteCtrl(RouteController routeCtrl) {
|
public void setRouteCtrl(RouteController routeCtrl) {
|
||||||
this.routeCtrl = routeCtrl;
|
this.routeCtrl = routeCtrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<RouteCtlg> getRoute() {
|
public List<RouteCtlg> getRoute() {
|
||||||
return route;
|
return route;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRoute(List<RouteCtlg> route) {
|
public void setRoute(List<RouteCtlg> route) {
|
||||||
this.route = route;
|
this.route = route;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getStarDate() {
|
public Date getStarDate() {
|
||||||
return starDate;
|
return starDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStarDate(Date starDate) {
|
public void setStarDate(Date starDate) {
|
||||||
this.starDate = starDate;
|
this.starDate = starDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getEndDate() {
|
public Date getEndDate() {
|
||||||
return endDate;
|
return endDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEndDate(Date endDate) {
|
public void setEndDate(Date endDate) {
|
||||||
this.endDate = endDate;
|
this.endDate = endDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
private LoanController loanCtrl;
|
private LoanController loanCtrl;
|
||||||
private LoanTypeController loanTypeCtrl;
|
private LoanTypeController loanTypeCtrl;
|
||||||
private GenericController genericCtrl;
|
private GenericController genericCtrl;
|
||||||
private RouteController routeCtrl;
|
private RouteController routeCtrl;
|
||||||
|
|
||||||
private List<HistoryLoanView> loan;
|
private List<HistoryLoanView> loan;
|
||||||
private List<User> users;
|
private List<User> users;
|
||||||
private List<LoanType> loanType;
|
private List<LoanType> loanType;
|
||||||
private List<RouteCtlg> route;
|
private List<RouteCtlg> route;
|
||||||
private HistoryLoanView selectedLoan;
|
private HistoryLoanView selectedLoan;
|
||||||
private String comments;
|
private String comments;
|
||||||
private String userId;
|
private String userId;
|
||||||
private BigDecimal payment;
|
private BigDecimal payment;
|
||||||
private BigDecimal fee;
|
private BigDecimal fee;
|
||||||
private String loanTypeId;
|
private String loanTypeId;
|
||||||
private String routeId;
|
private String routeId;
|
||||||
|
|
||||||
private Date starDate;
|
private Date starDate;
|
||||||
private Date endDate;
|
private Date endDate;
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void init() {
|
public void init() {
|
||||||
loadBundlePropertyFile();
|
loadBundlePropertyFile();
|
||||||
|
|
||||||
loanCtrl = new LoanController();
|
loanCtrl = new LoanController();
|
||||||
genericCtrl = new GenericController();
|
genericCtrl = new GenericController();
|
||||||
loanTypeCtrl = new LoanTypeController();
|
loanTypeCtrl = new LoanTypeController();
|
||||||
routeCtrl = new RouteController();
|
routeCtrl = new RouteController();
|
||||||
initStartAndEndDates();
|
initStartAndEndDates();
|
||||||
users = genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId());
|
users = genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId());
|
||||||
loanType = loanTypeCtrl.fillLoanTypeDatatable(getLoggedUser().getOffice().getId());
|
loanType = loanTypeCtrl.fillLoanTypeDatatable(getLoggedUser().getOffice().getId());
|
||||||
route = routeCtrl.fillRoutesDatatable(getLoggedUser().getOffice().getId());
|
route = routeCtrl.fillRoutesDatatable(getLoggedUser().getOffice().getId());
|
||||||
|
|
||||||
setLoan(fillDatatableLoan());
|
setLoan(fillDatatableLoan());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -41,42 +41,42 @@ import org.primefaces.event.RowEditEvent;
|
|||||||
@ViewScoped
|
@ViewScoped
|
||||||
public class LoanHistoryJuridicalBean extends GenericBean implements Serializable, Datatable {
|
public class LoanHistoryJuridicalBean extends GenericBean implements Serializable, Datatable {
|
||||||
|
|
||||||
public void searchHistoricalAction() {
|
public void searchHistoricalAction() {
|
||||||
try {
|
try {
|
||||||
if (getStarDate().after(getEndDate())) {
|
if (getStarDate().after(getEndDate())) {
|
||||||
showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error"));
|
showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error"));
|
||||||
} else {
|
} else {
|
||||||
setLoan(getLoanCtrl().fillAllLoansJuridicalViewDatatable(getStarDate(), getEndDate()));
|
setLoan(getLoanCtrl().fillAllLoansJuridicalViewDatatable(getStarDate(), getEndDate()));
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<HistoryLoanView> fillDatatableLoan() {
|
public List<HistoryLoanView> fillDatatableLoan() {
|
||||||
return getLoanCtrl().fillAllLoansJuridicalViewDatatable(getStarDate(), getEndDate());
|
return getLoanCtrl().fillAllLoansJuridicalViewDatatable(getStarDate(), getEndDate());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changeBonusNewCustomer() {
|
public void changeBonusNewCustomer() {
|
||||||
loanCtrl.updateBonusNewCustomer(ActiveStatus.ENEBLED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
loanCtrl.updateBonusNewCustomer(ActiveStatus.ENEBLED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
||||||
loan.clear();
|
loan.clear();
|
||||||
loan = fillDatatableLoan();
|
loan = fillDatatableLoan();
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
|
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de bono", "El préstamo empezó a contar como bono de cliente nuevo.");
|
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de bono", "La compra de producto empezó a contar como bono de cliente nuevo.");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeBonusNewCustomer() {
|
public void removeBonusNewCustomer() {
|
||||||
loanCtrl.updateBonusNewCustomer(ActiveStatus.DISABLED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
loanCtrl.updateBonusNewCustomer(ActiveStatus.DISABLED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
||||||
loan.clear();
|
loan.clear();
|
||||||
loan = fillDatatableLoan();
|
loan = fillDatatableLoan();
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
|
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de bono", "El préstamo ya no contará como bono de cliente nuevo.");
|
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de bono", "La compra de producto ya no contará como bono de cliente nuevo.");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteFeeLoan() {
|
public void deleteFeeLoan() {
|
||||||
|
|
||||||
/* if (selectedLoan.getEstatusPrestamo()== LoanStatus.APPROVED.getValue() || selectedLoan.getEstatusPrestamo() == LoanStatus.PENDING_RENOVATION.getValue()) {
|
/* if (selectedLoan.getEstatusPrestamo()== LoanStatus.APPROVED.getValue() || selectedLoan.getEstatusPrestamo() == LoanStatus.PENDING_RENOVATION.getValue()) {
|
||||||
|
|
||||||
List<LoanDetails> details = loanCtrl.getLoanDetailsFeeCurdatebyIdLoan(selectedLoan.getId());
|
List<LoanDetails> details = loanCtrl.getLoanDetailsFeeCurdatebyIdLoan(selectedLoan.getId());
|
||||||
if (details != null && !details.isEmpty()) {
|
if (details != null && !details.isEmpty()) {
|
||||||
@ -101,71 +101,71 @@ public class LoanHistoryJuridicalBean extends GenericBean implements Serializabl
|
|||||||
showMessage(FacesMessage.SEVERITY_WARN, "No se puede eliminar la multa", "Solo puedes eliminar la multa de préstamos en estatus Aprobados o Pendiente por renovación");
|
showMessage(FacesMessage.SEVERITY_WARN, "No se puede eliminar la multa", "Solo puedes eliminar la multa de préstamos en estatus Aprobados o Pendiente por renovación");
|
||||||
return;
|
return;
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changeRoute() {
|
public void changeRoute() {
|
||||||
if (!routeId.isEmpty()) {
|
if (!routeId.isEmpty()) {
|
||||||
if (loanCtrl.updateRouteById(new RouteCtlg(routeId), selectedLoan.getId(), getLoggedUser().getUser().getId())) {
|
if (loanCtrl.updateRouteById(new RouteCtlg(routeId), selectedLoan.getId(), getLoggedUser().getUser().getId())) {
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Ruta modificada", "Se modificó correctamente.");
|
showMessage(FacesMessage.SEVERITY_INFO, "Ruta modificada", "Se modificó correctamente.");
|
||||||
} else {
|
} else {
|
||||||
showMessage(FacesMessage.SEVERITY_WARN, "Ruta modificada", "Ocurrió un error durante el proceso.");
|
showMessage(FacesMessage.SEVERITY_WARN, "Ruta modificada", "Ocurrió un error durante el proceso.");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changeLoanType() {
|
public void changeLoanType() {
|
||||||
if (selectedLoan.getEstatusPrestamo() != LoanStatus.TO_DELIVERY.getValue()) {
|
if (selectedLoan.getEstatusPrestamo() != LoanStatus.TO_DELIVERY.getValue()) {
|
||||||
loanTypeId = "";
|
loanTypeId = "";
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
showMessage(FacesMessage.SEVERITY_WARN, "No se puede cambiar el tipo de préstamo", "Solo puedes cambiar el monto a prestar de préstamos en estatus Por liberar");
|
showMessage(FacesMessage.SEVERITY_WARN, "No se puede cambiar el tipo de compra de producto", "Solo puedes cambiar el monto a pagar de compras de productos en estatus Por liberar");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId());
|
Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId());
|
||||||
loanUpdate.setLoanType(new LoanType(loanTypeId));
|
loanUpdate.setLoanType(new LoanType(loanTypeId));
|
||||||
loanUpdate.setAmountToPay(loanTypeCtrl.getLoanTypeById(loanTypeId).getPaymentTotal());
|
loanUpdate.setAmountToPay(loanTypeCtrl.getLoanTypeById(loanTypeId).getPaymentTotal());
|
||||||
if (loanCtrl.updateLoan(loanUpdate)) {
|
if (loanCtrl.updateLoan(loanUpdate)) {
|
||||||
loan.clear();
|
loan.clear();
|
||||||
loan = fillDatatableLoan();
|
loan = fillDatatableLoan();
|
||||||
loanTypeId = "";
|
loanTypeId = "";
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de tipo de préstamo", "El préstamo se cambió correctamente");
|
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de tipo de compra de producto", "La compra de producto se cambió correctamente");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteLoan() {
|
public void deleteLoan() {
|
||||||
/* loanCtrl.updateLoanByStatusWeb(LoanStatus.DELETED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
/* loanCtrl.updateLoanByStatusWeb(LoanStatus.DELETED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
||||||
loanCtrl.updateLoanByUserByStatus(LoanStatus.DELETED, selectedLoan);
|
loanCtrl.updateLoanByUserByStatus(LoanStatus.DELETED, selectedLoan);
|
||||||
loan.remove(selectedLoan);
|
loan.remove(selectedLoan);
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
|
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Eliminado' de forma correcta.");*/
|
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Eliminado' de forma correcta.");*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changeApprovedStatus() {
|
public void changeApprovedStatus() {
|
||||||
/*loanCtrl.updateLoanByStatusWeb(LoanStatus.APPROVED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
/*loanCtrl.updateLoanByStatusWeb(LoanStatus.APPROVED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
||||||
loanCtrl.updateLoanByUserByStatus(LoanStatus.APPROVED, selectedLoan);
|
loanCtrl.updateLoanByUserByStatus(LoanStatus.APPROVED, selectedLoan);
|
||||||
loan.clear();
|
loan.clear();
|
||||||
loan = fillDatatableLoan();
|
loan = fillDatatableLoan();
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
|
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Aprobado' de forma correcta.");*/
|
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Aprobado' de forma correcta.");*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changeFinishStatus() {
|
public void changeFinishStatus() {
|
||||||
/*loanCtrl.updateLoanByStatusWeb(LoanStatus.FINISH, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
/*loanCtrl.updateLoanByStatusWeb(LoanStatus.FINISH, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
||||||
loanCtrl.updateLoanByUserByStatus(LoanStatus.FINISH, selectedLoan);
|
loanCtrl.updateLoanByUserByStatus(LoanStatus.FINISH, selectedLoan);
|
||||||
loan.clear();
|
loan.clear();
|
||||||
loan = fillDatatableLoan();
|
loan = fillDatatableLoan();
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
|
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Aprobado' de forma correcta.");*/
|
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Aprobado' de forma correcta.");*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deletePaymentLoan() {
|
public void deletePaymentLoan() {
|
||||||
|
|
||||||
/*if (selectedLoan.getLoanStatus() == LoanStatus.APPROVED || selectedLoan.getLoanStatus() == LoanStatus.PENDING_RENOVATION) {
|
/*if (selectedLoan.getLoanStatus() == LoanStatus.APPROVED || selectedLoan.getLoanStatus() == LoanStatus.PENDING_RENOVATION) {
|
||||||
|
|
||||||
List<LoanDetails> details = loanCtrl.getLoanDetailsCurdatebyIdLoan(selectedLoan.getId());
|
List<LoanDetails> details = loanCtrl.getLoanDetailsCurdatebyIdLoan(selectedLoan.getId());
|
||||||
if (details != null && !details.isEmpty()) {
|
if (details != null && !details.isEmpty()) {
|
||||||
@ -190,15 +190,15 @@ public class LoanHistoryJuridicalBean extends GenericBean implements Serializabl
|
|||||||
showMessage(FacesMessage.SEVERITY_WARN, "No se puede eliminar abono", "Solo puedes eliminar el abono de préstamos en estatus Aprobados o Pendiente por renovación");
|
showMessage(FacesMessage.SEVERITY_WARN, "No se puede eliminar abono", "Solo puedes eliminar el abono de préstamos en estatus Aprobados o Pendiente por renovación");
|
||||||
return;
|
return;
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void editRow(RowEditEvent event) {
|
public void editRow(RowEditEvent event) {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addPayment() {
|
public void addPayment() {
|
||||||
/*if (selectedLoan.getLoanStatus() == LoanStatus.APPROVED || selectedLoan.getLoanStatus() == LoanStatus.PENDING_RENOVATION) {
|
/*if (selectedLoan.getLoanStatus() == LoanStatus.APPROVED || selectedLoan.getLoanStatus() == LoanStatus.PENDING_RENOVATION) {
|
||||||
LoanDetails detail = new LoanDetails();
|
LoanDetails detail = new LoanDetails();
|
||||||
detail.setComments(comments);
|
detail.setComments(comments);
|
||||||
detail.setCreatedBy(getLoggedUser().getUser().getId());
|
detail.setCreatedBy(getLoggedUser().getUser().getId());
|
||||||
@ -239,10 +239,10 @@ public class LoanHistoryJuridicalBean extends GenericBean implements Serializabl
|
|||||||
return;
|
return;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addFee() {
|
public void addFee() {
|
||||||
/*if (selectedLoan.getLoanStatus() != LoanStatus.APPROVED) {
|
/*if (selectedLoan.getLoanStatus() != LoanStatus.APPROVED) {
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
userId = "";
|
userId = "";
|
||||||
comments = "";
|
comments = "";
|
||||||
@ -282,10 +282,10 @@ public class LoanHistoryJuridicalBean extends GenericBean implements Serializabl
|
|||||||
fee = BigDecimal.ZERO;
|
fee = BigDecimal.ZERO;
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Agregar multa", "Se agregó la multa de forma correcta.");
|
showMessage(FacesMessage.SEVERITY_INFO, "Agregar multa", "Se agregó la multa de forma correcta.");
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public void changeOwner() {
|
public void changeOwner() {
|
||||||
/*if (selectedLoan.getLoanStatus() != LoanStatus.APPROVED) {
|
/*if (selectedLoan.getLoanStatus() != LoanStatus.APPROVED) {
|
||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
userId = "";
|
userId = "";
|
||||||
showMessage(FacesMessage.SEVERITY_WARN, "No se puede modificar propietario", "Solo puedes cambiar de propietario a préstamos en estatus Aprobados");
|
showMessage(FacesMessage.SEVERITY_WARN, "No se puede modificar propietario", "Solo puedes cambiar de propietario a préstamos en estatus Aprobados");
|
||||||
@ -319,228 +319,228 @@ public class LoanHistoryJuridicalBean extends GenericBean implements Serializabl
|
|||||||
selectedLoan = null;
|
selectedLoan = null;
|
||||||
showMessage(FacesMessage.SEVERITY_ERROR, "Cambio de propietario", "Ocurrió un error al intentar hacer el cambio de propietario.");
|
showMessage(FacesMessage.SEVERITY_ERROR, "Cambio de propietario", "Ocurrió un error al intentar hacer el cambio de propietario.");
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private void initStartAndEndDates() {
|
private void initStartAndEndDates() {
|
||||||
try {
|
try {
|
||||||
Calendar starDateCalendar = Calendar.getInstance();
|
Calendar starDateCalendar = Calendar.getInstance();
|
||||||
|
|
||||||
starDateCalendar.setTime(DateWrapper.getTodayMXTime());
|
starDateCalendar.setTime(DateWrapper.getTodayMXTime());
|
||||||
starDateCalendar.add(Calendar.MONTH, -1);
|
starDateCalendar.add(Calendar.MONTH, -1);
|
||||||
|
|
||||||
setStarDate(starDateCalendar.getTime());
|
setStarDate(starDateCalendar.getTime());
|
||||||
setEndDate(DateWrapper.getTodayMXTime());
|
setEndDate(DateWrapper.getTodayMXTime());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void approvedLoan() {
|
public void approvedLoan() {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRowCancel(RowEditEvent event) {
|
public void onRowCancel(RowEditEvent event) {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRowReorder(ReorderEvent event) {
|
public void onRowReorder(ReorderEvent event) {
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1));
|
showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addRow() {
|
public void addRow() {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteRow() {
|
public void deleteRow() {
|
||||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param outcome
|
* @param outcome
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String detailLoan(String outcome) {
|
public String detailLoan(String outcome) {
|
||||||
return outcome;
|
return outcome;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LoanController getLoanCtrl() {
|
public LoanController getLoanCtrl() {
|
||||||
return loanCtrl;
|
return loanCtrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLoanCtrl(LoanController loanCtrl) {
|
public void setLoanCtrl(LoanController loanCtrl) {
|
||||||
this.loanCtrl = loanCtrl;
|
this.loanCtrl = loanCtrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<HistoryLoanView> getLoan() {
|
public List<HistoryLoanView> getLoan() {
|
||||||
return loan;
|
return loan;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLoan(List<HistoryLoanView> loan) {
|
public void setLoan(List<HistoryLoanView> loan) {
|
||||||
this.loan = loan;
|
this.loan = loan;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HistoryLoanView getSelectedLoan() {
|
public HistoryLoanView getSelectedLoan() {
|
||||||
return selectedLoan;
|
return selectedLoan;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSelectedLoan(HistoryLoanView selectedLoan) {
|
public void setSelectedLoan(HistoryLoanView selectedLoan) {
|
||||||
this.selectedLoan = selectedLoan;
|
this.selectedLoan = selectedLoan;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getComments() {
|
public String getComments() {
|
||||||
return comments;
|
return comments;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setComments(String comments) {
|
public void setComments(String comments) {
|
||||||
this.comments = comments;
|
this.comments = comments;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GenericController getGenericCtrl() {
|
public GenericController getGenericCtrl() {
|
||||||
return genericCtrl;
|
return genericCtrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGenericCtrl(GenericController genericCtrl) {
|
public void setGenericCtrl(GenericController genericCtrl) {
|
||||||
this.genericCtrl = genericCtrl;
|
this.genericCtrl = genericCtrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<User> getUsers() {
|
public List<User> getUsers() {
|
||||||
return users;
|
return users;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUsers(List<User> users) {
|
public void setUsers(List<User> users) {
|
||||||
this.users = users;
|
this.users = users;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUserId() {
|
public String getUserId() {
|
||||||
return userId;
|
return userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUserId(String userId) {
|
public void setUserId(String userId) {
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getPayment() {
|
public BigDecimal getPayment() {
|
||||||
return payment;
|
return payment;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPayment(BigDecimal payment) {
|
public void setPayment(BigDecimal payment) {
|
||||||
this.payment = payment;
|
this.payment = payment;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getFee() {
|
public BigDecimal getFee() {
|
||||||
return fee;
|
return fee;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFee(BigDecimal fee) {
|
public void setFee(BigDecimal fee) {
|
||||||
this.fee = fee;
|
this.fee = fee;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LoanTypeController getLoanTypeCtrl() {
|
public LoanTypeController getLoanTypeCtrl() {
|
||||||
return loanTypeCtrl;
|
return loanTypeCtrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLoanTypeCtrl(LoanTypeController loanTypeCtrl) {
|
public void setLoanTypeCtrl(LoanTypeController loanTypeCtrl) {
|
||||||
this.loanTypeCtrl = loanTypeCtrl;
|
this.loanTypeCtrl = loanTypeCtrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<LoanType> getLoanType() {
|
public List<LoanType> getLoanType() {
|
||||||
return loanType;
|
return loanType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLoanType(List<LoanType> loanType) {
|
public void setLoanType(List<LoanType> loanType) {
|
||||||
this.loanType = loanType;
|
this.loanType = loanType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLoanTypeId() {
|
public String getLoanTypeId() {
|
||||||
return loanTypeId;
|
return loanTypeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLoanTypeId(String loanTypeId) {
|
public void setLoanTypeId(String loanTypeId) {
|
||||||
this.loanTypeId = loanTypeId;
|
this.loanTypeId = loanTypeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRouteId() {
|
public String getRouteId() {
|
||||||
return routeId;
|
return routeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRouteId(String routeId) {
|
public void setRouteId(String routeId) {
|
||||||
this.routeId = routeId;
|
this.routeId = routeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RouteController getRouteCtrl() {
|
public RouteController getRouteCtrl() {
|
||||||
return routeCtrl;
|
return routeCtrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRouteCtrl(RouteController routeCtrl) {
|
public void setRouteCtrl(RouteController routeCtrl) {
|
||||||
this.routeCtrl = routeCtrl;
|
this.routeCtrl = routeCtrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<RouteCtlg> getRoute() {
|
public List<RouteCtlg> getRoute() {
|
||||||
return route;
|
return route;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRoute(List<RouteCtlg> route) {
|
public void setRoute(List<RouteCtlg> route) {
|
||||||
this.route = route;
|
this.route = route;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getStarDate() {
|
public Date getStarDate() {
|
||||||
return starDate;
|
return starDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStarDate(Date starDate) {
|
public void setStarDate(Date starDate) {
|
||||||
this.starDate = starDate;
|
this.starDate = starDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getEndDate() {
|
public Date getEndDate() {
|
||||||
return endDate;
|
return endDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEndDate(Date endDate) {
|
public void setEndDate(Date endDate) {
|
||||||
this.endDate = endDate;
|
this.endDate = endDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
private LoanController loanCtrl;
|
private LoanController loanCtrl;
|
||||||
private LoanTypeController loanTypeCtrl;
|
private LoanTypeController loanTypeCtrl;
|
||||||
private GenericController genericCtrl;
|
private GenericController genericCtrl;
|
||||||
private RouteController routeCtrl;
|
private RouteController routeCtrl;
|
||||||
|
|
||||||
private List<HistoryLoanView> loan;
|
private List<HistoryLoanView> loan;
|
||||||
private List<User> users;
|
private List<User> users;
|
||||||
private List<LoanType> loanType;
|
private List<LoanType> loanType;
|
||||||
private List<RouteCtlg> route;
|
private List<RouteCtlg> route;
|
||||||
private HistoryLoanView selectedLoan;
|
private HistoryLoanView selectedLoan;
|
||||||
private String comments;
|
private String comments;
|
||||||
private String userId;
|
private String userId;
|
||||||
private BigDecimal payment;
|
private BigDecimal payment;
|
||||||
private BigDecimal fee;
|
private BigDecimal fee;
|
||||||
private String loanTypeId;
|
private String loanTypeId;
|
||||||
private String routeId;
|
private String routeId;
|
||||||
|
|
||||||
private Date starDate;
|
private Date starDate;
|
||||||
private Date endDate;
|
private Date endDate;
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void init() {
|
public void init() {
|
||||||
loadBundlePropertyFile();
|
loadBundlePropertyFile();
|
||||||
|
|
||||||
loanCtrl = new LoanController();
|
loanCtrl = new LoanController();
|
||||||
genericCtrl = new GenericController();
|
genericCtrl = new GenericController();
|
||||||
loanTypeCtrl = new LoanTypeController();
|
loanTypeCtrl = new LoanTypeController();
|
||||||
routeCtrl = new RouteController();
|
routeCtrl = new RouteController();
|
||||||
initStartAndEndDates();
|
initStartAndEndDates();
|
||||||
users = genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId());
|
users = genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId());
|
||||||
loanType = loanTypeCtrl.fillLoanTypeDatatable(getLoggedUser().getOffice().getId());
|
loanType = loanTypeCtrl.fillLoanTypeDatatable(getLoggedUser().getOffice().getId());
|
||||||
route = routeCtrl.fillRoutesDatatable(getLoggedUser().getOffice().getId());
|
route = routeCtrl.fillRoutesDatatable(getLoggedUser().getOffice().getId());
|
||||||
|
|
||||||
setLoan(fillDatatableLoan());
|
setLoan(fillDatatableLoan());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,7 @@ public class LoanPendingBean extends GenericBean implements Serializable, Datata
|
|||||||
Calendar fechaAct = Calendar.getInstance();
|
Calendar fechaAct = Calendar.getInstance();
|
||||||
if (fechaAct.before(calendar)) {
|
if (fechaAct.before(calendar)) {
|
||||||
Bitacora bitacora = new Bitacora();
|
Bitacora bitacora = new Bitacora();
|
||||||
bitacora.setAction("Préstamo postfechado");
|
bitacora.setAction("Compra de producto postfechado");
|
||||||
bitacora.setCommentsUser("");
|
bitacora.setCommentsUser("");
|
||||||
bitacora.setCreatedBy(getLoggedUser().getUser().getId());
|
bitacora.setCreatedBy(getLoggedUser().getUser().getId());
|
||||||
bitacora.setCreatedOn(new Date());
|
bitacora.setCreatedOn(new Date());
|
||||||
|
@ -43,7 +43,7 @@ public class LoanPendingDetailBean extends GenericBean implements Serializable,
|
|||||||
loan.setLoanType(new LoanType(typeLoanId));
|
loan.setLoanType(new LoanType(typeLoanId));
|
||||||
loan.setAmountToPay(loanTypeCtrl.getLoanTypeById(typeLoanId).getPaymentTotal());
|
loan.setAmountToPay(loanTypeCtrl.getLoanTypeById(typeLoanId).getPaymentTotal());
|
||||||
if (loanCtrl.updateLoan(loan)) {
|
if (loanCtrl.updateLoan(loan)) {
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de tipo de préstamo", "El préstamo se cambió correctamente");
|
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de tipo de compra de producto", "La compra de producto se cambió correctamente");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -90,13 +90,13 @@ public class LoanPendingDetailBean extends GenericBean implements Serializable,
|
|||||||
loanCtrl.updateLoanByUserByStatus(LoanStatus.APPROVED, renovation.getLoanOld());
|
loanCtrl.updateLoanByUserByStatus(LoanStatus.APPROVED, renovation.getLoanOld());
|
||||||
}
|
}
|
||||||
|
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Rechazado' de forma correcta.");
|
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "La compra de producto se cambió a estatus 'Rechazado' de forma correcta.");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void approvedLoan() {
|
public void approvedLoan() {
|
||||||
loanCtrl.updateLoanByStatus(LoanStatus.TO_DELIVERY, loan.getId(), getLoggedUser().getUser().getId());
|
loanCtrl.updateLoanByStatus(LoanStatus.TO_DELIVERY, loan.getId(), getLoggedUser().getUser().getId());
|
||||||
loanCtrl.updateLoanByUserByStatus(LoanStatus.TO_DELIVERY, loan);
|
loanCtrl.updateLoanByUserByStatus(LoanStatus.TO_DELIVERY, loan);
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'A conciliar' de forma correcta.");
|
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "La compra de producto se cambió a estatus 'A conciliar' de forma correcta.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -199,11 +199,11 @@ public class PersonCustomerBean extends GenericBean implements Serializable {
|
|||||||
Calendar fechaAct = Calendar.getInstance();
|
Calendar fechaAct = Calendar.getInstance();
|
||||||
if (fechaAct.before(calendar)) {
|
if (fechaAct.before(calendar)) {
|
||||||
Bitacora bitacora = new Bitacora();
|
Bitacora bitacora = new Bitacora();
|
||||||
bitacora.setAction("Préstamo postfechado");
|
bitacora.setAction("Compra de producto postfechado");
|
||||||
bitacora.setCommentsUser("");
|
bitacora.setCommentsUser("");
|
||||||
bitacora.setCreatedBy(getLoggedUser().getUser().getId());
|
bitacora.setCreatedBy(getLoggedUser().getUser().getId());
|
||||||
bitacora.setCreatedOn(new Date());
|
bitacora.setCreatedOn(new Date());
|
||||||
bitacora.setDescription("El usuario " + userName + " postfechó el préstamo del cliente " + temp.getCustomer().getFullName()
|
bitacora.setDescription("El usuario " + userName + " postfechó la compra de producto del cliente " + temp.getCustomer().getFullName()
|
||||||
+ ", con cantidad de $" + temp.getLoanType().getPayment() + " al día " + temp.getCreatedOn());
|
+ ", con cantidad de $" + temp.getLoanType().getPayment() + " al día " + temp.getCreatedOn());
|
||||||
bitacora.setNameUser(getLoggedUser().getUser().getUserName());
|
bitacora.setNameUser(getLoggedUser().getUser().getUserName());
|
||||||
bitacora.setOffice(new Office(getLoggedUser().getOffice().getId()));
|
bitacora.setOffice(new Office(getLoggedUser().getOffice().getId()));
|
||||||
@ -280,11 +280,11 @@ public class PersonCustomerBean extends GenericBean implements Serializable {
|
|||||||
setAutoCompleteCustomer(null);
|
setAutoCompleteCustomer(null);
|
||||||
setAutoCompleteEndorsement(null);
|
setAutoCompleteEndorsement(null);
|
||||||
//loan = fillDatatableLoan();
|
//loan = fillDatatableLoan();
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Cliente", "Se agrego el prestamo al cliente correctamente.");
|
showMessage(FacesMessage.SEVERITY_INFO, "Cliente", "Se agrego la compra de producto al cliente correctamente.");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("", e);
|
logger.error("", e);
|
||||||
|
|
||||||
showMessage(FacesMessage.SEVERITY_INFO, "Cliente", "No se agrego el nuevo prestamos al cliente.");
|
showMessage(FacesMessage.SEVERITY_INFO, "Cliente", "No se agrego la nueva compra de producto al cliente.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -129,7 +129,7 @@ catalog.routes.datatable.empty=No hay rutas para mostrar
|
|||||||
catalog.routes.datatable.column.name=Nombre
|
catalog.routes.datatable.column.name=Nombre
|
||||||
catalog.routes.dialog.title=Rutas
|
catalog.routes.dialog.title=Rutas
|
||||||
catalog.routes.dialog.require.msg.color.empty=El nombre de la ruta es obligatorio
|
catalog.routes.dialog.require.msg.color.empty=El nombre de la ruta es obligatorio
|
||||||
catalog.loanTypes.datatable.empty=No hay tipos de pr\u00e9stamo para mostrar
|
catalog.loanTypes.datatable.empty=No hay tipos de compra de producto para mostrar
|
||||||
catalog.loanTypes.datatable.column.name=Nombre
|
catalog.loanTypes.datatable.column.name=Nombre
|
||||||
catalog.loanTypes.datatable.column.totalDays=Total d\u00edas
|
catalog.loanTypes.datatable.column.totalDays=Total d\u00edas
|
||||||
catalog.loanTypes.datatable.column.fee=Multa
|
catalog.loanTypes.datatable.column.fee=Multa
|
||||||
@ -141,7 +141,7 @@ catalog.loanTypes.dialog.name.require.msg.empty=El nombre es obligatorio
|
|||||||
catalog.loanTypes.dialog.name.title=Nombre
|
catalog.loanTypes.dialog.name.title=Nombre
|
||||||
catalog.loanTypes.dialog.totalDays.require.msg.empty=El total de d\u00edas es obligatorio
|
catalog.loanTypes.dialog.totalDays.require.msg.empty=El total de d\u00edas es obligatorio
|
||||||
catalog.loanTypes.dialog.totalDays.title=Total de d\u00edas
|
catalog.loanTypes.dialog.totalDays.title=Total de d\u00edas
|
||||||
catalog.loanTypes.dialog.payment.require.msg.empty=El valor del pr\u00e9stamo es obligatorio
|
catalog.loanTypes.dialog.payment.require.msg.empty=El valor de la compra de producto es obligatorio
|
||||||
catalog.loanTypes.dialog.payment.title=Precio
|
catalog.loanTypes.dialog.payment.title=Precio
|
||||||
catalog.loanTypes.dialog.fee.require.msg.empty=El valor de la multa es obligatorio
|
catalog.loanTypes.dialog.fee.require.msg.empty=El valor de la multa es obligatorio
|
||||||
catalog.loanTypes.dialog.fee.title=Multa
|
catalog.loanTypes.dialog.fee.title=Multa
|
||||||
@ -168,7 +168,7 @@ admin.loan=Ventas
|
|||||||
admin.loan.to.approve=Por autorizar
|
admin.loan.to.approve=Por autorizar
|
||||||
admin.loan.history=Historial
|
admin.loan.history=Historial
|
||||||
admin.loan.historyJuridical=Historial jur\u00eddico
|
admin.loan.historyJuridical=Historial jur\u00eddico
|
||||||
admin.loan.detail.title=Detalle del pr\u00e9stamo
|
admin.loan.detail.title=Detalle del compra de producto
|
||||||
admin.financial=Financiero
|
admin.financial=Financiero
|
||||||
admin.financial.transfer=Transferencias
|
admin.financial.transfer=Transferencias
|
||||||
admin.financial.moneyDaily=Inicios
|
admin.financial.moneyDaily=Inicios
|
||||||
@ -181,7 +181,7 @@ admin.payroll.bonus=Bonos
|
|||||||
admin.payroll.advance=Adelantos
|
admin.payroll.advance=Adelantos
|
||||||
admin.payroll.create=Crear n\u00f3mina
|
admin.payroll.create=Crear n\u00f3mina
|
||||||
admin.payroll.history=Historial n\u00f3mina
|
admin.payroll.history=Historial n\u00f3mina
|
||||||
admin.payroll.loanemployee=Pr\u00e9stamos
|
admin.payroll.loanemployee=Compra de producto
|
||||||
admin.stats.fees=Multas
|
admin.stats.fees=Multas
|
||||||
admin.stats.closingday=Corte caja chica
|
admin.stats.closingday=Corte caja chica
|
||||||
admin.stats.openingfee=Comisi\u00f3n por apertura
|
admin.stats.openingfee=Comisi\u00f3n por apertura
|
||||||
@ -213,7 +213,7 @@ admin.customers.datatable.column.peopleType=Tipo
|
|||||||
admin.customers.datatable.column.office=Sucursal
|
admin.customers.datatable.column.office=Sucursal
|
||||||
admin.customers.detail.title=Detalle del cliente
|
admin.customers.detail.title=Detalle del cliente
|
||||||
admin.customers.company.title=Informaci\u00f3n del negocio
|
admin.customers.company.title=Informaci\u00f3n del negocio
|
||||||
admin.customers.loan.title=Historial de pr\u00e9stamos
|
admin.customers.loan.title=Historial de compra de productos
|
||||||
admin.customers.detail.field.name=Nombre
|
admin.customers.detail.field.name=Nombre
|
||||||
admin.customers.detail.field.firstName=Primer nombre
|
admin.customers.detail.field.firstName=Primer nombre
|
||||||
admin.customers.detail.field.secondName=Segundo nombre
|
admin.customers.detail.field.secondName=Segundo nombre
|
||||||
@ -227,7 +227,7 @@ admin.customers.detail.field.routeCtlg=Ruta
|
|||||||
admin.customers.detail.field.companyName=Nombre del negocio
|
admin.customers.detail.field.companyName=Nombre del negocio
|
||||||
admin.customers.detail.field.phoneBusiness=Tel\u00e9fono del negocio
|
admin.customers.detail.field.phoneBusiness=Tel\u00e9fono del negocio
|
||||||
admin.customers.detail.field.addressBusiness=Direcci\u00f3n del negocio
|
admin.customers.detail.field.addressBusiness=Direcci\u00f3n del negocio
|
||||||
admin.customers.detail.datatable.empty=No hay pr\u00e9stamos por mostrar
|
admin.customers.detail.datatable.empty=No hay compras de productos por mostrar
|
||||||
admin.customers.detail.datatable.column.endorsement=Aval
|
admin.customers.detail.datatable.column.endorsement=Aval
|
||||||
admin.customers.detail.datatable.column.loanStatus=Estatus
|
admin.customers.detail.datatable.column.loanStatus=Estatus
|
||||||
admin.customers.detail.datatable.column.amountToPay=Monto a pagar
|
admin.customers.detail.datatable.column.amountToPay=Monto a pagar
|
||||||
@ -244,7 +244,7 @@ admin.endorsements.datatable.column.routeCtlg=Ruta
|
|||||||
admin.endorsements.datatable.column.peopleType=Tipo
|
admin.endorsements.datatable.column.peopleType=Tipo
|
||||||
admin.endorsements.detail.title=Detalle del aval
|
admin.endorsements.detail.title=Detalle del aval
|
||||||
admin.endorsements.company.title=Informaci\u00f3n del negocio
|
admin.endorsements.company.title=Informaci\u00f3n del negocio
|
||||||
admin.endorsements.loan.title=Historial de pr\u00e9stamos como aval
|
admin.endorsements.loan.title=Historial de compras de productos como aval
|
||||||
admin.endorsements.detail.field.name=Nombre
|
admin.endorsements.detail.field.name=Nombre
|
||||||
admin.endorsements.detail.field.birthdate=Fecha de nacimiento
|
admin.endorsements.detail.field.birthdate=Fecha de nacimiento
|
||||||
admin.endorsements.detail.field.phoneHome=Tel\u00e9fono de casa
|
admin.endorsements.detail.field.phoneHome=Tel\u00e9fono de casa
|
||||||
@ -254,7 +254,7 @@ admin.endorsements.detail.field.routeCtlg=Ruta
|
|||||||
admin.endorsements.detail.field.companyName=Nombre del negocio
|
admin.endorsements.detail.field.companyName=Nombre del negocio
|
||||||
admin.endorsements.detail.field.phoneBusiness=Tel\u00e9fono del negocio
|
admin.endorsements.detail.field.phoneBusiness=Tel\u00e9fono del negocio
|
||||||
admin.endorsements.detail.field.addressBusiness=Direcci\u00f3n del negocio
|
admin.endorsements.detail.field.addressBusiness=Direcci\u00f3n del negocio
|
||||||
admin.endorsements.detail.datatable.empty=No hay pr\u00e9stamos por mostrar
|
admin.endorsements.detail.datatable.empty=No hay compras de productos por mostrar
|
||||||
admin.endorsements.detail.datatable.column.customer=Cliente
|
admin.endorsements.detail.datatable.column.customer=Cliente
|
||||||
admin.endorsements.detail.datatable.column.loanStatus=Estatus
|
admin.endorsements.detail.datatable.column.loanStatus=Estatus
|
||||||
admin.endorsements.detail.datatable.column.amountToPay=Monto a pagar
|
admin.endorsements.detail.datatable.column.amountToPay=Monto a pagar
|
||||||
@ -285,7 +285,7 @@ admin.people.dialog.companyName.title=Nombre del negocio
|
|||||||
admin.people.form.birthdate.require.msg.empty=La fecha de nacimiento es obligatorio
|
admin.people.form.birthdate.require.msg.empty=La fecha de nacimiento es obligatorio
|
||||||
admin.people.dialog.birthdate.title=Fecha de nacimiento
|
admin.people.dialog.birthdate.title=Fecha de nacimiento
|
||||||
admin.people.form.route.require.msg.empty=La ruta es obligatoria
|
admin.people.form.route.require.msg.empty=La ruta es obligatoria
|
||||||
admin.loans.datatable.empty=No hay pr\u00e9stamos por mostrar.
|
admin.loans.datatable.empty=No hay compras de productos por mostrar.
|
||||||
admin.loans.datatable.column.customer=Cliente
|
admin.loans.datatable.column.customer=Cliente
|
||||||
admin.loans.datatable.column.routeCtlg=Ruta
|
admin.loans.datatable.column.routeCtlg=Ruta
|
||||||
admin.loans.datatable.column.endorsement=Aval
|
admin.loans.datatable.column.endorsement=Aval
|
||||||
|
@ -13,7 +13,7 @@ validators.password=Contrase\u00f1a no v\u00e1lida.
|
|||||||
validator.select.one.menu.invalid.option=Opci\u00f3n no v\u00e1lida.
|
validator.select.one.menu.invalid.option=Opci\u00f3n no v\u00e1lida.
|
||||||
user=Usuario
|
user=Usuario
|
||||||
employee=Empleado
|
employee=Empleado
|
||||||
loanType=Tipo de pr\u00e9stamo
|
loanType=Tipo de compra de producto
|
||||||
people=Persona
|
people=Persona
|
||||||
prmssn.update.title=Actualizaci\u00f3n de Permisos
|
prmssn.update.title=Actualizaci\u00f3n de Permisos
|
||||||
prmssn.add.true=Se asignaron los permisos al usuario.
|
prmssn.add.true=Se asignaron los permisos al usuario.
|
||||||
|
@ -114,13 +114,13 @@ catalog.typeLoan.add=Crear producto
|
|||||||
catalog.typeLoan.add.description=Men\u00fa de productos.
|
catalog.typeLoan.add.description=Men\u00fa de productos.
|
||||||
catalog.typeLoan.add.path=Cat\u00e1logo / Producto (crear)
|
catalog.typeLoan.add.path=Cat\u00e1logo / Producto (crear)
|
||||||
|
|
||||||
catalog.typeLoan.updated=Editar tipo de pr\u00e9stamos
|
catalog.typeLoan.updated=Editar tipo de compra de producto
|
||||||
catalog.typeLoan.updated.description=Permite editar tipo de pr\u00e9stamos.
|
catalog.typeLoan.updated.description=Permite editar tipo de compra de producto.
|
||||||
catalog.typeLoan.updated.path=Cat\u00e1logo / Tipo de pr\u00e9stamos (editar)
|
catalog.typeLoan.updated.path=Cat\u00e1logo / Tipo de compra de producto (editar)
|
||||||
|
|
||||||
catalog.typeLoan.deleted=Eliminar tipo de pr\u00e9stamos
|
catalog.typeLoan.deleted=Eliminar tipo de compra de producto
|
||||||
catalog.typeLoan.deleted.description=Permite eliminar tipo de pr\u00e9stamos.
|
catalog.typeLoan.deleted.description=Permite eliminar tipo de compra de producto.
|
||||||
catalog.typeLoan.deleted.path=Cat\u00e1logo / Tipo de pr\u00e9stamos (eliminar)
|
catalog.typeLoan.deleted.path=Cat\u00e1logo / Tipo de compra de producto (eliminar)
|
||||||
#Rutas
|
#Rutas
|
||||||
catalog.route=Rutas
|
catalog.route=Rutas
|
||||||
catalog.route.description=Men\u00fa de rutas.
|
catalog.route.description=Men\u00fa de rutas.
|
||||||
@ -170,29 +170,29 @@ admin.endorsement.deleted=Eliminar avales
|
|||||||
admin.endorsement.deleted.description=Permite eliminar avales.
|
admin.endorsement.deleted.description=Permite eliminar avales.
|
||||||
admin.endorsement.deleted.path=Administraci\u00f3n / Avales (eliminar)
|
admin.endorsement.deleted.path=Administraci\u00f3n / Avales (eliminar)
|
||||||
#Prestamos
|
#Prestamos
|
||||||
admin.loan=Pr\u00e9stamos
|
admin.loan=Compra de producto
|
||||||
admin.loan.description=Men\u00fa de pr\u00e9stamos.
|
admin.loan.description=Men\u00fa de compra de productos.
|
||||||
admin.loan.path=Administraci\u00f3n / Pr\u00e9stamos
|
admin.loan.path=Administraci\u00f3n / Compra de producto
|
||||||
|
|
||||||
admin.loan.add=Crear pr\u00e9stamos
|
admin.loan.add=Crear compra de producto
|
||||||
admin.loan.add.description=Men\u00fa de pr\u00e9stamos.
|
admin.loan.add.description=Men\u00fa de compra de producto.
|
||||||
admin.loan.add.path=Administraci\u00f3n / Pr\u00e9stamos (crear)
|
admin.loan.add.path=Administraci\u00f3n / Compra de producto (crear)
|
||||||
|
|
||||||
admin.loan.updated=Editar pr\u00e9stamos
|
admin.loan.updated=Editar compra de producto
|
||||||
admin.loan.updated.description=Permite editar pr\u00e9stamos.
|
admin.loan.updated.description=Permite editar compras de producto.
|
||||||
admin.loan.updated.path=Administraci\u00f3n / Pr\u00e9stamos (editar)
|
admin.loan.updated.path=Administraci\u00f3n / Compra de producto (editar)
|
||||||
|
|
||||||
admin.loan.deleted=Eliminar pr\u00e9stamos
|
admin.loan.deleted=Eliminar compra de producto
|
||||||
admin.loan.deleted.description=Permite eliminar pr\u00e9stamos.
|
admin.loan.deleted.description=Permite eliminar compras de producto.
|
||||||
admin.loan.deleted.path=Administraci\u00f3n / Pr\u00e9stamos (eliminar)
|
admin.loan.deleted.path=Administraci\u00f3n / Compra de producto (eliminar)
|
||||||
|
|
||||||
admin.loan.change.owner=Cambiar asesor
|
admin.loan.change.owner=Cambiar asesor
|
||||||
admin.loan.change.owner.description=Submen\u00fa cambiar asesor.
|
admin.loan.change.owner.description=Submen\u00fa cambiar asesor.
|
||||||
admin.loan.change.owner.path=Administraci\u00f3n / Pr\u00e9stamos / Cambiar asesor
|
admin.loan.change.owner.path=Administraci\u00f3n / Compras de producto / Cambiar asesor
|
||||||
|
|
||||||
admin.loan.change.owner.update=Cambiar prestamo asesor
|
admin.loan.change.owner.update=Cambiar compra de producto asesor
|
||||||
admin.loan.change.owner.update.description=Permite cambiar el prestamo de asesor origen para el asesor destino.
|
admin.loan.change.owner.update.description=Permite cambiar la compra de producto de asesor origen para el asesor destino.
|
||||||
admin.loan.change.owner.update.path=Administraci\u00f3n / Pr\u00e9stamos / Cambiar asesor (bot\u00f3n cambiar asesor)
|
admin.loan.change.owner.update.path=Administraci\u00f3n / Compras de producto / Cambiar asesor (bot\u00f3n cambiar asesor)
|
||||||
#Transferencias
|
#Transferencias
|
||||||
admin.transfer=Transferencias
|
admin.transfer=Transferencias
|
||||||
admin.transfer.description=Men\u00fa de transferencias.
|
admin.transfer.description=Men\u00fa de transferencias.
|
||||||
|
@ -272,7 +272,7 @@
|
|||||||
rendered="#{loginBean.isUserInRole('admin.stableGeneralBox')}"/>
|
rendered="#{loginBean.isUserInRole('admin.stableGeneralBox')}"/>
|
||||||
<p:menuitem
|
<p:menuitem
|
||||||
id="admin_payroll_loan_employee"
|
id="admin_payroll_loan_employee"
|
||||||
value="Préstamos a empleados"
|
value="Compra de producto a empleados"
|
||||||
icon="description"
|
icon="description"
|
||||||
outcome="#{i18n['outcome.payroll.loanemployee']}"
|
outcome="#{i18n['outcome.payroll.loanemployee']}"
|
||||||
/>
|
/>
|
||||||
|
@ -174,7 +174,7 @@
|
|||||||
autocomplete="off" disabled="true"
|
autocomplete="off" disabled="true"
|
||||||
>
|
>
|
||||||
</p:inputText>
|
</p:inputText>
|
||||||
<label>Préstamos sin acción</label>
|
<label>Compra de producto sin acción</label>
|
||||||
</h:panelGroup>
|
</h:panelGroup>
|
||||||
<h:panelGroup styleClass="md-inputfield">
|
<h:panelGroup styleClass="md-inputfield">
|
||||||
<p:inputText id="comentarios"
|
<p:inputText id="comentarios"
|
||||||
@ -300,7 +300,7 @@
|
|||||||
disabled="true">
|
disabled="true">
|
||||||
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||||
</p:inputText>
|
</p:inputText>
|
||||||
<label>Total entrega de prestamos</label>
|
<label>Total entrega de compras de productos</label>
|
||||||
</h:panelGroup>
|
</h:panelGroup>
|
||||||
<h:panelGroup styleClass="md-inputfield">
|
<h:panelGroup styleClass="md-inputfield">
|
||||||
<p:inputText id="total_totalOtherExpense"
|
<p:inputText id="total_totalOtherExpense"
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
<f:facet name="header">
|
<f:facet name="header">
|
||||||
<p:commandButton id="toggler" type="button" value="Columnas" style="float:left;" styleClass="amber-btn flat" icon="ui-icon-calendar"/>
|
<p:commandButton id="toggler" type="button" value="Columnas" style="float:left;" styleClass="amber-btn flat" icon="ui-icon-calendar"/>
|
||||||
<p:columnToggler datasource="dtCustomer" trigger="toggler" />
|
<p:columnToggler datasource="dtCustomer" trigger="toggler" />
|
||||||
<p:commandButton type="button" value="Agregar préstamo" styleClass="amber-btn flat" style="float: right;" icon="ui-icon-plus" onclick="PF('dlg3').show();" rendered="#{loginBean.isUserInRole('admin.loan.add')}"/>
|
<p:commandButton type="button" value="Agregar compra de producto" styleClass="amber-btn flat" style="float: right;" icon="ui-icon-plus" onclick="PF('dlg3').show();" rendered="#{loginBean.isUserInRole('admin.loan.add')}"/>
|
||||||
<p:commandButton type="button" value="Agregar cliente/aval" styleClass="amber-btn flat" style="float: right;" icon="ui-icon-plus" onclick="PF('dlg4').show();" rendered="#{loginBean.isUserInRole('admin.customer.add')}"/>
|
<p:commandButton type="button" value="Agregar cliente/aval" styleClass="amber-btn flat" style="float: right;" icon="ui-icon-plus" onclick="PF('dlg4').show();" rendered="#{loginBean.isUserInRole('admin.customer.add')}"/>
|
||||||
</f:facet>
|
</f:facet>
|
||||||
|
|
||||||
@ -139,7 +139,7 @@
|
|||||||
|
|
||||||
<h:form id="loanForm">
|
<h:form id="loanForm">
|
||||||
<p:growl id="msgsDialog2" showDetail="true"/>
|
<p:growl id="msgsDialog2" showDetail="true"/>
|
||||||
<p:dialog widgetVar="dlg3" width="30%" id="loanDialog" header="Nuevo préstamo" modal="true" responsive="true" showEffect="clip" hideEffect="clip">
|
<p:dialog widgetVar="dlg3" width="30%" id="loanDialog" header="Nueva compra de producto" modal="true" responsive="true" showEffect="clip" hideEffect="clip">
|
||||||
<br></br>
|
<br></br>
|
||||||
<h:panelGroup id="dateStableBox" styleClass="md-inputfield">
|
<h:panelGroup id="dateStableBox" styleClass="md-inputfield">
|
||||||
<p:calendar id="createdOn"
|
<p:calendar id="createdOn"
|
||||||
@ -164,7 +164,7 @@
|
|||||||
value="#{personCustomerBean.loanTypeId}"
|
value="#{personCustomerBean.loanTypeId}"
|
||||||
id="loanTypeSearch" required="true"
|
id="loanTypeSearch" required="true"
|
||||||
requiredMessage="#{i18n['admin.loan.form.typeLoan.require.msg.empty']}">
|
requiredMessage="#{i18n['admin.loan.form.typeLoan.require.msg.empty']}">
|
||||||
<f:selectItem itemLabel="Selecciona un tipo de préstamo.." itemValue="" />
|
<f:selectItem itemLabel="Selecciona un tipo de compra de producto.." itemValue="" />
|
||||||
<f:selectItems value="#{personCustomerBean.loanType}" var="loanType" itemLabel="#{loanType.loanTypeName}" itemValue="#{loanType.id}" />
|
<f:selectItems value="#{personCustomerBean.loanType}" var="loanType" itemLabel="#{loanType.loanTypeName}" itemValue="#{loanType.id}" />
|
||||||
<p:ajax listener="#{personCustomerBean.calculationFunction}"
|
<p:ajax listener="#{personCustomerBean.calculationFunction}"
|
||||||
update="calculation">
|
update="calculation">
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<f:facet name="header">
|
<f:facet name="header">
|
||||||
<p:commandButton id="toggler" type="button" value="Columnas" style="float:left;" styleClass="amber-btn flat" icon="ui-icon-calendar"/>
|
<p:commandButton id="toggler" type="button" value="Columnas" style="float:left;" styleClass="amber-btn flat" icon="ui-icon-calendar"/>
|
||||||
<p:columnToggler datasource="dtCustomer" trigger="toggler" />
|
<p:columnToggler datasource="dtCustomer" trigger="toggler" />
|
||||||
<p:commandButton type="button" value="Agregar préstamo" styleClass="amber-btn flat" style="float: right;" icon="ui-icon-plus" onclick="PF('dlg3').show();" rendered="#{loginBean.isUserInRole('admin.loan.add')}"/>
|
<p:commandButton type="button" value="Agregar compra de producto" styleClass="amber-btn flat" style="float: right;" icon="ui-icon-plus" onclick="PF('dlg3').show();" rendered="#{loginBean.isUserInRole('admin.loan.add')}"/>
|
||||||
<p:commandButton type="button" value="Agregar cliente/aval" styleClass="amber-btn flat" style="float: right;" icon="ui-icon-plus" onclick="PF('dlg4').show();" rendered="#{loginBean.isUserInRole('admin.customer.add')}"/>
|
<p:commandButton type="button" value="Agregar cliente/aval" styleClass="amber-btn flat" style="float: right;" icon="ui-icon-plus" onclick="PF('dlg4').show();" rendered="#{loginBean.isUserInRole('admin.customer.add')}"/>
|
||||||
|
|
||||||
<p:outputPanel>
|
<p:outputPanel>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
<p:column headerText="#{i18n['admin.customers.datatable.column.office']}" sortBy="#{customer.office.officeName}" filterBy="#{customer.office.officeName}">
|
<p:column headerText="#{i18n['admin.customers.datatable.column.office']}" sortBy="#{customer.office.officeName}" filterBy="#{customer.office.officeName}">
|
||||||
<h:outputText value="#{customer.office.officeName}" />
|
<h:outputText value="#{customer.office.officeName}" />
|
||||||
</p:column>
|
</p:column>
|
||||||
<p:column headerText="Total préstamos" sortBy="#{customer.totalLoan}" filterBy="#{customer.totalLoan}">
|
<p:column headerText="Total compras de producto" sortBy="#{customer.totalLoan}" filterBy="#{customer.totalLoan}">
|
||||||
<h:outputText value="#{customer.totalLoan}" />
|
<h:outputText value="#{customer.totalLoan}" />
|
||||||
</p:column>
|
</p:column>
|
||||||
-
|
-
|
||||||
@ -113,7 +113,7 @@
|
|||||||
|
|
||||||
<h:form id="loanForm">
|
<h:form id="loanForm">
|
||||||
<p:growl id="msgsDialog2" showDetail="true"/>
|
<p:growl id="msgsDialog2" showDetail="true"/>
|
||||||
<p:dialog widgetVar="dlg3" width="30%" id="loanDialog" header="Nuevo préstamo" modal="true" responsive="true" showEffect="clip" hideEffect="clip">
|
<p:dialog widgetVar="dlg3" width="30%" id="loanDialog" header="Nueva compra de producto" modal="true" responsive="true" showEffect="clip" hideEffect="clip">
|
||||||
<br></br>
|
<br></br>
|
||||||
<h:panelGroup id="dateStableBox" styleClass="md-inputfield">
|
<h:panelGroup id="dateStableBox" styleClass="md-inputfield">
|
||||||
<p:calendar id="createdOn"
|
<p:calendar id="createdOn"
|
||||||
@ -138,7 +138,7 @@
|
|||||||
value="#{loanPendingManager.loanTypeId}"
|
value="#{loanPendingManager.loanTypeId}"
|
||||||
id="loanTypeSearch" required="true"
|
id="loanTypeSearch" required="true"
|
||||||
requiredMessage="#{i18n['admin.loan.form.typeLoan.require.msg.empty']}">
|
requiredMessage="#{i18n['admin.loan.form.typeLoan.require.msg.empty']}">
|
||||||
<f:selectItem itemLabel="Selecciona un tipo de préstamo.." itemValue="" />
|
<f:selectItem itemLabel="Selecciona un tipo de compra de producto.." itemValue="" />
|
||||||
<f:selectItems value="#{loanPendingManager.loanType}" var="loanType" itemLabel="#{loanType.loanTypeName}" itemValue="#{loanType.id}" />
|
<f:selectItems value="#{loanPendingManager.loanType}" var="loanType" itemLabel="#{loanType.loanTypeName}" itemValue="#{loanType.id}" />
|
||||||
<p:ajax listener="#{loanPendingManager.calculationFunction}"
|
<p:ajax listener="#{loanPendingManager.calculationFunction}"
|
||||||
update="calculation">
|
update="calculation">
|
||||||
|
@ -451,7 +451,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</p:tab>
|
</p:tab>
|
||||||
<p:tab title="Información del préstamo" id="refrescarPrestamo">
|
<p:tab title="Información de la compra de producto" id="refrescarPrestamo">
|
||||||
<div class="ui-g ui-fluid">
|
<div class="ui-g ui-fluid">
|
||||||
<div class="ui-g-12">
|
<div class="ui-g-12">
|
||||||
<div class="ui-g-3"></div>
|
<div class="ui-g-3"></div>
|
||||||
@ -461,7 +461,7 @@
|
|||||||
<h:form id="createHRForm">
|
<h:form id="createHRForm">
|
||||||
<!-- TITLE for this FORM-->
|
<!-- TITLE for this FORM-->
|
||||||
<p:messages id="messages" severity="info, fatal, warn" closable="true" showSummary="true" showDetail="true"/>
|
<p:messages id="messages" severity="info, fatal, warn" closable="true" showSummary="true" showDetail="true"/>
|
||||||
<h4>Préstamo</h4>
|
<h4>Compra de producto</h4>
|
||||||
|
|
||||||
<!-- CONTENT for this FORM-->
|
<!-- CONTENT for this FORM-->
|
||||||
<p:panelGrid columns="3" layout="grid" styleClass="ui-panelgrid-blank form-group">
|
<p:panelGrid columns="3" layout="grid" styleClass="ui-panelgrid-blank form-group">
|
||||||
@ -555,7 +555,7 @@
|
|||||||
|
|
||||||
<br></br>
|
<br></br>
|
||||||
<br></br>
|
<br></br>
|
||||||
<h2>Modificar el tipo de préstamo</h2>
|
<h2>Modificar el tipo de compra de producto</h2>
|
||||||
<p:panelGrid columns="2" layout="grid" styleClass="ui-panelgrid-blank form-group">
|
<p:panelGrid columns="2" layout="grid" styleClass="ui-panelgrid-blank form-group">
|
||||||
<h:panelGroup styleClass="md-inputfield">
|
<h:panelGroup styleClass="md-inputfield">
|
||||||
<p:selectOneMenu style="width:100%"
|
<p:selectOneMenu style="width:100%"
|
||||||
@ -563,7 +563,7 @@
|
|||||||
filterMatchMode="contains"
|
filterMatchMode="contains"
|
||||||
value="#{loanPendingDetailManager.typeLoanId}"
|
value="#{loanPendingDetailManager.typeLoanId}"
|
||||||
id="typeLoan" >
|
id="typeLoan" >
|
||||||
<f:selectItem itemLabel="Selecciona un tipo de préstamo.." itemValue="" />
|
<f:selectItem itemLabel="Selecciona un tipo de compra de producto.." itemValue="" />
|
||||||
<f:selectItems value="#{loanPendingDetailManager.loanType}" var="loanType" itemLabel="#{loanType.loanTypeName}" itemValue="#{loanType.id}" />
|
<f:selectItems value="#{loanPendingDetailManager.loanType}" var="loanType" itemLabel="#{loanType.loanTypeName}" itemValue="#{loanType.id}" />
|
||||||
</p:selectOneMenu>
|
</p:selectOneMenu>
|
||||||
<p:message for="typeLoan" display="text"/>
|
<p:message for="typeLoan" display="text"/>
|
||||||
|
@ -500,7 +500,7 @@
|
|||||||
</p:dataTable>
|
</p:dataTable>
|
||||||
</h:form>
|
</h:form>
|
||||||
|
|
||||||
<h1>Préstamos enviados a Cobranza</h1>
|
<h1>Compras de producto enviados a Cobranza</h1>
|
||||||
<h:form id="form5">
|
<h:form id="form5">
|
||||||
<p:dataTable widgetVar="dtCobranza" id="dtCobranza" var="cobranza" value="#{driverManager.dataCobranza}" rowsPerPageTemplate="5,10,25,50,100,500,1000" emptyMessage="Sin registros"
|
<p:dataTable widgetVar="dtCobranza" id="dtCobranza" var="cobranza" value="#{driverManager.dataCobranza}" rowsPerPageTemplate="5,10,25,50,100,500,1000" emptyMessage="Sin registros"
|
||||||
rowKey="#{cobranza.id}" selection="#{driverManager.selectedCobranza}" expandableRowGroups="true" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}">
|
rowKey="#{cobranza.id}" selection="#{driverManager.selectedCobranza}" expandableRowGroups="true" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}">
|
||||||
@ -803,7 +803,7 @@
|
|||||||
<h:outputText value="#{resumen.newCustomer}" >
|
<h:outputText value="#{resumen.newCustomer}" >
|
||||||
</h:outputText>
|
</h:outputText>
|
||||||
</p:column>
|
</p:column>
|
||||||
<p:column headerText="Total préstamos" sortBy="#{resumen.totalNewCustomer}" filterBy="#{resumen.totalNewCustomer}">
|
<p:column headerText="Total compras de producto" sortBy="#{resumen.totalNewCustomer}" filterBy="#{resumen.totalNewCustomer}">
|
||||||
<h:outputText value="#{resumen.totalNewCustomer}" >
|
<h:outputText value="#{resumen.totalNewCustomer}" >
|
||||||
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||||
</h:outputText>
|
</h:outputText>
|
||||||
|
@ -296,7 +296,7 @@
|
|||||||
|
|
||||||
<p:row>
|
<p:row>
|
||||||
<p:column colspan="1" class="ui-paginator ui-paginator-top ui-widget-header">Cantidad Pagada Actual</p:column>
|
<p:column colspan="1" class="ui-paginator ui-paginator-top ui-widget-header">Cantidad Pagada Actual</p:column>
|
||||||
<p:column colspan="1" class="ui-paginator ui-paginator-top ui-widget-header">Tipo de Prestamo</p:column>
|
<p:column colspan="1" class="ui-paginator ui-paginator-top ui-widget-header">Tipo de Compra de producto</p:column>
|
||||||
<p:column colspan="1" class="ui-paginator ui-paginator-top ui-widget-header">Abono Diario</p:column>
|
<p:column colspan="1" class="ui-paginator ui-paginator-top ui-widget-header">Abono Diario</p:column>
|
||||||
<p:column colspan="1" class="ui-paginator ui-paginator-top ui-widget-header">Comisión por Apertura</p:column>
|
<p:column colspan="1" class="ui-paginator ui-paginator-top ui-widget-header">Comisión por Apertura</p:column>
|
||||||
<p:column colspan="1" class="ui-paginator ui-paginator-top ui-widget-header">Cliente Nuevo</p:column>
|
<p:column colspan="1" class="ui-paginator ui-paginator-top ui-widget-header">Cliente Nuevo</p:column>
|
||||||
@ -681,7 +681,7 @@
|
|||||||
</p:dataTable>
|
</p:dataTable>
|
||||||
</h:form>
|
</h:form>
|
||||||
|
|
||||||
<h1>Préstamos enviados a Cobranza</h1>
|
<h1>Compras de producto enviados a Cobranza</h1>
|
||||||
<h:form id="form5">
|
<h:form id="form5">
|
||||||
<p:dataTable widgetVar="dtCobranza" id="dtCobranza" var="cobranza" value="#{driverDateManager.dataCobranza}" rowsPerPageTemplate="5,10,25,50,100,500,1000" emptyMessage="Sin registros"
|
<p:dataTable widgetVar="dtCobranza" id="dtCobranza" var="cobranza" value="#{driverDateManager.dataCobranza}" rowsPerPageTemplate="5,10,25,50,100,500,1000" emptyMessage="Sin registros"
|
||||||
rowKey="#{cobranza.id}" selection="#{driverDateManager.selectedCobranza}" expandableRowGroups="true" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}">
|
rowKey="#{cobranza.id}" selection="#{driverDateManager.selectedCobranza}" expandableRowGroups="true" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}">
|
||||||
|
@ -496,7 +496,7 @@
|
|||||||
</p:dataTable>
|
</p:dataTable>
|
||||||
</h:form>
|
</h:form>
|
||||||
|
|
||||||
<h1>Préstamos enviados a Cobranza</h1>
|
<h1>Compras de producto enviados a Cobranza</h1>
|
||||||
<h:form id="form5">
|
<h:form id="form5">
|
||||||
<p:dataTable widgetVar="dtCobranza" id="dtCobranza" var="cobranza" value="#{driverLastManager.dataCobranza}" rowsPerPageTemplate="5,10,25,50,100,500,1000" emptyMessage="Sin registros"
|
<p:dataTable widgetVar="dtCobranza" id="dtCobranza" var="cobranza" value="#{driverLastManager.dataCobranza}" rowsPerPageTemplate="5,10,25,50,100,500,1000" emptyMessage="Sin registros"
|
||||||
rowKey="#{cobranza.id}" selection="#{driverLastManager.selectedCobranza}" expandableRowGroups="true" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}">
|
rowKey="#{cobranza.id}" selection="#{driverLastManager.selectedCobranza}" expandableRowGroups="true" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}">
|
||||||
@ -799,7 +799,7 @@
|
|||||||
<h:outputText value="#{resumen.newCustomer}" >
|
<h:outputText value="#{resumen.newCustomer}" >
|
||||||
</h:outputText>
|
</h:outputText>
|
||||||
</p:column>
|
</p:column>
|
||||||
<p:column headerText="Total préstamos" sortBy="#{resumen.totalNewCustomer}" filterBy="#{resumen.totalNewCustomer}">
|
<p:column headerText="Total compras de producto" sortBy="#{resumen.totalNewCustomer}" filterBy="#{resumen.totalNewCustomer}">
|
||||||
<h:outputText value="#{resumen.totalNewCustomer}" >
|
<h:outputText value="#{resumen.totalNewCustomer}" >
|
||||||
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||||
</h:outputText>
|
</h:outputText>
|
||||||
|
@ -133,7 +133,7 @@
|
|||||||
|
|
||||||
<p:contextMenu for="dtLoan">
|
<p:contextMenu for="dtLoan">
|
||||||
<p:menuitem value="Ver detalles" ajax="false" rendered="#{loanHistoryManager.loan.size() > 0}" icon="ui-icon-book" action="#{loanHistoryManager.detailLoan(i18n['outcome.admin.loan.history.detail'])}" />
|
<p:menuitem value="Ver detalles" ajax="false" rendered="#{loanHistoryManager.loan.size() > 0}" icon="ui-icon-book" action="#{loanHistoryManager.detailLoan(i18n['outcome.admin.loan.history.detail'])}" />
|
||||||
<p:menuitem value="Cambiar préstamo" rendered="#{loanHistoryManager.loan.size() > 0}" icon="ui-icon-edit" onclick="PF('dlg5').show();" update="dtLoan,:form:msgs" />
|
<p:menuitem value="Cambiar compra de producto" rendered="#{loanHistoryManager.loan.size() > 0}" icon="ui-icon-edit" onclick="PF('dlg5').show();" update="dtLoan,:form:msgs" />
|
||||||
<p:menuitem value="Cambiar ruta" rendered="#{loanHistoryManager.loan.size() > 0}" icon="ui-icon-edit" onclick="PF('dlg6').show();" update="dtLoan,:form:msgs" />
|
<p:menuitem value="Cambiar ruta" rendered="#{loanHistoryManager.loan.size() > 0}" icon="ui-icon-edit" onclick="PF('dlg6').show();" update="dtLoan,:form:msgs" />
|
||||||
|
|
||||||
<p:menuitem rendered="#{loginBean.isUserInRole('admin.loan.updated')}" value="Bono cliente nuevo" update="dtLoan,:form:msgs" icon="ui-icon-check" actionListener="#{loanHistoryManager.changeBonusNewCustomer()}">
|
<p:menuitem rendered="#{loginBean.isUserInRole('admin.loan.updated')}" value="Bono cliente nuevo" update="dtLoan,:form:msgs" icon="ui-icon-check" actionListener="#{loanHistoryManager.changeBonusNewCustomer()}">
|
||||||
@ -250,7 +250,7 @@
|
|||||||
|
|
||||||
<h:form id="loanForm4">
|
<h:form id="loanForm4">
|
||||||
<p:growl id="msgsDialog4" showDetail="true"/>
|
<p:growl id="msgsDialog4" showDetail="true"/>
|
||||||
<p:dialog widgetVar="dlg5" width="30%" id="loanDialog4" header="Modificar monto a prestar" modal="true" responsive="true" showEffect="clip" hideEffect="clip">
|
<p:dialog widgetVar="dlg5" width="30%" id="loanDialog4" header="Modificar monto a pagar" modal="true" responsive="true" showEffect="clip" hideEffect="clip">
|
||||||
<br></br>
|
<br></br>
|
||||||
<h:panelGroup styleClass="md-inputfield" >
|
<h:panelGroup styleClass="md-inputfield" >
|
||||||
<p:selectOneMenu style="width:100%"
|
<p:selectOneMenu style="width:100%"
|
||||||
@ -258,8 +258,8 @@
|
|||||||
filterMatchMode="contains"
|
filterMatchMode="contains"
|
||||||
value="#{loanHistoryManager.loanTypeId}"
|
value="#{loanHistoryManager.loanTypeId}"
|
||||||
id="userSearch4" required="true"
|
id="userSearch4" required="true"
|
||||||
requiredMessage="El tipo de préstamo es obligatorio">
|
requiredMessage="El tipo de compra de producto es obligatorio">
|
||||||
<f:selectItem itemLabel="Selecciona un tipo de prestamo.." itemValue="" />
|
<f:selectItem itemLabel="Selecciona un tipo de compra de producto.." itemValue="" />
|
||||||
<f:selectItems value="#{loanHistoryManager.loanType}" var="loanType" itemLabel="#{loanType.loanTypeName}" itemValue="#{loanType.id}" />
|
<f:selectItems value="#{loanHistoryManager.loanType}" var="loanType" itemLabel="#{loanType.loanTypeName}" itemValue="#{loanType.id}" />
|
||||||
</p:selectOneMenu>
|
</p:selectOneMenu>
|
||||||
<p:message for="userSearch4" display="text"/>
|
<p:message for="userSearch4" display="text"/>
|
||||||
|
@ -437,7 +437,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</p:tab>
|
</p:tab>
|
||||||
<p:tab title="Información del préstamo" id="refrescarPrestamo">
|
<p:tab title="Información de la compra de producto" id="refrescarPrestamo">
|
||||||
<div class="ui-g ui-fluid">
|
<div class="ui-g ui-fluid">
|
||||||
<div class="ui-g-12">
|
<div class="ui-g-12">
|
||||||
<div class="ui-g-3"></div>
|
<div class="ui-g-3"></div>
|
||||||
@ -447,7 +447,7 @@
|
|||||||
<h:form id="createHRForm">
|
<h:form id="createHRForm">
|
||||||
<!-- TITLE for this FORM-->
|
<!-- TITLE for this FORM-->
|
||||||
<p:messages id="messages" severity="info, fatal, warn" closable="true" showSummary="true" showDetail="true"/>
|
<p:messages id="messages" severity="info, fatal, warn" closable="true" showSummary="true" showDetail="true"/>
|
||||||
<h4>Préstamo</h4>
|
<h4>Compra de producto</h4>
|
||||||
|
|
||||||
<!-- CONTENT for this FORM-->
|
<!-- CONTENT for this FORM-->
|
||||||
<p:panelGrid columns="3" layout="grid" styleClass="ui-panelgrid-blank form-group">
|
<p:panelGrid columns="3" layout="grid" styleClass="ui-panelgrid-blank form-group">
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
<h:outputText value="Total Colocación" />
|
<h:outputText value="Total Colocación" />
|
||||||
</f:facet>
|
</f:facet>
|
||||||
</p:column>
|
</p:column>
|
||||||
<p:column headerText="Cantidad Prestada" sortBy="#{loan.amountLoan}" filterBy="#{loan.amountLoan}">
|
<p:column headerText="Cantidad a pagar" sortBy="#{loan.amountLoan}" filterBy="#{loan.amountLoan}">
|
||||||
<h:outputText value="#{loan.amountLoan}">
|
<h:outputText value="#{loan.amountLoan}">
|
||||||
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||||
</h:outputText>
|
</h:outputText>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
xmlns:p="http://primefaces.org/ui"
|
xmlns:p="http://primefaces.org/ui"
|
||||||
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
|
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
|
||||||
template="/WEB-INF/template.xhtml">
|
template="/WEB-INF/template.xhtml">
|
||||||
<ui:define name="title">Préstamos a empleados</ui:define>
|
<ui:define name="title">Compras de producto a empleados</ui:define>
|
||||||
<ui:define name="head">
|
<ui:define name="head">
|
||||||
<h:outputScript library="js" name="scriptGeneric/dialogGeneric.js" />
|
<h:outputScript library="js" name="scriptGeneric/dialogGeneric.js" />
|
||||||
<h:outputScript library="js" name="scriptGeneric/bitacora.js" />
|
<h:outputScript library="js" name="scriptGeneric/bitacora.js" />
|
||||||
@ -13,14 +13,14 @@
|
|||||||
<ui:define name="breadcrumb">
|
<ui:define name="breadcrumb">
|
||||||
<li>#{grant['admin.name']}</li>
|
<li>#{grant['admin.name']}</li>
|
||||||
<li>/</li>
|
<li>/</li>
|
||||||
<li><p:link outcome="#{i18n['outcome.payroll.loanemployee']}">Préstamos empleados</p:link></li>
|
<li><p:link outcome="#{i18n['outcome.payroll.loanemployee']}">Compras de producto empleados</p:link></li>
|
||||||
</ui:define>
|
</ui:define>
|
||||||
|
|
||||||
<ui:define name="content">
|
<ui:define name="content">
|
||||||
<div class="ui-g">
|
<div class="ui-g">
|
||||||
<div class="ui-g-12">
|
<div class="ui-g-12">
|
||||||
<div class="card card-w-title">
|
<div class="card card-w-title">
|
||||||
<h1>Préstamos de empleados</h1>
|
<h1>Compras de producto de empleados</h1>
|
||||||
<h:form id="loanEmployeeForm">
|
<h:form id="loanEmployeeForm">
|
||||||
<p:growl id="msgs" showDetail="true"/>
|
<p:growl id="msgs" showDetail="true"/>
|
||||||
|
|
||||||
@ -54,7 +54,7 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<p:outputPanel style="float: right; padding-right: 5px;">
|
<p:outputPanel style="float: right; padding-right: 5px;">
|
||||||
<h:outputText value="Total préstamos " />
|
<h:outputText value="Total compras de producto " />
|
||||||
<p:inputText readonly="true"
|
<p:inputText readonly="true"
|
||||||
id="totalAmountLoan"
|
id="totalAmountLoan"
|
||||||
style="width:150px;color: #000000;"
|
style="width:150px;color: #000000;"
|
||||||
@ -89,7 +89,7 @@
|
|||||||
<h:outputText styleClass="#{loanemployee.conditionEnabled()}" value="#{loanemployee.name}" />
|
<h:outputText styleClass="#{loanemployee.conditionEnabled()}" value="#{loanemployee.name}" />
|
||||||
</p:column>
|
</p:column>
|
||||||
|
|
||||||
<p:column headerText="Préstamo" sortBy="#{loanemployee.amountLoan}" filterBy="#{loanemployee.amountLoan}">
|
<p:column headerText="Compra de producto" sortBy="#{loanemployee.amountLoan}" filterBy="#{loanemployee.amountLoan}">
|
||||||
<h:outputText styleClass="#{loanemployee.conditionEnabled()}" value="#{loanemployee.amountLoan}" />
|
<h:outputText styleClass="#{loanemployee.conditionEnabled()}" value="#{loanemployee.amountLoan}" />
|
||||||
</p:column>
|
</p:column>
|
||||||
|
|
||||||
@ -175,7 +175,7 @@
|
|||||||
<h:form id="bitacoraForm">
|
<h:form id="bitacoraForm">
|
||||||
<p:growl id="msgsDialogBitacora" showDetail="true"/>
|
<p:growl id="msgsDialogBitacora" showDetail="true"/>
|
||||||
<p:dialog widgetVar="deleteEventBitacora" width="30%"
|
<p:dialog widgetVar="deleteEventBitacora" width="30%"
|
||||||
id="deleteEventBitacora" header="Eliminar prestamo a empleado"
|
id="deleteEventBitacora" header="Eliminar compra de producto a empleado"
|
||||||
modal="true" responsive="true"
|
modal="true" responsive="true"
|
||||||
showEffect="clip" hideEffect="clip">
|
showEffect="clip" hideEffect="clip">
|
||||||
<br></br>
|
<br></br>
|
||||||
@ -202,7 +202,7 @@
|
|||||||
|
|
||||||
<h:form id="loanForm">
|
<h:form id="loanForm">
|
||||||
<p:growl id="msgsDialog" showDetail="true"/>
|
<p:growl id="msgsDialog" showDetail="true"/>
|
||||||
<p:dialog widgetVar="dlg2" width="30%" id="loanDialog" header="Nuevo préstamo" modal="true" responsive="true" showEffect="clip" hideEffect="clip">
|
<p:dialog widgetVar="dlg2" width="30%" id="loanDialog" header="Nueva compra de producto" modal="true" responsive="true" showEffect="clip" hideEffect="clip">
|
||||||
<br></br>
|
<br></br>
|
||||||
<h:panelGroup styleClass="md-inputfield" >
|
<h:panelGroup styleClass="md-inputfield" >
|
||||||
<p:selectOneMenu style="width:100%"
|
<p:selectOneMenu style="width:100%"
|
||||||
@ -222,7 +222,7 @@
|
|||||||
<p:inputText id="totalLoan" value="#{loanEmployeeListBean.amountLoan}" required="true"
|
<p:inputText id="totalLoan" value="#{loanEmployeeListBean.amountLoan}" required="true"
|
||||||
requiredMessage="#{i18n['admin.loan.form.user.require.msg.empty']}" autocomplete="off" style="width: 100%;">
|
requiredMessage="#{i18n['admin.loan.form.user.require.msg.empty']}" autocomplete="off" style="width: 100%;">
|
||||||
</p:inputText>
|
</p:inputText>
|
||||||
<label>Monto del préstamo</label>
|
<label>Monto de la compra de producto</label>
|
||||||
<p:message for="totalLoan" display="text"/>
|
<p:message for="totalLoan" display="text"/>
|
||||||
</h:panelGroup>
|
</h:panelGroup>
|
||||||
<br></br>
|
<br></br>
|
||||||
@ -241,7 +241,7 @@
|
|||||||
|
|
||||||
<h:form id="loanFormDetail">
|
<h:form id="loanFormDetail">
|
||||||
<p:growl id="msgsDialog" showDetail="true"/>
|
<p:growl id="msgsDialog" showDetail="true"/>
|
||||||
<p:dialog widgetVar="dlg3" width="30%" id="loanDialog" header="Abono a préstamo" modal="true" responsive="true" showEffect="clip" hideEffect="clip">
|
<p:dialog widgetVar="dlg3" width="30%" id="loanDialog" header="Abono a compra de producto" modal="true" responsive="true" showEffect="clip" hideEffect="clip">
|
||||||
<br></br>
|
<br></br>
|
||||||
<h:panelGroup styleClass="md-inputfield" >
|
<h:panelGroup styleClass="md-inputfield" >
|
||||||
<p:inputNumber id="loanDetailAmount" value="#{loanEmployeeListBean.loanDetailAmount}" required="true" requiredMessage="El monto es obligatorio" autocomplete="off" style="width: 100%;">
|
<p:inputNumber id="loanDetailAmount" value="#{loanEmployeeListBean.loanDetailAmount}" required="true" requiredMessage="El monto es obligatorio" autocomplete="off" style="width: 100%;">
|
||||||
|
@ -126,7 +126,7 @@
|
|||||||
<p:menuitem rendered="#{dashboardManager.getAction()}" value="Agregar abono" icon="ui-icon-check" onclick="PF('dlg3').show();" update="dtLoan,:dashboardResumen:msgs"/>
|
<p:menuitem rendered="#{dashboardManager.getAction()}" value="Agregar abono" icon="ui-icon-check" onclick="PF('dlg3').show();" update="dtLoan,:dashboardResumen:msgs"/>
|
||||||
<p:menuitem value="Agregar depósito" icon="ui-icon-check" onclick="PF('dlg7').show();" update="dtLoan,:dashboardResumen:msgs"/>
|
<p:menuitem value="Agregar depósito" icon="ui-icon-check" onclick="PF('dlg7').show();" update="dtLoan,:dashboardResumen:msgs"/>
|
||||||
<p:menuitem rendered="#{dashboardManager.getAction()}" value="Agregar multa" icon="ui-icon-close" onclick="PF('dlg4').show();" update="dtLoan,:dashboardResumen:msgs" />
|
<p:menuitem rendered="#{dashboardManager.getAction()}" value="Agregar multa" icon="ui-icon-close" onclick="PF('dlg4').show();" update="dtLoan,:dashboardResumen:msgs" />
|
||||||
<p:menuitem value="Cambiar préstamo" icon="ui-icon-edit" onclick="PF('dlg5').show();" update="dtLoan,:dashboardResumen:msgs" />
|
<p:menuitem value="Cambiar compra de producto" icon="ui-icon-edit" onclick="PF('dlg5').show();" update="dtLoan,:dashboardResumen:msgs" />
|
||||||
<p:menuitem value="Cambiar ruta" icon="ui-icon-edit" onclick="PF('dlg6').show();" update="dtLoan,:dashboardResumen:msgs" />
|
<p:menuitem value="Cambiar ruta" icon="ui-icon-edit" onclick="PF('dlg6').show();" update="dtLoan,:dashboardResumen:msgs" />
|
||||||
<p:menuitem rendered="#{loginBean.isUserInRole('admin.loan.deleted') and dashboardManager.getAction()}" onclick="PF('dlg9').show();" value="Borrar abono del día" update="dtLoan,:dashboardResumen:msgs" icon="ui-icon-remove">
|
<p:menuitem rendered="#{loginBean.isUserInRole('admin.loan.deleted') and dashboardManager.getAction()}" onclick="PF('dlg9').show();" value="Borrar abono del día" update="dtLoan,:dashboardResumen:msgs" icon="ui-icon-remove">
|
||||||
<p:confirm message="#{i18n['general.confirm.confirm']}" />
|
<p:confirm message="#{i18n['general.confirm.confirm']}" />
|
||||||
@ -246,6 +246,59 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="ui-g-12">
|
||||||
|
<div class="card">
|
||||||
|
<p:carousel value="#{dashboardManager.advances}" headerText="Avance del día" var="advances" itemStyle="text-align:center" responsive="true">
|
||||||
|
<p:panelGrid columns="2" style="width:100%;margin:10px 0px" columnClasses="label,value" layout="grid" styleClass="ui-panelgrid-blank">
|
||||||
|
|
||||||
|
<h:outputText value="Asesor" style="font-weight: bold;"/>
|
||||||
|
<h:outputText value="#{advances.userName}" />
|
||||||
|
|
||||||
|
<h:outputText value="Clientes por visitar" style="font-weight: bold;"/>
|
||||||
|
<h:outputText value="#{advances.totalExpected}" />
|
||||||
|
|
||||||
|
<h:outputText value="Clientes visitados" style="font-weight: bold;"/>
|
||||||
|
<h:outputText value="#{advances.totalNow}"/>
|
||||||
|
|
||||||
|
<h:outputText value="Porcentaje de visita" style="font-weight: bold;"/>
|
||||||
|
<h:outputText value="#{advances.porcentaje}" >
|
||||||
|
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="%" />
|
||||||
|
</h:outputText>
|
||||||
|
|
||||||
|
<h:outputText value="Cobro esperado por semana" style="font-weight: bold;"/>
|
||||||
|
<h:outputText value="#{advances.totalExpectedWeek}" >
|
||||||
|
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||||
|
</h:outputText>
|
||||||
|
|
||||||
|
<h:outputText value="Total cobrado por semana" style="font-weight: bold;"/>
|
||||||
|
<h:outputText value="#{advances.totalReportedWeek}" >
|
||||||
|
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||||
|
</h:outputText>
|
||||||
|
|
||||||
|
<h:outputText value="Faltante" style="font-weight: bold;"/>
|
||||||
|
<h:outputText value="#{advances.faltante}" >
|
||||||
|
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||||
|
</h:outputText>
|
||||||
|
|
||||||
|
<h:outputText value="Porcentaje" style="font-weight: bold;"/>
|
||||||
|
<h:outputText value="#{advances.porcentajePaymentWeek}" >
|
||||||
|
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="%" />
|
||||||
|
</h:outputText>
|
||||||
|
|
||||||
|
<h:outputText value="Préstamos colocados aprobados" style="font-weight: bold;"/>
|
||||||
|
<h:outputText value="#{advances.colocationApproved}" >
|
||||||
|
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||||
|
</h:outputText>
|
||||||
|
|
||||||
|
<h:outputText value="Préstamos colocados por liberar" style="font-weight: bold;"/>
|
||||||
|
<h:outputText value="#{advances.colocationToDelivery}" >
|
||||||
|
<f:convertNumber pattern="¤#,##0.00" locale="en_US" currencySymbol="$" />
|
||||||
|
</h:outputText>
|
||||||
|
</p:panelGrid>
|
||||||
|
</p:carousel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</h:form>
|
</h:form>
|
||||||
|
|
||||||
<h:form id="loanForm">
|
<h:form id="loanForm">
|
||||||
@ -355,7 +408,7 @@
|
|||||||
filterMatchMode="contains"
|
filterMatchMode="contains"
|
||||||
value="#{dashboardManager.loanTypeId}"
|
value="#{dashboardManager.loanTypeId}"
|
||||||
id="userSearch4" required="true"
|
id="userSearch4" required="true"
|
||||||
requiredMessage="El tipo de préstamo es obligatorio">
|
requiredMessage="El tipo de compra de producto es obligatorio">
|
||||||
<f:selectItem itemLabel="Selecciona un tipo de venta.." itemValue="" />
|
<f:selectItem itemLabel="Selecciona un tipo de venta.." itemValue="" />
|
||||||
<f:selectItems value="#{dashboardManager.loanType}" var="loanType" itemLabel="#{loanType.loanTypeName}" itemValue="#{loanType.id}" />
|
<f:selectItems value="#{dashboardManager.loanType}" var="loanType" itemLabel="#{loanType.loanTypeName}" itemValue="#{loanType.id}" />
|
||||||
</p:selectOneMenu>
|
</p:selectOneMenu>
|
||||||
@ -437,7 +490,7 @@
|
|||||||
|
|
||||||
<h:form id="bitacoraForm">
|
<h:form id="bitacoraForm">
|
||||||
<p:growl id="msgsDialogBitacora" showDetail="true"/>
|
<p:growl id="msgsDialogBitacora" showDetail="true"/>
|
||||||
<p:dialog widgetVar="dlg8" width="30%" id="loanDialogBitacora" header="Eliminar préstamo" modal="true" responsive="true" showEffect="clip" hideEffect="clip">
|
<p:dialog widgetVar="dlg8" width="30%" id="loanDialogBitacora" header="Eliminar compra de producto" modal="true" responsive="true" showEffect="clip" hideEffect="clip">
|
||||||
<br></br>
|
<br></br>
|
||||||
<h:panelGroup styleClass="md-inputfield" >
|
<h:panelGroup styleClass="md-inputfield" >
|
||||||
<p:inputText id="commentsBitacora" value="#{dashboardManager.commentsBitacora}" autocomplete="off" style="width: 100%;">
|
<p:inputText id="commentsBitacora" value="#{dashboardManager.commentsBitacora}" autocomplete="off" style="width: 100%;">
|
||||||
|
@ -444,7 +444,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</p:tab>
|
</p:tab>
|
||||||
<p:tab title="Información del préstamo" id="refrescarPrestamo">
|
<p:tab title="Información de la compra de producto" id="refrescarPrestamo">
|
||||||
<div class="ui-g ui-fluid">
|
<div class="ui-g ui-fluid">
|
||||||
<div class="ui-g-12">
|
<div class="ui-g-12">
|
||||||
<div class="ui-g-3"></div>
|
<div class="ui-g-3"></div>
|
||||||
@ -454,7 +454,7 @@
|
|||||||
<h:form id="createHRForm">
|
<h:form id="createHRForm">
|
||||||
<!-- TITLE for this FORM-->
|
<!-- TITLE for this FORM-->
|
||||||
<p:messages id="messages" severity="info, fatal, warn" closable="true" showSummary="true" showDetail="true"/>
|
<p:messages id="messages" severity="info, fatal, warn" closable="true" showSummary="true" showDetail="true"/>
|
||||||
<h4>Préstamo</h4>
|
<h4>Compra de producto</h4>
|
||||||
|
|
||||||
<!-- CONTENT for this FORM-->
|
<!-- CONTENT for this FORM-->
|
||||||
<p:panelGrid columns="3" layout="grid" styleClass="ui-panelgrid-blank form-group">
|
<p:panelGrid columns="3" layout="grid" styleClass="ui-panelgrid-blank form-group">
|
||||||
|
@ -438,7 +438,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</p:tab>
|
</p:tab>
|
||||||
<p:tab title="Información del préstamo" id="refrescarPrestamo">
|
<p:tab title="Información de la compra de producto" id="refrescarPrestamo">
|
||||||
<div class="ui-g ui-fluid">
|
<div class="ui-g ui-fluid">
|
||||||
<div class="ui-g-12">
|
<div class="ui-g-12">
|
||||||
<div class="ui-g-3"></div>
|
<div class="ui-g-3"></div>
|
||||||
@ -448,7 +448,7 @@
|
|||||||
<h:form id="createHRForm">
|
<h:form id="createHRForm">
|
||||||
<!-- TITLE for this FORM-->
|
<!-- TITLE for this FORM-->
|
||||||
<p:messages id="messages" severity="info, fatal, warn" closable="true" showSummary="true" showDetail="true"/>
|
<p:messages id="messages" severity="info, fatal, warn" closable="true" showSummary="true" showDetail="true"/>
|
||||||
<h4>Préstamo</h4>
|
<h4>Compra de producto</h4>
|
||||||
|
|
||||||
<!-- CONTENT for this FORM-->
|
<!-- CONTENT for this FORM-->
|
||||||
<p:panelGrid columns="3" layout="grid" styleClass="ui-panelgrid-blank form-group">
|
<p:panelGrid columns="3" layout="grid" styleClass="ui-panelgrid-blank form-group">
|
||||||
|
Loading…
Reference in New Issue
Block a user