- DASHBOARD - AGREGAR TABLA "Detalle de avance del día por asesor"
- VENTAS - POR AUTORIZAR - AL APROBAR PASAR DIRECTAMENTE AL ESTATUS DE 'AUTORIZADA' - ADMINISTRACIÓN - CAJA CHICA - CORTE DÍA - AJUSTAR PARA QUE TOME EN CUENTA LOS MOVIMIENTOS A PARTIR DEL ÚLTIMO CORTE
This commit is contained in:
parent
ecf4937bb6
commit
63cf262e38
@ -73,11 +73,13 @@
|
||||
<mapping class="com.arrebol.apc.model.views.LoanToDeliveryByCertifierView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.ExchangeEnebledUsersView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.TotalCashByCurdateView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.TotalCashByLastClosingDayView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.PersonSearchHistoricalDetailsView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.TotalClosingDayByCurdateView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.TotalLoansByOfficeView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.PaymentDetailFromUserByCurdateView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.ClosingDailyDetailFromUserByCurdateView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.ClosingDailyDetailFromUserByLastClosingDayView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.LoanApprovedDetailView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.GeneralBoxView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.LoanByUserPaymentZeroView"/>
|
||||
|
@ -19,11 +19,14 @@ import com.arrebol.apc.model.core.Office;
|
||||
import com.arrebol.apc.model.core.User;
|
||||
import com.arrebol.apc.model.enums.ActiveStatus;
|
||||
import com.arrebol.apc.model.views.ClosingDailyDetailFromUserByCurdateView;
|
||||
import com.arrebol.apc.model.views.ClosingDailyDetailFromUserByLastClosingDayView;
|
||||
import com.arrebol.apc.model.views.LoanByUserPaymentZeroView;
|
||||
import com.arrebol.apc.model.views.TotalCashByCurdateDashboardView;
|
||||
import com.arrebol.apc.model.views.TotalCashByCurdateView;
|
||||
import com.arrebol.apc.model.views.TotalCashByLastClosingDayView;
|
||||
import com.arrebol.apc.model.views.TotalClosingDayByCurdateView;
|
||||
import com.arrebol.apc.model.views.constance.ClosingDailyDetailFromUserByCurdateCfg;
|
||||
import com.arrebol.apc.model.views.constance.ClosingDailyDetailFromUserByLastClosingDayCfg;
|
||||
import com.arrebol.apc.model.views.constance.LoanByUserPaymentZeroViewCfg;
|
||||
import com.arrebol.apc.model.views.constance.TotalLoansByOfficeViewCfg;
|
||||
import com.arrebol.apc.repository.GenericEntityRepository;
|
||||
@ -120,6 +123,18 @@ public class ClosingDayController extends ConnectionManager implements Serializ
|
||||
return (TotalCashByCurdateView) genericEntityRepository.selectAPCEntityById(TotalCashByCurdateView.class, id);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Searching TotalCashByLastClosingDayView by id.
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public TotalCashByLastClosingDayView getTotalCashByLastClosingDayViewById(String id) {
|
||||
logger.debug("getTotalCashByLastClosingDayViewById");
|
||||
return (TotalCashByLastClosingDayView) genericEntityRepository.selectAPCEntityById(TotalCashByLastClosingDayView.class, id);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Searching all total money day by office.
|
||||
@ -177,6 +192,20 @@ public class ClosingDayController extends ConnectionManager implements Serializ
|
||||
return genericEntityRepository.xmlQueryAPCEntities(ClosingDailyDetailFromUserByCurdateView.class, ClosingDailyDetailFromUserByCurdateCfg.QUERY_FIND_ALL_DETAILS, parameters);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Searching all ClosingDailyDetailFromUserByLastClosingDayView by curdate.
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
public List<ClosingDailyDetailFromUserByLastClosingDayView> findAllClosingDailyDetailFromUserByLastClosingDayView(String userId) {
|
||||
logger.debug("findAllClosingDailyDetailFromUserByLastClosingDayView");
|
||||
List<ModelParameter> parameters = new ArrayList<>();
|
||||
parameters.add(new ModelParameter(ClosingDailyDetailFromUserByLastClosingDayCfg.FIELD_VIEW_USER, userId));
|
||||
return genericEntityRepository.xmlQueryAPCEntities(ClosingDailyDetailFromUserByLastClosingDayView.class, ClosingDailyDetailFromUserByLastClosingDayCfg.QUERY_FIND_ALL_DETAILS, parameters);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Searching all ClosingDailyDetailFromUserByCurdateView by curdate.
|
||||
@ -193,6 +222,20 @@ public class ClosingDayController extends ConnectionManager implements Serializ
|
||||
return genericEntityRepository.xmlQueryAPCEntities(ClosingDailyDetailFromUserByCurdateView.class, ClosingDailyDetailFromUserByCurdateCfg.QUERY_FIND_ALL_DETAILS_CERTIFIER, parameters);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Searching all ClosingDailyDetailFromUserByLastClosingDayView by curdate.
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
public List<ClosingDailyDetailFromUserByLastClosingDayView> findAllClosingDailyDetailFromUserCertifierByLastClosingDayView(String userId) {
|
||||
logger.debug("findAllClosingDailyDetailFromUserCertifierByLastClosingDayView");
|
||||
List<ModelParameter> parameters = new ArrayList<>();
|
||||
parameters.add(new ModelParameter(ClosingDailyDetailFromUserByLastClosingDayCfg.FIELD_VIEW_USER, userId));
|
||||
return genericEntityRepository.xmlQueryAPCEntities(ClosingDailyDetailFromUserByLastClosingDayView.class, ClosingDailyDetailFromUserByLastClosingDayCfg.QUERY_FIND_ALL_DETAILS_CERTIFIER, parameters);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Searching the num by closing day
|
||||
@ -375,65 +418,64 @@ public class ClosingDayController extends ConnectionManager implements Serializ
|
||||
this.genericEntityRepository = new GenericEntityRepository();
|
||||
}
|
||||
|
||||
private final String queryClosingDayReport =
|
||||
"SELECT " +
|
||||
"cldd.comments, " +
|
||||
"cldd.amount, " +
|
||||
"cldd.type, " +
|
||||
"cldd.saldo, " +
|
||||
"cldd.created_on, " +
|
||||
"cldd.comisionApertura, " +
|
||||
"cldd.prestamoAnterior, " +
|
||||
"cldd.route, " +
|
||||
"CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name) AS username, " +
|
||||
"(SELECT sum(tc.total_amount_payment) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as total_amount_payment, " +
|
||||
"(SELECT sum(tc.total_amount_deposit) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as total_amount_deposit, " +
|
||||
"(SELECT sum(tc.transfer_sender) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as transfer_sender, " +
|
||||
"(SELECT sum(tc.transfer_receiver) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as transfer_receiver, " +
|
||||
"(SELECT sum(tc.money_daily) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as money_daily, " +
|
||||
"(SELECT sum(tc.other_expense) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as other_expense, " +
|
||||
"(SELECT sum(tc.delivery) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as delivery, " +
|
||||
"(SELECT sum(tc.transfer_pending) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as transfer_pending " +
|
||||
"FROM " +
|
||||
" APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW_REPORT cldd " +
|
||||
"INNER JOIN " +
|
||||
" APC_USER u ON u.id = cldd.id_user " +
|
||||
"INNER JOIN " +
|
||||
" APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource " +
|
||||
"WHERE " +
|
||||
" cldd.id_user = :userId " +
|
||||
"ORDER BY " +
|
||||
" cldd.created_on ASC";
|
||||
private final String queryClosingDayReport
|
||||
= "SELECT "
|
||||
+ "cldd.comments, "
|
||||
+ "cldd.amount, "
|
||||
+ "cldd.type, "
|
||||
+ "cldd.saldo, "
|
||||
+ "cldd.created_on, "
|
||||
+ "cldd.comisionApertura, "
|
||||
+ "cldd.prestamoAnterior, "
|
||||
+ "cldd.route, "
|
||||
+ "CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name) AS username, "
|
||||
+ "(SELECT sum(tc.total_amount_payment) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as total_amount_payment, "
|
||||
+ "(SELECT sum(tc.total_amount_deposit) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as total_amount_deposit, "
|
||||
+ "(SELECT sum(tc.transfer_sender) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as transfer_sender, "
|
||||
+ "(SELECT sum(tc.transfer_receiver) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as transfer_receiver, "
|
||||
+ "(SELECT sum(tc.money_daily) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as money_daily, "
|
||||
+ "(SELECT sum(tc.other_expense) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as other_expense, "
|
||||
+ "(SELECT sum(tc.delivery) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as delivery, "
|
||||
+ "(SELECT sum(tc.transfer_pending) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as transfer_pending "
|
||||
+ "FROM "
|
||||
+ " APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_LAST_CLOSING_VIEW_REPORT cldd "
|
||||
+ "INNER JOIN "
|
||||
+ " APC_USER u ON u.id = cldd.id_user "
|
||||
+ "INNER JOIN "
|
||||
+ " APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource "
|
||||
+ "WHERE "
|
||||
+ " cldd.id_user = :userId "
|
||||
+ "ORDER BY "
|
||||
+ " cldd.created_on ASC";
|
||||
|
||||
|
||||
private final String queryClosingDayReportHistory =
|
||||
" SELECT " +
|
||||
" cldd.comments, " +
|
||||
" cldd.amount, " +
|
||||
" cldd.type, " +
|
||||
" cldd.created_on, " +
|
||||
" cd.amount_expected, " +
|
||||
" cd.amount_paid, " +
|
||||
" CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name) AS username, " +
|
||||
" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Abono' AND cld.id_closing_day = :idClosingDay) as total_amount_payment, " +
|
||||
" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Depósito' AND cld.id_closing_day = :idClosingDay) as total_amount_deposit, " +
|
||||
" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Transferencia enviada' AND cld.id_closing_day = :idClosingDay) as transfer_sender, " +
|
||||
" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Transferencia recibida' AND cld.id_closing_day = :idClosingDay) as transfer_receiver, " +
|
||||
" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Inicio' AND cld.id_closing_day = :idClosingDay) as money_daily, " +
|
||||
" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Gasto' AND cld.id_closing_day = :idClosingDay) as other_expense, " +
|
||||
" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Entrega de préstamo' AND cld.id_closing_day = :idClosingDay) as delivery, " +
|
||||
" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Multa' AND cld.id_closing_day = :idClosingDay) as total_amount_fee, " +
|
||||
" cldd.dateDetail "+
|
||||
" FROM " +
|
||||
" APC_CLOSING_DAY_DETAIL cldd " +
|
||||
" INNER JOIN " +
|
||||
" APC_CLOSING_DAY cd on cldd.id_closing_day = cd.id" +
|
||||
" INNER JOIN" +
|
||||
" APC_USER u ON u.id = cd.id_user " +
|
||||
" INNER JOIN " +
|
||||
" APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource " +
|
||||
" WHERE " +
|
||||
" cldd.id_closing_day = :idClosingDay" +
|
||||
" ORDER BY" +
|
||||
" cldd.created_on ASC; ";
|
||||
private final String queryClosingDayReportHistory
|
||||
= " SELECT "
|
||||
+ " cldd.comments, "
|
||||
+ " cldd.amount, "
|
||||
+ " cldd.type, "
|
||||
+ " cldd.created_on, "
|
||||
+ " cd.amount_expected, "
|
||||
+ " cd.amount_paid, "
|
||||
+ " CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name) AS username, "
|
||||
+ " (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Abono' AND cld.id_closing_day = :idClosingDay) as total_amount_payment, "
|
||||
+ " (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Depósito' AND cld.id_closing_day = :idClosingDay) as total_amount_deposit, "
|
||||
+ " (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Transferencia enviada' AND cld.id_closing_day = :idClosingDay) as transfer_sender, "
|
||||
+ " (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Transferencia recibida' AND cld.id_closing_day = :idClosingDay) as transfer_receiver, "
|
||||
+ " (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Inicio' AND cld.id_closing_day = :idClosingDay) as money_daily, "
|
||||
+ " (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Gasto' AND cld.id_closing_day = :idClosingDay) as other_expense, "
|
||||
+ " (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Entrega de préstamo' AND cld.id_closing_day = :idClosingDay) as delivery, "
|
||||
+ " (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Multa' AND cld.id_closing_day = :idClosingDay) as total_amount_fee, "
|
||||
+ " cldd.dateDetail "
|
||||
+ " FROM "
|
||||
+ " APC_CLOSING_DAY_DETAIL cldd "
|
||||
+ " INNER JOIN "
|
||||
+ " APC_CLOSING_DAY cd on cldd.id_closing_day = cd.id"
|
||||
+ " INNER JOIN"
|
||||
+ " APC_USER u ON u.id = cd.id_user "
|
||||
+ " INNER JOIN "
|
||||
+ " APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource "
|
||||
+ " WHERE "
|
||||
+ " cldd.id_closing_day = :idClosingDay"
|
||||
+ " ORDER BY"
|
||||
+ " cldd.created_on ASC; ";
|
||||
}
|
||||
|
@ -73,11 +73,13 @@
|
||||
<mapping class="com.arrebol.apc.model.views.LoanToDeliveryByCertifierView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.ExchangeEnebledUsersView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.TotalCashByCurdateView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.TotalCashByLastClosingDayView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.PersonSearchHistoricalDetailsView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.TotalClosingDayByCurdateView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.TotalLoansByOfficeView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.PaymentDetailFromUserByCurdateView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.ClosingDailyDetailFromUserByCurdateView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.ClosingDailyDetailFromUserByLastClosingDayView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.LoanApprovedDetailView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.GeneralBoxView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.LoanByUserPaymentZeroView"/>
|
||||
|
@ -63,13 +63,6 @@ public class AdvanceUserDailyDetail implements Serializable{
|
||||
@Column(name = "num_fee")
|
||||
private String numFee;
|
||||
|
||||
@Column(name = "saldo_insoluto")
|
||||
private String saldoInsoluto;
|
||||
|
||||
@Column(name = "amount_loan")
|
||||
private String amountLoan;
|
||||
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
@ -166,23 +159,4 @@ public class AdvanceUserDailyDetail implements Serializable{
|
||||
this.numFee = numFee;
|
||||
}
|
||||
|
||||
public String getSaldoInsoluto() {
|
||||
return saldoInsoluto;
|
||||
}
|
||||
|
||||
public void setSaldoInsoluto(String saldoInsoluto) {
|
||||
this.saldoInsoluto = saldoInsoluto;
|
||||
}
|
||||
|
||||
public String getAmountLoan() {
|
||||
return amountLoan;
|
||||
}
|
||||
|
||||
public void setAmountLoan(String amountLoan) {
|
||||
this.amountLoan = amountLoan;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,134 @@
|
||||
/*
|
||||
* Arrebol Consultancy copyright.
|
||||
*
|
||||
* This code belongs to Arrebol Consultancy
|
||||
* its use, redistribution or modification are prohibited
|
||||
* without written authorization from Arrebol Consultancy.
|
||||
*/
|
||||
package com.arrebol.apc.model.views;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import org.hibernate.annotations.Immutable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Oscar Armando Vargas Cardenas <oscar.vargas@arrebol.com.mx>
|
||||
*/
|
||||
@Entity
|
||||
@Immutable
|
||||
@Table(name = "APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_LAST_CLOSING_DAY_VIEW")
|
||||
public class ClosingDailyDetailFromUserByLastClosingDayView implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -4593609182109393813L;
|
||||
|
||||
@Id
|
||||
@Column(name = "id", length = 36)
|
||||
private String id;
|
||||
|
||||
@Column(name = "comments")
|
||||
private String comments;
|
||||
|
||||
@Column(name = "amount")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Column(name = "type")
|
||||
private String type;
|
||||
|
||||
@Column(name = "created_on")
|
||||
private Date createdOn;
|
||||
|
||||
@Column(name = "id_user")
|
||||
private String idUser;
|
||||
|
||||
@Column(name = "route")
|
||||
private String route;
|
||||
|
||||
@Column(name = "fechaFiltro")
|
||||
private Date fechaFiltro;
|
||||
|
||||
@Column(name = "saldo")
|
||||
private BigDecimal saldo;
|
||||
|
||||
public ClosingDailyDetailFromUserByLastClosingDayView() {
|
||||
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getComments() {
|
||||
return comments;
|
||||
}
|
||||
|
||||
public void setComments(String comments) {
|
||||
this.comments = comments;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(BigDecimal amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getIdUser() {
|
||||
return idUser;
|
||||
}
|
||||
|
||||
public void setIdUser(String idUser) {
|
||||
this.idUser = idUser;
|
||||
}
|
||||
|
||||
public Date getCreatedOn() {
|
||||
return createdOn;
|
||||
}
|
||||
|
||||
public void setCreatedOn(Date createdOn) {
|
||||
this.createdOn = createdOn;
|
||||
}
|
||||
|
||||
public String getRoute() {
|
||||
return route;
|
||||
}
|
||||
|
||||
public void setRoute(String route) {
|
||||
this.route = route;
|
||||
}
|
||||
|
||||
public Date getFechaFiltro() {
|
||||
return fechaFiltro;
|
||||
}
|
||||
|
||||
public void setFechaFiltro(Date fechaFiltro) {
|
||||
this.fechaFiltro = fechaFiltro;
|
||||
}
|
||||
|
||||
public BigDecimal getSaldo() {
|
||||
return saldo;
|
||||
}
|
||||
|
||||
public void setSaldo(BigDecimal saldo) {
|
||||
this.saldo = saldo;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Arrebol Consultancy copyright.
|
||||
*
|
||||
* This code belongs to Arrebol Consultancy
|
||||
* its use, redistribution or modification are prohibited
|
||||
* without written authorization from Arrebol Consultancy.
|
||||
*/
|
||||
package com.arrebol.apc.model.views;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Transient;
|
||||
import org.hibernate.annotations.Immutable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Carlos Janitzio Zavala Lopez <janitzio.zavala@arrebol.com.mx>
|
||||
*/
|
||||
@Entity
|
||||
@Immutable
|
||||
@Table(name = "APC_TOTAL_CASH_BY_LAST_CLOSING_DAY_VIEW")
|
||||
public class TotalCashByLastClosingDayView implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 617629469188727880L;
|
||||
|
||||
@Id
|
||||
@Column(name = "id", length = 36)
|
||||
private String id;
|
||||
|
||||
@Column(name = "id_office")
|
||||
private String idOffice;
|
||||
|
||||
@Column(name = "total_amount_payment")
|
||||
private BigDecimal paymentDaily;
|
||||
|
||||
@Column(name = "total_amount_deposit")
|
||||
private BigDecimal depositDaily;
|
||||
|
||||
@Column(name = "transfer_sender")
|
||||
private BigDecimal transferSender;
|
||||
|
||||
@Column(name = "transfer_receiver")
|
||||
private BigDecimal transferReceiver;
|
||||
|
||||
@Column(name = "money_daily")
|
||||
private BigDecimal moneyDaily;
|
||||
|
||||
@Column(name = "other_expense")
|
||||
private BigDecimal otherExpense;
|
||||
|
||||
@Column(name = "delivery")
|
||||
private BigDecimal delivery;
|
||||
|
||||
@Column(name = "transfer_pending")
|
||||
private BigDecimal transferPending;
|
||||
|
||||
@Transient
|
||||
private BigDecimal total;
|
||||
|
||||
public TotalCashByLastClosingDayView() {
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public BigDecimal getPaymentDaily() {
|
||||
return paymentDaily;
|
||||
}
|
||||
|
||||
public void setPaymentDaily(BigDecimal paymentDaily) {
|
||||
this.paymentDaily = paymentDaily;
|
||||
}
|
||||
|
||||
public BigDecimal getTransferSender() {
|
||||
return transferSender;
|
||||
}
|
||||
|
||||
public void setTransferSender(BigDecimal transferSender) {
|
||||
this.transferSender = transferSender;
|
||||
}
|
||||
|
||||
public BigDecimal getTransferReceiver() {
|
||||
return transferReceiver;
|
||||
}
|
||||
|
||||
public void setTransferReceiver(BigDecimal transferReceiver) {
|
||||
this.transferReceiver = transferReceiver;
|
||||
}
|
||||
|
||||
public BigDecimal getMoneyDaily() {
|
||||
return moneyDaily;
|
||||
}
|
||||
|
||||
public void setMoneyDaily(BigDecimal moneyDaily) {
|
||||
this.moneyDaily = moneyDaily;
|
||||
}
|
||||
|
||||
public BigDecimal getOtherExpense() {
|
||||
return otherExpense;
|
||||
}
|
||||
|
||||
public void setOtherExpense(BigDecimal otherExpense) {
|
||||
this.otherExpense = otherExpense;
|
||||
}
|
||||
|
||||
public BigDecimal getDelivery() {
|
||||
return delivery;
|
||||
}
|
||||
|
||||
public void setDelivery(BigDecimal delivery) {
|
||||
this.delivery = delivery;
|
||||
}
|
||||
|
||||
public String getIdOffice() {
|
||||
return idOffice;
|
||||
}
|
||||
|
||||
public void setIdOffice(String idOffice) {
|
||||
this.idOffice = idOffice;
|
||||
}
|
||||
|
||||
public BigDecimal getTransferPending() {
|
||||
return transferPending;
|
||||
}
|
||||
|
||||
public void setTransferPending(BigDecimal transferPending) {
|
||||
this.transferPending = transferPending;
|
||||
}
|
||||
|
||||
public BigDecimal getDepositDaily() {
|
||||
return depositDaily;
|
||||
}
|
||||
|
||||
public void setDepositDaily(BigDecimal depositDaily) {
|
||||
this.depositDaily = depositDaily;
|
||||
}
|
||||
|
||||
public BigDecimal getTotal() {
|
||||
if (null == total) {
|
||||
total = BigDecimal.ZERO;
|
||||
}
|
||||
total = BigDecimal.ZERO;
|
||||
total = total
|
||||
.add(getPaymentDaily())
|
||||
.add(getTransferReceiver())
|
||||
.subtract(getTransferSender())
|
||||
.add(getMoneyDaily())
|
||||
.subtract(getOtherExpense())
|
||||
.subtract(getDelivery());
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(BigDecimal total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TotalCashByCurdateView{" + "id=" + id + '}';
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Arrebol Consultancy copyright.
|
||||
*
|
||||
* This code belongs to Arrebol Consultancy
|
||||
* its use, redistribution or modification are prohibited
|
||||
* without written authorization from Arrebol Consultancy.
|
||||
*/
|
||||
package com.arrebol.apc.model.views.constance;
|
||||
|
||||
import com.arrebol.apc.model.core.constance.GenericCfg;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Oscar Armando Vargas Cardenas <oscar.vargas@arrebol.com.mx>
|
||||
*/
|
||||
public interface ClosingDailyDetailFromUserByLastClosingDayCfg extends GenericCfg {
|
||||
|
||||
String QUERY_FIND_ALL_DETAILS = "findAllClosingDailyDetailFromUserByLastClosingDayView";
|
||||
String QUERY_FIND_ALL_DETAILS_CERTIFIER = "findAllClosingDailyDetailFromUserCertifierByLastClosingDayView";
|
||||
|
||||
String FIELD_VIEW_USER = "idUser";
|
||||
|
||||
}
|
@ -73,11 +73,13 @@
|
||||
<mapping class="com.arrebol.apc.model.views.LoanToDeliveryByCertifierView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.ExchangeEnebledUsersView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.TotalCashByCurdateView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.TotalCashByLastClosingDayView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.PersonSearchHistoricalDetailsView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.TotalClosingDayByCurdateView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.TotalLoansByOfficeView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.PaymentDetailFromUserByCurdateView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.ClosingDailyDetailFromUserByCurdateView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.ClosingDailyDetailFromUserByLastClosingDayView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.LoanApprovedDetailView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.GeneralBoxView"/>
|
||||
<mapping class="com.arrebol.apc.model.views.LoanByUserPaymentZeroView"/>
|
||||
@ -185,6 +187,7 @@
|
||||
<mapping resource="com/arrebol/apc/model/queries/view/total.closing.day.by.curdate.view.hbm.xml"/>
|
||||
<mapping resource="com/arrebol/apc/model/queries/view/payment.detail.from.user.by.curdate.view.hbm.xml"/>
|
||||
<mapping resource="com/arrebol/apc/model/queries/view/total.closing.daily.detail.from.user.by.curdate.view.hbm.xml"/>
|
||||
<mapping resource="com/arrebol/apc/model/queries/view/total.closing.daily.detail.from.user.by.last.closing.day.view.hbm.xml"/>
|
||||
<mapping resource="com/arrebol/apc/model/queries/view/general.box.view.hbm.xml"/>
|
||||
<mapping resource="com/arrebol/apc/model/queries/view/loan.by.user.payment.zero.view.hbm.xml"/>
|
||||
<mapping resource="com/arrebol/apc/model/queries/view/advance.user.daily.view.hbm.xml"/>
|
||||
|
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"https://hibernate.org/dtd/hibernate-mapping-3.0.dtd">
|
||||
<hibernate-mapping>
|
||||
|
||||
<query name="findAllClosingDailyDetailFromUserByLastClosingDayView">
|
||||
<![CDATA[
|
||||
SELECT
|
||||
t
|
||||
FROM ClosingDailyDetailFromUserByLastClosingDayView t
|
||||
WHERE idUser = :idUser
|
||||
ORDER BY fechaFiltro ASC
|
||||
]]>
|
||||
</query>
|
||||
|
||||
<query name="findAllClosingDailyDetailFromUserCertifierByLastClosingDayView">
|
||||
<![CDATA[
|
||||
SELECT
|
||||
t
|
||||
FROM ClosingDailyDetailFromUserByLastClosingDayView t
|
||||
WHERE idUser = :idUser
|
||||
ORDER BY route ASC
|
||||
]]>
|
||||
</query>
|
||||
|
||||
</hibernate-mapping>
|
@ -13,15 +13,14 @@ import com.arrebol.apc.controller.admin.ClosingDayController;
|
||||
import com.arrebol.apc.controller.admin.LoanController;
|
||||
import com.arrebol.apc.model.admin.ClosingDay;
|
||||
import com.arrebol.apc.model.admin.ClosingDayDetail;
|
||||
import com.arrebol.apc.model.catalog.RouteCtlg;
|
||||
import com.arrebol.apc.model.core.Office;
|
||||
import com.arrebol.apc.model.core.User;
|
||||
import com.arrebol.apc.model.enums.ActiveStatus;
|
||||
import com.arrebol.apc.model.system.logs.Bitacora;
|
||||
import com.arrebol.apc.model.views.ClosingDailyDetailFromUserByCurdateView;
|
||||
import com.arrebol.apc.model.views.ClosingDailyDetailFromUserByLastClosingDayView;
|
||||
import com.arrebol.apc.model.views.LoanByUserPaymentZeroView;
|
||||
import com.arrebol.apc.model.views.TotalCashByCurdateDashboardView;
|
||||
import com.arrebol.apc.model.views.TotalCashByCurdateView;
|
||||
import com.arrebol.apc.model.views.TotalCashByLastClosingDayView;
|
||||
import com.arrebol.apc.model.views.TotalClosingDayByCurdateView;
|
||||
import com.arrebol.apc.web.beans.Datatable;
|
||||
import com.arrebol.apc.web.beans.GenericBean;
|
||||
@ -30,7 +29,6 @@ import com.itextpdf.text.Chunk;
|
||||
import com.itextpdf.text.Document;
|
||||
import com.itextpdf.text.Element;
|
||||
import com.itextpdf.text.FontFactory;
|
||||
import com.itextpdf.text.Image;
|
||||
import com.itextpdf.text.PageSize;
|
||||
import com.itextpdf.text.Paragraph;
|
||||
import com.itextpdf.text.pdf.PdfPCell;
|
||||
@ -43,7 +41,6 @@ import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.ZoneId;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
@ -97,9 +94,8 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
return genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId());
|
||||
}
|
||||
|
||||
public List<ClosingDailyDetailFromUserByCurdateView> fillDatatableClosingDetails(String idUser) {
|
||||
|
||||
return closingDayCtrl.findAllClosingDailyDetailFromUserByCurdateView(idUser);
|
||||
public List<ClosingDailyDetailFromUserByLastClosingDayView> fillDatatableClosingDetails(String idUser) {
|
||||
return closingDayCtrl.findAllClosingDailyDetailFromUserByLastClosingDayView(idUser);
|
||||
}
|
||||
|
||||
public List<LoanByUserPaymentZeroView> getLoansPaymentZeroByUser(String idUser) {
|
||||
@ -142,7 +138,6 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
|
||||
public void getCashTotal() {
|
||||
|
||||
|
||||
if (userId.equalsIgnoreCase("")) {
|
||||
FacesMessage msg = new FacesMessage("ERROR", "Debes de elegir un usuario para poder ver sus totales");
|
||||
FacesContext.getCurrentInstance().addMessage(null, msg);
|
||||
@ -157,13 +152,7 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
return;
|
||||
}
|
||||
|
||||
if (closingDayCtrl.getClosingDayCurdateByUserId(userId, getLoggedUser().getOffice().getId()) > 0) {
|
||||
FacesMessage msg = new FacesMessage("Corte encontrado", "El usuario ya tiene un corte registrado el día de hoy.");
|
||||
FacesContext.getCurrentInstance().addMessage(null, msg);
|
||||
userId = "";
|
||||
return;
|
||||
}
|
||||
totales = new TotalCashByCurdateView();
|
||||
totales = new TotalCashByLastClosingDayView();
|
||||
totales.setMoneyDaily(BigDecimal.ZERO);
|
||||
totales.setPaymentDaily(BigDecimal.ZERO);
|
||||
totales.setTransferReceiver(BigDecimal.ZERO);
|
||||
@ -175,8 +164,8 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
total = BigDecimal.ZERO.toString();
|
||||
totalCustomerWithOutAction = new Long(0);
|
||||
comments = "";
|
||||
TotalCashByCurdateView temp;
|
||||
temp = closingDayCtrl.getTotalCashByCurdateViewById(userId);
|
||||
TotalCashByLastClosingDayView temp;
|
||||
temp = closingDayCtrl.getTotalCashByLastClosingDayViewById(userId);
|
||||
if (temp != null) {
|
||||
totales = temp;
|
||||
total = temp.getTotal().toString();
|
||||
@ -188,11 +177,10 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
|
||||
User userObj = closingDayCtrl.getUserById(userId);
|
||||
|
||||
|
||||
if (userObj.getCertifier().equals(ActiveStatus.DISABLED)) {
|
||||
closingDetail = fillDatatableClosingDetails(userId);
|
||||
} else {
|
||||
closingDetail = closingDayCtrl.findAllClosingDailyDetailFromUserCertifierByCurdateView(userId);
|
||||
closingDetail = closingDayCtrl.findAllClosingDailyDetailFromUserCertifierByLastClosingDayView(userId);
|
||||
}
|
||||
|
||||
totalCustomerWithOutAction = closingDayCtrl.getLoansCountDailyByUser(userId);
|
||||
@ -229,7 +217,6 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
// Image imagen = Image.getInstance("other sources/resources/serenity-layout/images/apc_card.png");
|
||||
// imagen.scaleAbsoluteWidth(100f);
|
||||
// document.add(imagen);
|
||||
|
||||
Paragraph title = new Paragraph("Corte del día", FontFactory.getFont("arial", 18, Font.BOLD, BaseColor.DARK_GRAY));
|
||||
title.setAlignment(Element.ALIGN_CENTER);
|
||||
document.add(title);
|
||||
@ -246,7 +233,6 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
BigDecimal depositos = BigDecimal.ZERO;
|
||||
BigDecimal entrPrestamos = BigDecimal.ZERO;
|
||||
|
||||
|
||||
PdfPTable tableGen = new PdfPTable(4);
|
||||
tableGen.setWidthPercentage(100);
|
||||
tableGen.setTotalWidth(new float[]{100f, 170f, 140f, 150f});
|
||||
@ -373,8 +359,6 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
cellGen.setColspan(1);
|
||||
tableGen.addCell(cellGen);
|
||||
|
||||
|
||||
|
||||
cellGen = new PdfPCell(new Paragraph("Monto Esperado: ",
|
||||
FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK)));
|
||||
cellGen.setHorizontalAlignment(Element.ALIGN_LEFT);
|
||||
@ -568,16 +552,12 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
// Image imagen = Image.getInstance("other sources/resources/serenity-layout/images/apc_card.png");
|
||||
// imagen.scaleAbsoluteWidth(100f);
|
||||
// document.add(imagen);
|
||||
|
||||
Paragraph title = new Paragraph("Corte del día", FontFactory.getFont("arial", 18, Font.BOLD, BaseColor.DARK_GRAY));
|
||||
title.setAlignment(Element.ALIGN_CENTER);
|
||||
document.add(title);
|
||||
|
||||
document.add(Chunk.NEWLINE);
|
||||
|
||||
|
||||
|
||||
|
||||
PdfPTable tableGen = new PdfPTable(4);
|
||||
tableGen.setWidthPercentage(100);
|
||||
tableGen.setTotalWidth(new float[]{100f, 170f, 140f, 150f});
|
||||
@ -704,8 +684,6 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
cellGen.setColspan(1);
|
||||
tableGen.addCell(cellGen);
|
||||
|
||||
|
||||
|
||||
cellGen = new PdfPCell(new Paragraph("Monto Esperado: ",
|
||||
FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK)));
|
||||
cellGen.setHorizontalAlignment(Element.ALIGN_LEFT);
|
||||
@ -807,7 +785,6 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
cell.setColspan(1);
|
||||
table.addCell(cell);
|
||||
|
||||
|
||||
// Monto
|
||||
cell = new PdfPCell(new Paragraph(tmp[1] != null ? "$" + tmp[1].toString() : "$0.00",
|
||||
FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK)));
|
||||
@ -941,7 +918,7 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
if (closingDetail != null && !closingDetail.isEmpty()) {
|
||||
List<ClosingDayDetail> detail = new ArrayList<ClosingDayDetail>();
|
||||
|
||||
for (ClosingDailyDetailFromUserByCurdateView info : closingDetail) {
|
||||
for (ClosingDailyDetailFromUserByLastClosingDayView info : closingDetail) {
|
||||
ClosingDayDetail detailInfo = new ClosingDayDetail();
|
||||
detailInfo.setAmount(info.getAmount());
|
||||
detailInfo.setClosingDay(closingSave);
|
||||
@ -957,7 +934,7 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
|
||||
}
|
||||
getResumen();
|
||||
totales = new TotalCashByCurdateView();
|
||||
totales = new TotalCashByLastClosingDayView();
|
||||
totales.setMoneyDaily(BigDecimal.ZERO);
|
||||
totales.setPaymentDaily(BigDecimal.ZERO);
|
||||
totales.setTransferReceiver(BigDecimal.ZERO);
|
||||
@ -1059,11 +1036,11 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
this.selectedClosingDay = selectedClosingDay;
|
||||
}
|
||||
|
||||
public TotalCashByCurdateView getTotales() {
|
||||
public TotalCashByLastClosingDayView getTotales() {
|
||||
return totales;
|
||||
}
|
||||
|
||||
public void setTotales(TotalCashByCurdateView totales) {
|
||||
public void setTotales(TotalCashByLastClosingDayView totales) {
|
||||
this.totales = totales;
|
||||
}
|
||||
|
||||
@ -1155,11 +1132,11 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
this.genericCtrl = genericCtrl;
|
||||
}
|
||||
|
||||
public List<ClosingDailyDetailFromUserByCurdateView> getClosingDetail() {
|
||||
public List<ClosingDailyDetailFromUserByLastClosingDayView> getClosingDetail() {
|
||||
return closingDetail;
|
||||
}
|
||||
|
||||
public void setClosingDetail(List<ClosingDailyDetailFromUserByCurdateView> closingDetail) {
|
||||
public void setClosingDetail(List<ClosingDailyDetailFromUserByLastClosingDayView> closingDetail) {
|
||||
this.closingDetail = closingDetail;
|
||||
}
|
||||
|
||||
@ -1219,8 +1196,6 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
this.imprimirStatus = imprimirStatus;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private ClosingDayController closingDayCtrl;
|
||||
private GenericController genericCtrl;
|
||||
private BitacoraController bitacoraCtrl;
|
||||
@ -1250,11 +1225,11 @@ public class ClosingDayBean extends GenericBean implements Serializable, Datatab
|
||||
private String comments;
|
||||
private boolean imprimirStatus;
|
||||
|
||||
private TotalCashByCurdateView totales;
|
||||
private TotalCashByLastClosingDayView totales;
|
||||
|
||||
private ClosingDay selectedClosingDay;
|
||||
|
||||
private List<ClosingDailyDetailFromUserByCurdateView> closingDetail;
|
||||
private List<ClosingDailyDetailFromUserByLastClosingDayView> closingDetail;
|
||||
private List<LoanByUserPaymentZeroView> paymentoZeroDetail;
|
||||
|
||||
@PostConstruct
|
||||
|
@ -70,13 +70,13 @@ public class LoanPendingBean extends GenericBean implements Serializable, Datata
|
||||
}
|
||||
|
||||
public void approvedLoan() {
|
||||
loanCtrl.updateLoanByStatus(LoanStatus.TO_DELIVERY, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
||||
loanCtrl.updateLoanByUserByStatus(LoanStatus.TO_DELIVERY, selectedLoan);
|
||||
loanCtrl.updateLoanByStatus(LoanStatus.APPROVED, selectedLoan.getId(), getLoggedUser().getUser().getId());
|
||||
loanCtrl.updateLoanByUserByStatus(LoanStatus.APPROVED, selectedLoan);
|
||||
loan.remove(selectedLoan);
|
||||
selectedLoan = null;
|
||||
selectedLoan = null;
|
||||
|
||||
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "la venta se cambió a estatus 'A conciliar' de forma correcta.");
|
||||
showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "la venta se cambió a estatus 'Aprobado' de forma correcta.");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -166,6 +166,86 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui-g-12">
|
||||
<div class="card">
|
||||
<h4>Detalle de avance del día por asesor</h4>
|
||||
<p:panelGrid columns="2" layout="grid" styleClass="ui-panelgrid-blank form-group">
|
||||
|
||||
<h:panelGroup id="userPnlGrp" styleClass="md-inputfield">
|
||||
<p:selectOneMenu style="width:100%"
|
||||
filter="true"
|
||||
filterMatchMode="contains"
|
||||
value="#{dashboardManager.userId}"
|
||||
id="user"
|
||||
>
|
||||
<f:selectItem itemLabel="Selecciona un usuario.." itemValue="" />
|
||||
<f:selectItems value="#{dashboardManager.users}" var="user" itemLabel="#{user.humanResource.firstName} #{user.humanResource.lastName}" itemValue="#{user.id}" />
|
||||
</p:selectOneMenu>
|
||||
<p:message for="user" display="text"/>
|
||||
</h:panelGroup>
|
||||
<h:panelGroup styleClass="md-inputfield">
|
||||
<p:commandButton value="#{i18n['general.search']}"
|
||||
update="dtAdvancesDetail"
|
||||
action="#{dashboardManager.getAdvanceDetailsByUser()}">
|
||||
</p:commandButton>
|
||||
</h:panelGroup>
|
||||
</p:panelGrid>
|
||||
<p:dataTable widgetVar="dtAdvancesDetail" id="dtAdvancesDetail" var="advancesDetail" draggableRows="true" draggableColumns="true" value="#{dashboardManager.advancesDetail}" style="margin-bottom:20px" reflow="true" rowsPerPageTemplate="5,10,25,50,100" emptyMessage="#{i18n['admin.transfers.datatable.empty']}"
|
||||
rowKey="#{advancesDetail.id}" selectionMode="single" paginator="true" rows="10" paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}">
|
||||
|
||||
<f:facet name="header">
|
||||
<p:commandButton id="toggler" type="button" value="Columnas" style="float:left;" styleClass="amber-btn flat" icon="ui-icon-calendar"/>
|
||||
<p:columnToggler datasource="dtAdvancesDetail" trigger="toggler" />
|
||||
<div style="float:right;padding-top: 5px;padding-left: 5px;padding-right: 5px">
|
||||
<h:commandLink title="Exportar a Excel">
|
||||
<p:graphicImage name="images/excel-xls-icon.png" library="serenity-layout" width="48"/>
|
||||
<p:dataExporter type="xls" target="dtAdvancesDetail" fileName="AvancePorUsuario" />
|
||||
</h:commandLink>
|
||||
</div>
|
||||
<p:outputPanel>
|
||||
<h:outputText value="#{i18n['general.search']}: " />
|
||||
<p:inputText id="globalFilter" onkeyup="PF('dtAdvancesDetail').filter()" style="width:150px;color: #000000;"/>
|
||||
</p:outputPanel>
|
||||
</f:facet>
|
||||
|
||||
<p:column headerText="Cliente" sortBy="#{advancesDetail.customerName}" filterBy="#{advancesDetail.customerName}">
|
||||
<h:outputText value="#{advancesDetail.customerName}" />
|
||||
</p:column>
|
||||
<p:column headerText="Domicilio" sortBy="#{advancesDetail.address}" filterBy="#{advancesDetail.address}">
|
||||
<h:outputText value="#{advancesDetail.address}" />
|
||||
</p:column>
|
||||
<p:column headerText="Cobro" sortBy="#{advancesDetail.paymentAmount}" filterBy="#{advancesDetail.paymentAmount}">
|
||||
<h:outputText value="#{advancesDetail.paymentAmount}" />
|
||||
</p:column>
|
||||
<p:column headerText="Tipo" sortBy="#{advancesDetail.typePayment}" filterBy="#{advancesDetail.typePayment}">
|
||||
<h:outputText value="#{advancesDetail.typePayment}" />
|
||||
</p:column>
|
||||
<p:column visible="false" headerText="Cantidad Pagada" sortBy="#{advancesDetail.amountPaid}" filterBy="#{advancesDetail.amountPaid}">
|
||||
<h:outputText value="#{advancesDetail.amountPaid}" />
|
||||
</p:column >
|
||||
<p:column visible="false" headerText="Cantidad a Pagar" sortBy="#{advancesDetail.amountToPay}" filterBy="#{advancesDetail.amountToPay}">
|
||||
<h:outputText value="#{advancesDetail.amountToPay}" />
|
||||
</p:column>
|
||||
<p:column visible="false" headerText="Numero de Accion" sortBy="#{advancesDetail.lastReference}" filterBy="#{advancesDetail.lastReference}">
|
||||
<h:outputText value="#{advancesDetail.lastReference}" />
|
||||
</p:column>
|
||||
<p:column visible="false" headerText="Numero de multas" sortBy="#{advancesDetail.numFee}" filterBy="#{advancesDetail.numFee}">
|
||||
<h:outputText value="#{advancesDetail.numFee}" />
|
||||
</p:column>
|
||||
<p:column visible="false" headerText="Estatus" sortBy="#{advancesDetail.loanStatus}" filterBy="#{advancesDetail.loanStatus}">
|
||||
<h:outputText value="#{advancesDetail.loanStatus}" />
|
||||
</p:column>
|
||||
<p:column headerText="Fecha" sortBy="#{advancesDetail.createdOn}" filterBy="#{advancesDetail.createdOn}">
|
||||
<h:outputText value="#{advancesDetail.createdOn}">
|
||||
<f:convertDateTime type="date" locale="es" timeZone="GMT-6" pattern="dd - MMMM - yyyy "/>
|
||||
</h:outputText>
|
||||
</p:column>
|
||||
|
||||
</p:dataTable>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</h:form>
|
||||
|
||||
<h:form id="loanForm">
|
||||
|
Loading…
Reference in New Issue
Block a user