fixes bug#21723
dev:wilian qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@105448 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
16708ef8e5
commit
517c925933
|
@ -61,5 +61,7 @@ public interface ConferenciaComissaoDAO extends GenericDAO<Conferencia, Long> {
|
||||||
public void borrarLogConferenciaTransacaoId(Long transacaoId) throws BusinessException;
|
public void borrarLogConferenciaTransacaoId(Long transacaoId) throws BusinessException;
|
||||||
|
|
||||||
public boolean isConferenciaCompetenciaEncerrada(Date dataInicial, Date dataFinal, Empresa empresa, PuntoVenta puntoVenta, boolean isDesconsideraPtVendaFechados) throws BusinessException;
|
public boolean isConferenciaCompetenciaEncerrada(Date dataInicial, Date dataFinal, Empresa empresa, PuntoVenta puntoVenta, boolean isDesconsideraPtVendaFechados) throws BusinessException;
|
||||||
|
|
||||||
|
public boolean isConfMovFPTrocaVlrDeposito(Empresa empresa);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1380,4 +1380,23 @@ public class ConferenciaComissaoHibernateDAO extends GenericHibernateDAO<Confere
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isConfMovFPTrocaVlrDeposito(Empresa empresa) {
|
||||||
|
if(empresa == null || empresa.getEmpresaId() == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBuilder sql = new StringBuilder();
|
||||||
|
sql.append(" SELECT EMPRESA_ID ")
|
||||||
|
.append(" FROM EMPRESA ")
|
||||||
|
.append(" WHERE ACTIVO = 1 ")
|
||||||
|
.append(" AND INDCONFMOVFPTROCAVLRDEPOSITO = 1 ")
|
||||||
|
.append(" AND EMPRESA_ID = :empresaId ");
|
||||||
|
|
||||||
|
Query qr = getSession().createSQLQuery(sql.toString());
|
||||||
|
qr.setParameter("empresaId", empresa.getEmpresaId());
|
||||||
|
|
||||||
|
return !qr.list().isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -368,6 +368,9 @@ public class Empresa implements Serializable, Auditavel<Empresa> {
|
||||||
@Column(name = "INDALERTAVDAPOSHORARIOVIAGEM")
|
@Column(name = "INDALERTAVDAPOSHORARIOVIAGEM")
|
||||||
private Boolean indAlertaVDAPosHorarioViagem;
|
private Boolean indAlertaVDAPosHorarioViagem;
|
||||||
|
|
||||||
|
@Column(name = "INDCONFMOVFPTROCAVLRDEPOSITO")
|
||||||
|
private Boolean indConfMovFPTrocaVlrDeposito;
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
@NaoAuditar
|
@NaoAuditar
|
||||||
private Empresa empresaClone;
|
private Empresa empresaClone;
|
||||||
|
@ -1369,4 +1372,13 @@ public class Empresa implements Serializable, Auditavel<Empresa> {
|
||||||
public void setIndAlertaVDAPosHorarioViagem(Boolean indAlertaVDAPosHorarioViagem) {
|
public void setIndAlertaVDAPosHorarioViagem(Boolean indAlertaVDAPosHorarioViagem) {
|
||||||
this.indAlertaVDAPosHorarioViagem = indAlertaVDAPosHorarioViagem;
|
this.indAlertaVDAPosHorarioViagem = indAlertaVDAPosHorarioViagem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean getIndConfMovFPTrocaVlrDeposito() {
|
||||||
|
return indConfMovFPTrocaVlrDeposito != null ? indConfMovFPTrocaVlrDeposito : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndConfMovFPTrocaVlrDeposito(Boolean indConfMovFPTrocaVlrDeposito) {
|
||||||
|
this.indConfMovFPTrocaVlrDeposito = indConfMovFPTrocaVlrDeposito;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -526,7 +526,7 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
||||||
resumoComissao.setTotalOcd(totalOcd);
|
resumoComissao.setTotalOcd(totalOcd);
|
||||||
|
|
||||||
carregarTotalFormapago(resumoComissao, boletoComissaos, lsEventosFinanceiros);
|
carregarTotalFormapago(resumoComissao, boletoComissaos, lsEventosFinanceiros);
|
||||||
carregarTotalDeposito(resumoComissao, boletoComissaos, lsEventosFinanceiros);
|
carregarTotalDeposito(conferencia, resumoComissao, boletoComissaos, lsEventosFinanceiros);
|
||||||
|
|
||||||
resumoComissao.setListNumSerieECF(puntoVentaDAO.quantidadeECFPorPuntoVenta(conferencia));
|
resumoComissao.setListNumSerieECF(puntoVentaDAO.quantidadeECFPorPuntoVenta(conferencia));
|
||||||
|
|
||||||
|
@ -535,14 +535,17 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calcula o total de deposito
|
* Calcula o total de deposito
|
||||||
*
|
* @param conferencia
|
||||||
* @param resumoComissao
|
* @param resumoComissao
|
||||||
* @param boletoComissaos
|
* @param boletoComissaos
|
||||||
* @param lsEventosFinanceiros
|
* @param lsEventosFinanceiros
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private void carregarTotalDeposito(ResumoComissao resumoComissao, List<BoletoComissao> boletoComissaos, List<EventosFinanceirosVO> lsEventosFinanceiros) {
|
private void carregarTotalDeposito(Conferencia conferencia, ResumoComissao resumoComissao, List<BoletoComissao> boletoComissaos, List<EventosFinanceirosVO> lsEventosFinanceiros) {
|
||||||
List<Integer> formaspagosDeposito = new ArrayList<Integer>(Arrays.asList(Constantes.FORMA_PAGO_DINHEIRO.intValue()));
|
List<Integer> formaspagosDeposito = new ArrayList<Integer>(Arrays.asList(Constantes.FORMA_PAGO_DINHEIRO.intValue()));
|
||||||
|
if(conferencia != null && conferenciaComissaoDAO.isConfMovFPTrocaVlrDeposito(conferencia.getEmpresa())) {
|
||||||
|
formaspagosDeposito.add(Constantes.FORMA_PAGO_TROCA_PASSAGEM.intValue());
|
||||||
|
}
|
||||||
|
|
||||||
BigDecimal totalDeposito = BigDecimal.ZERO;
|
BigDecimal totalDeposito = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue