fixes bug #9689
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@74209 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
21d67e17e7
commit
adc6a4e4f4
|
@ -430,8 +430,7 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
|||
@Override
|
||||
public boolean isEventosFinanceirosSemConferencia(List<EventosFinanceirosVO> lsEventosFinanceiros) throws BusinessException {
|
||||
for (EventosFinanceirosVO eventosFinanceiros : lsEventosFinanceiros) {
|
||||
if ((eventosFinanceiros.isExigeConferencia() || (eventosFinanceiros.getExigeConferenciaAba() != null && eventosFinanceiros.getExigeConferenciaAba())
|
||||
|| eventosFinanceiros.getTipoeventoextradebcred().intValue() != 0) &&
|
||||
if ((eventosFinanceiros.isExigeConferencia() || eventosFinanceiros.getExigeConferenciaAba()) &&
|
||||
(!eventosFinanceiros.isConferido() && eventosFinanceiros.getLogconferenciaId() == null)) {
|
||||
return true;
|
||||
}
|
||||
|
@ -599,35 +598,6 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Subtrai do total de forma pago em dinheiro o valor total pago das ocds.
|
||||
* @param totalOcd
|
||||
* @param resumoComissao
|
||||
*/
|
||||
private void subtrairOcdFormapagoDinheiro(OcdVO totalOcd, ResumoComissao resumoComissao) {
|
||||
if(totalOcd == null || totalOcd.getValorPagar() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
FormapagoVO formapagoDinheiro = null;
|
||||
for (FormapagoVO formapagoVO : resumoComissao.getTotalFormapago()) {
|
||||
if(formapagoVO.getFormapagoId().equals(Constantes.FORMA_PAGO_DINHEIRO.intValue())) {
|
||||
formapagoDinheiro = formapagoVO;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(formapagoDinheiro == null) {
|
||||
formapagoDinheiro = new FormapagoVO(Constantes.FORMA_PAGO_DINHEIRO.intValue(), "DINHEIRO", null, BigDecimal.ZERO);
|
||||
}
|
||||
|
||||
formapagoDinheiro.subtract(totalOcd.getValorPagar());
|
||||
|
||||
if(!resumoComissao.getTotalFormapago().contains(formapagoDinheiro)) {
|
||||
resumoComissao.getTotalFormapago().add(formapagoDinheiro);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Totaliza os valores conforme o forma pago, apenas do bilhetes que geraram registros em caixa<br>
|
||||
* (+) Abas: Bilhetes Manual, Bilhetes, Gap Venda<br>
|
||||
|
|
|
@ -4,7 +4,6 @@ import java.math.BigDecimal;
|
|||
import java.util.Date;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.hibernate.Hibernate;
|
||||
import org.zkoss.util.resource.Labels;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Conferencia;
|
||||
|
@ -204,7 +203,20 @@ public class EventosFinanceirosVO {
|
|||
}
|
||||
|
||||
public boolean isExigeConferencia() {
|
||||
return getComemptipoeventoextraId() != null || getComempformapagoId() != null;
|
||||
return getComemptipoeventoextraId() != null || getComempformapagoId() != null || isExigeConferenciaTipoEvento();
|
||||
}
|
||||
|
||||
public boolean isExigeConferenciaTipoEvento() {
|
||||
if(getTipoeventoextradebcred() != null && getTipoeventoextradebcred() != 0) {
|
||||
if(getTipoeventoextradebcred() == 1){
|
||||
return true;
|
||||
}else if(isDebito() && getTipoeventoextradebcred() == 2){
|
||||
return true;
|
||||
}else if(isCredito() && getTipoeventoextradebcred() == 3){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public Boolean getExigeConferenciaAba() {
|
||||
|
|
Loading…
Reference in New Issue