fixes bug #9066
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@73634 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
f6ce5b1063
commit
cc70e02b2a
|
@ -207,15 +207,15 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
isPeriodo = (Boolean) Executions.getCurrent().getArg().get("isPeriodo");
|
||||
isPeriodo = (Boolean) Executions.getCurrent().getArg().get("isPeriodo");
|
||||
|
||||
if(isPeriodo){
|
||||
if (isPeriodo) {
|
||||
dataInicial = (Date) Executions.getCurrent().getArg().get("dataInicial");
|
||||
dataFinal = (Date) Executions.getCurrent().getArg().get("dataFinal");
|
||||
|
||||
SimpleDateFormat formato = new SimpleDateFormat("dd/MM/yyyy");
|
||||
datamovimento = formato.format(dataInicial) + " - " + formato.format(dataFinal);
|
||||
}else{
|
||||
datamovimento = formato.format(dataInicial) + " - " + formato.format(dataFinal);
|
||||
} else {
|
||||
datamovimento = (String) Executions.getCurrent().getArg().get("datamovimento");
|
||||
}
|
||||
|
||||
|
@ -233,11 +233,11 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
lsConferenciaPendencia.add(new ConferenciaPendencia(-1, " "));
|
||||
lsConferenciaPendencia.addAll(conferenciaPendenciaService.obtenerTodos());
|
||||
|
||||
if(isPeriodo){
|
||||
if (isPeriodo) {
|
||||
dataInicial = (Date) Executions.getCurrent().getArg().get("dataInicial");
|
||||
dataFinal = (Date) Executions.getCurrent().getArg().get("dataFinal");
|
||||
recuperarConferencias(conferenciaComissao);
|
||||
}else{
|
||||
} else {
|
||||
Long conferenciaId = (Long) Executions.getCurrent().getArg().get("conferenciaId");
|
||||
recuperarConferencia(conferenciaId);
|
||||
}
|
||||
|
@ -357,10 +357,29 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
carregarDados();
|
||||
|
||||
ecfListBox.setItemRenderer(new RenderEcfPontoVenda());
|
||||
|
||||
ecfListBox.addEventListener("onDoubleClick", new EventListener() {
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
|
||||
List listNumSerie = ecfListBox.getSelectedModelItems();
|
||||
|
||||
if (listNumSerie.isEmpty()) {
|
||||
Messagebox.show(Labels.getLabel("conferenciaController.MSG.nenhumaNumeroSerieEcfSelecionado"),
|
||||
Labels.getLabel("conferenciaController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
return;
|
||||
}
|
||||
|
||||
Map<String, Object> args = new HashMap<String, Object>();
|
||||
args.put("puntoVentaId", puntoventaId);
|
||||
args.put("listNumSerie", listNumSerie);
|
||||
openWindow("/gui/comissao/informeIrregularidadeComissao.zul",
|
||||
Labels.getLabel("informeIrregularidadeController.window.title"), args);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void ajustarListsBilhetes() {
|
||||
bilhetesManualList.setItemRenderer(new RenderBoletoComissao() {
|
||||
@Override
|
||||
|
@ -723,7 +742,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
|
||||
private void carregarResumo(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
||||
if (isPeriodo) {
|
||||
//método apenas usa empresa e punto venda da conferencia, então pode ser passado o primeiro da lista
|
||||
// método apenas usa empresa e punto venda da conferencia, então pode ser passado o primeiro da lista
|
||||
resumo = conferenciaComissaoService.gerarResumo(conferencias.isEmpty() ? null : conferencias.get(0), boletosComissaos, lsEventosFinanceiros, totalBilhetesManual, totalBilhetesVendidos, totalBilhetesCancelados, totalBilhetesDevolvidos, totalBilhetesGap, totalBilhetesGapCancelados, totalBilhetesGapDevolvidos, totalCreditosEventoFinanceiros, totalDebitosEventoFinanceiros, ocdTotal, totalBilhetesDevolvidosTroca, totalBilhetesGapDevolvidosTroca);
|
||||
} else {
|
||||
resumo = conferenciaComissaoService.gerarResumo(conferencia, boletosComissaos, lsEventosFinanceiros, totalBilhetesManual, totalBilhetesVendidos, totalBilhetesCancelados, totalBilhetesDevolvidos, totalBilhetesGap, totalBilhetesGapCancelados, totalBilhetesGapDevolvidos, totalCreditosEventoFinanceiros, totalDebitosEventoFinanceiros, ocdTotal, totalBilhetesDevolvidosTroca, totalBilhetesGapDevolvidosTroca);
|
||||
|
@ -734,9 +753,9 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
private void carregarBilhetesManual(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
||||
if(isPeriodo){
|
||||
if (isPeriodo) {
|
||||
lsBilhetesManual = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.BOLETO_MANUAL, false);
|
||||
}else{
|
||||
} else {
|
||||
lsBilhetesManual = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETO_MANUAL, false);
|
||||
}
|
||||
totalBilhetesManual = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesManual);
|
||||
|
@ -748,9 +767,9 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
private void carregarBilhetesVendidos(List<BoletoComissao> boletosComissaos, boolean carregarDadosFaltantes) throws BusinessException {
|
||||
if(isPeriodo){
|
||||
if (isPeriodo) {
|
||||
lsBilhetes = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.BOLETOS_VENDIDOS, carregarDadosFaltantes);
|
||||
}else{
|
||||
} else {
|
||||
lsBilhetes = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETOS_VENDIDOS, carregarDadosFaltantes);
|
||||
}
|
||||
totalBilhetesVendidos = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetes);
|
||||
|
@ -762,9 +781,9 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
private void carregarBilhetesCancelados(List<BoletoComissao> boletosComissaos, boolean carregarDadosFaltantes) throws BusinessException {
|
||||
if(isPeriodo){
|
||||
if (isPeriodo) {
|
||||
lsBilhetesCancelados = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.BOLETO_CANCELADO, carregarDadosFaltantes);
|
||||
}else{
|
||||
} else {
|
||||
lsBilhetesCancelados = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETO_CANCELADO, carregarDadosFaltantes);
|
||||
}
|
||||
totalBilhetesCancelados = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesCancelados);
|
||||
|
@ -778,9 +797,9 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
private void carregarBilhetesDevolvidos(List<BoletoComissao> boletosComissaos, boolean carregarDadosFaltantes) throws BusinessException {
|
||||
totalBilhetesDevolvidos = BigDecimal.ZERO;
|
||||
|
||||
if(isPeriodo){
|
||||
if (isPeriodo) {
|
||||
lsBilhetesDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.BOLETO_DEVOLVIDO, carregarDadosFaltantes);
|
||||
}else{
|
||||
} else {
|
||||
lsBilhetesDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETO_DEVOLVIDO, carregarDadosFaltantes);
|
||||
}
|
||||
|
||||
|
@ -801,9 +820,9 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
private void carregarBilhetesGap(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
||||
if(isPeriodo){
|
||||
if (isPeriodo) {
|
||||
lsBilhetesGap = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.GAP_VENDIDOS, false);
|
||||
}else{
|
||||
} else {
|
||||
lsBilhetesGap = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.GAP_VENDIDOS, false);
|
||||
}
|
||||
|
||||
|
@ -816,9 +835,9 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
private void carregarBilhetesGapCancelados(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
||||
if(isPeriodo){
|
||||
if (isPeriodo) {
|
||||
lsBilhetesGapCancelados = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.GAP_CANCELADO, false);
|
||||
}else{
|
||||
} else {
|
||||
lsBilhetesGapCancelados = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.GAP_CANCELADO, false);
|
||||
}
|
||||
totalBilhetesGapCancelados = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesGapCancelados);
|
||||
|
@ -830,9 +849,9 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
private void carregarBilhetesGapDevolvidos(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
||||
if(isPeriodo){
|
||||
if (isPeriodo) {
|
||||
lsBilhetesGapDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.GAP_DEVOLVIDO, false);
|
||||
}else {
|
||||
} else {
|
||||
lsBilhetesGapDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.GAP_DEVOLVIDO, false);
|
||||
}
|
||||
|
||||
|
@ -855,7 +874,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
private void carregarLogsConferencia() throws BusinessException {
|
||||
if (isPeriodo) {
|
||||
List<LogConferenciaVO> temp = new ArrayList<LogConferenciaVO>();
|
||||
lsLogsConferencia = new ArrayList<LogConferenciaVO>();
|
||||
lsLogsConferencia = new ArrayList<LogConferenciaVO>();
|
||||
|
||||
for (Conferencia c : conferencias) {
|
||||
temp = conferenciaComissaoService.carregarLogConferencia(c);
|
||||
|
@ -871,17 +890,17 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
|
||||
private void carregarEventosFinanceiros(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
||||
|
||||
if(isPeriodo){
|
||||
if (isPeriodo) {
|
||||
List<EventosFinanceirosVO> temp = new ArrayList<EventosFinanceirosVO>();
|
||||
if(lsEventosFinanceiros == null){
|
||||
if (lsEventosFinanceiros == null) {
|
||||
lsEventosFinanceiros = new ArrayList<EventosFinanceirosVO>();
|
||||
}
|
||||
|
||||
for(Conferencia c : conferencias){
|
||||
for (Conferencia c : conferencias) {
|
||||
temp = conferenciaComissaoService.carregarEventosFinanceiros(c);
|
||||
lsEventosFinanceiros.addAll(temp);
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
lsEventosFinanceiros = conferenciaComissaoService.carregarEventosFinanceiros(conferencia);
|
||||
}
|
||||
|
||||
|
@ -909,8 +928,8 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
|
||||
if (isPeriodo) {
|
||||
List<OcdVO> temp = new ArrayList<OcdVO>();
|
||||
if(lsOcds == null){
|
||||
lsOcds = new ArrayList<OcdVO>();
|
||||
if (lsOcds == null) {
|
||||
lsOcds = new ArrayList<OcdVO>();
|
||||
}
|
||||
|
||||
for (Conferencia c : conferencias) {
|
||||
|
@ -934,13 +953,13 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
|
||||
public void onClick$btnChegadaMalote(Event event) throws InterruptedException {
|
||||
try {
|
||||
if(isPeriodo){
|
||||
for(Conferencia c : conferencias){
|
||||
if (isPeriodo) {
|
||||
for (Conferencia c : conferencias) {
|
||||
if (!isMaloteRecebido(c) && isMovimentoNaoEncerrado(c)) {
|
||||
conferenciaComissaoService.confirmarChegadaMalote(c);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
conferencia = conferenciaComissaoService.confirmarChegadaMalote(conferencia);
|
||||
}
|
||||
Messagebox.show(Labels.getLabel("conferenciaController.msg.confirmarChegadaMalote"),
|
||||
|
@ -957,8 +976,8 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
}
|
||||
}
|
||||
|
||||
public void onClick$btnCancelarChegada(Event event) throws InterruptedException{
|
||||
conferencia=conferenciaComissaoService.cancelarChegadaMalote(conferencia);
|
||||
public void onClick$btnCancelarChegada(Event event) throws InterruptedException {
|
||||
conferencia = conferenciaComissaoService.cancelarChegadaMalote(conferencia);
|
||||
|
||||
log.debug("Chegada de malote canelada com sucesso");
|
||||
Messagebox.show(Labels.getLabel("conferenciaController.msg.cancelarChegadaMalote"),
|
||||
|
@ -968,8 +987,6 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void onClick$btnEncerrarMovimentoDiario(Event event) throws InterruptedException {
|
||||
try {
|
||||
if (isConferenciaPendente()) {
|
||||
|
@ -999,24 +1016,6 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
Messagebox.OK, Messagebox.ERROR);
|
||||
}
|
||||
}
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void onClick$btnInformarIrregularidade() throws InterruptedException {
|
||||
List listNumSerie = ecfListBox.getSelectedModelItems();
|
||||
|
||||
if (listNumSerie.isEmpty()) {
|
||||
Messagebox.show(Labels.getLabel("conferenciaController.MSG.nenhumaNumeroSerieEcfSelecionado"),
|
||||
Labels.getLabel("conferenciaController.window.title"),
|
||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
return;
|
||||
}
|
||||
|
||||
Map<String, Object> args = new HashMap<String, Object>();
|
||||
args.put("puntoVentaId", puntoventaId);
|
||||
args.put("listNumSerie", listNumSerie);
|
||||
openWindow("/gui/comissao/informeIrregularidadeComissao.zul",
|
||||
Labels.getLabel("informeIrregularidadeController.window.title"), args);
|
||||
|
||||
}
|
||||
|
||||
private boolean isConferenciaPendente() throws InterruptedException, BusinessException {
|
||||
List<BoletoComissao> lsBoletoComissao = new ArrayList<BoletoComissao>();
|
||||
|
@ -1102,34 +1101,34 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
|
||||
conferencias = new ArrayList<Conferencia>();
|
||||
|
||||
if(conferenciaComissao.getDiasOrdenado() != null){
|
||||
for (DiaConferenciaComissaoVO d : conferenciaComissao.getDiasOrdenado()) {
|
||||
Conferencia conf = null;
|
||||
if (conferenciaComissao.getDiasOrdenado() != null) {
|
||||
for (DiaConferenciaComissaoVO d : conferenciaComissao.getDiasOrdenado()) {
|
||||
Conferencia conf = null;
|
||||
|
||||
if (d.getConferenciaId() != null) {
|
||||
conf = conferenciaComissaoService.obtenerID(d.getConferenciaId());
|
||||
if (d.getConferenciaId() != null) {
|
||||
conf = conferenciaComissaoService.obtenerID(d.getConferenciaId());
|
||||
}
|
||||
|
||||
if (conf == null) {
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(dataInicial);
|
||||
cal.set(Calendar.DAY_OF_MONTH, d.getDia());
|
||||
|
||||
conf = new Conferencia();
|
||||
conf.setActivo(Boolean.TRUE);
|
||||
conf.setFecmodif(new Date());
|
||||
conf.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
conf.setEmpresa(empresa);
|
||||
conf.setPuntoVenta(new PuntoVenta(puntoventaId));
|
||||
conf.setDatamovimento(cal.getTime());
|
||||
}
|
||||
conferencias.add(conf);
|
||||
}
|
||||
|
||||
if (conf == null) {
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTime(dataInicial);
|
||||
cal.set(Calendar.DAY_OF_MONTH, d.getDia());
|
||||
|
||||
conf = new Conferencia();
|
||||
conf.setActivo(Boolean.TRUE);
|
||||
conf.setFecmodif(new Date());
|
||||
conf.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
conf.setEmpresa(empresa);
|
||||
conf.setPuntoVenta(new PuntoVenta(puntoventaId));
|
||||
conf.setDatamovimento(cal.getTime());
|
||||
}
|
||||
conferencias.add(conf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Short getDebitoCreditoInfo(){
|
||||
if(rCredito.isSelected()){
|
||||
private Short getDebitoCreditoInfo() {
|
||||
if (rCredito.isSelected()) {
|
||||
return (short) 1;
|
||||
} else if (rDebito.isSelected()) {
|
||||
return (short) 0;
|
||||
|
@ -1145,9 +1144,9 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
LogConferencia logConferencia = new LogConferencia();
|
||||
logConferencia.setPreco(txtPrecoLog.getValueDecimal());
|
||||
logConferencia.setObservacao(txtObservacaoLog.getValue());
|
||||
if(isPeriodo){
|
||||
if (isPeriodo) {
|
||||
logConferencia.setConferencia((Conferencia) cmbConferenciaDia.getSelectedItem().getValue());
|
||||
}else{
|
||||
} else {
|
||||
logConferencia.setConferencia(conferencia);
|
||||
}
|
||||
logConferencia.setStatus(StatusLogConferencia.getStatusLogConferencia((Integer) cmbSituacaoLog.getSelectedItem().getValue()));
|
||||
|
@ -1186,25 +1185,25 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
private boolean validarCamposObservacao() throws InterruptedException {
|
||||
try{
|
||||
txtObservacaoLog.getValue();
|
||||
}catch(Exception e){
|
||||
Messagebox.show(Labels.getLabel("conferenciaController.MSG.observacaoObrigatorio"),
|
||||
Labels.getLabel("conferenciaController.window.title"),
|
||||
Messagebox.OK,Messagebox.ERROR);
|
||||
return false;
|
||||
}
|
||||
try{
|
||||
if(rInformativo.isSelected() && cmbTipoInformativo.getValue() == null){
|
||||
return false;
|
||||
}
|
||||
|
||||
//validação do campo com o getValue, se tentar recuperar o valor em string é lançada exceção
|
||||
try {
|
||||
txtObservacaoLog.getValue();
|
||||
} catch (Exception e) {
|
||||
Messagebox.show(Labels.getLabel("conferenciaController.MSG.observacaoObrigatorio"),
|
||||
Labels.getLabel("conferenciaController.window.title"),
|
||||
Messagebox.OK,Messagebox.INFORMATION);
|
||||
Messagebox.OK, Messagebox.ERROR);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
if (rInformativo.isSelected() && cmbTipoInformativo.getValue() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// validação do campo com o getValue, se tentar recuperar o valor em string é lançada exceção
|
||||
txtObservacaoLog.getValue();
|
||||
} catch (Exception e) {
|
||||
Messagebox.show(Labels.getLabel("conferenciaController.MSG.observacaoObrigatorio"),
|
||||
Labels.getLabel("conferenciaController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1219,11 +1218,11 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
return false;
|
||||
}
|
||||
|
||||
if(isPeriodo
|
||||
&& cmbConferenciaDia.getSelectedItem() == null){
|
||||
if (isPeriodo
|
||||
&& cmbConferenciaDia.getSelectedItem() == null) {
|
||||
Messagebox.show(Labels.getLabel("conferenciaController.MSG.tipoInfomativoObrigatorio"),
|
||||
Labels.getLabel("conferenciaController.window.title"),
|
||||
Messagebox.OK,Messagebox.ERROR);
|
||||
Messagebox.OK, Messagebox.ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1307,7 +1306,8 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
|
||||
@SuppressWarnings("unchecked")
|
||||
private boolean isObservacaoLancada(BoletoComissao boletoComissao) {
|
||||
for (LogConferenciaVO logConferencia : (List<LogConferenciaVO>)logsConferenciaList.getListData()) { ;
|
||||
for (LogConferenciaVO logConferencia : (List<LogConferenciaVO>) logsConferenciaList.getListData()) {
|
||||
;
|
||||
if (boletoComissao.getCajaId().equals(logConferencia.getCajaId())) {
|
||||
return true;
|
||||
}
|
||||
|
@ -1346,8 +1346,8 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
diaConferenciaComissaoAux.setIndsemmovimento(diaConferenciaComissao.getIndsemmovimento());
|
||||
}
|
||||
}
|
||||
if(conferenciaList != null){
|
||||
conferenciaList.updateItem(conferenciaComissao);
|
||||
if (conferenciaList != null) {
|
||||
conferenciaList.updateItem(conferenciaComissao);
|
||||
}
|
||||
}
|
||||
} catch (BusinessException e) {
|
||||
|
@ -1359,7 +1359,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
try {
|
||||
if (isPeriodo) {
|
||||
lsBilhetesDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(null, conferencias, BoletoStatusComissao.BOLETO_DEVOLVIDO, false);
|
||||
}else{
|
||||
} else {
|
||||
lsBilhetesDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(null, conferencia, BoletoStatusComissao.BOLETO_DEVOLVIDO, false);
|
||||
}
|
||||
|
||||
|
@ -1410,7 +1410,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
return conferencia.getIndconferido() == null || !conferencia.getIndconferido();
|
||||
}
|
||||
|
||||
public Boolean isMovimentoNaoEncerrado(Conferencia c){
|
||||
public Boolean isMovimentoNaoEncerrado(Conferencia c) {
|
||||
return c.getIndconferido() == null || !c.getIndconferido();
|
||||
}
|
||||
|
||||
|
@ -1443,13 +1443,14 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private Boolean exibirBtnLogPeriodo = true;
|
||||
|
||||
public Boolean isExibirBotaoLancamentoObservacao() {
|
||||
if(isPeriodo){
|
||||
//caso Periodo, a validação é feita no combo de dias de conferencia
|
||||
if (isPeriodo) {
|
||||
// caso Periodo, a validação é feita no combo de dias de conferencia
|
||||
return exibirBtnLogPeriodo;
|
||||
}else{
|
||||
} else {
|
||||
return !isMovimentoEncerrado() && (isMaloteRecebido() || !isNaopermiteconfsemmalote());
|
||||
}
|
||||
}
|
||||
|
@ -1483,14 +1484,14 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
private Boolean isMaloteRecebido() {
|
||||
if(conferencia != null) {
|
||||
if (conferencia != null) {
|
||||
return conferencia.getIndmaloterecebido() != null && conferencia.getIndmaloterecebido();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private Boolean isMaloteRecebido(Conferencia c){
|
||||
if(c != null) {
|
||||
private Boolean isMaloteRecebido(Conferencia c) {
|
||||
if (c != null) {
|
||||
return c.getIndmaloterecebido() != null && c.getIndmaloterecebido();
|
||||
}
|
||||
return false;
|
||||
|
@ -1533,9 +1534,9 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
LogConferencia logConferencia = new LogConferencia();
|
||||
logConferencia.setObservacao("OK");
|
||||
|
||||
if(isPeriodo){
|
||||
if (isPeriodo) {
|
||||
logConferencia.setConferencia(c);
|
||||
}else{
|
||||
} else {
|
||||
logConferencia.setConferencia(conferencia);
|
||||
}
|
||||
|
||||
|
@ -1582,7 +1583,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
@SuppressWarnings("unchecked")
|
||||
private void gravarLogConferenciaBilhete(MyListbox bilhetes, BoletoComissao boletoComissao, Tab tab, String label) {
|
||||
try {
|
||||
LogConferencia logConferencia = gravarLogConferencia(boletoComissao.getConferencia(),TipoLogConferencia.BOLETO, boletoComissao.getCajaId(), boletoComissao.getNumFolioSistema());
|
||||
LogConferencia logConferencia = gravarLogConferencia(boletoComissao.getConferencia(), TipoLogConferencia.BOLETO, boletoComissao.getCajaId(), boletoComissao.getNumFolioSistema());
|
||||
boletoComissao.setLogconferenciaId(logConferencia.getLogconferenciaId());
|
||||
boletoComissao.setStatus(logConferencia.getStatus().getValue());
|
||||
boletoComissao.setConferido(Boolean.TRUE);
|
||||
|
@ -1677,8 +1678,8 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
|
||||
@Override
|
||||
public void closeWindow() {
|
||||
if(!isPeriodo){
|
||||
carregarDadosConferencia();
|
||||
if (!isPeriodo) {
|
||||
carregarDadosConferencia();
|
||||
}
|
||||
super.closeWindow();
|
||||
}
|
||||
|
@ -1786,7 +1787,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
private boolean getEnableDisableCheckBox(Conferencia conferencia) {
|
||||
if(isPeriodo){
|
||||
if (isPeriodo) {
|
||||
return (isMovimentoEncerrado(conferencia) && isPermissaoReabrirMovimento() || !isMaloteRecebido(conferencia) && isNaopermiteconfsemmalote());
|
||||
}
|
||||
return isExibirBotaoReabrirMovimento() || (!isMaloteRecebido() && isNaopermiteconfsemmalote());
|
||||
|
|
|
@ -24,11 +24,10 @@
|
|||
image="/gui/img/confirmar_chegada.png" width="35px"
|
||||
tooltiptext="${c:l('conferenciaController.btnChegadaMalote.tooltiptext')}"
|
||||
visible="@{winConferencia$composer.exibirBotaoChegadaMalote}" />
|
||||
<button id="btnCancelarChegada"
|
||||
width="35px"
|
||||
<button id="btnCancelarChegada" width="35px"
|
||||
image="/gui/img/cancel.png"
|
||||
tooltiptext="${c:l('conferenciaController.btnCancelarChegada.tooltiptext')}"
|
||||
visible="@{winConferencia$composer.exibirBotaoCancelarChegadaMalote}"/>
|
||||
tooltiptext="${c:l('conferenciaController.btnCancelarChegada.tooltiptext')}"
|
||||
visible="@{winConferencia$composer.exibirBotaoCancelarChegadaMalote}" />
|
||||
<button id="btnEncerrarMovimentoDiario"
|
||||
image="/gui/img/encerrar.png" width="35px"
|
||||
tooltiptext="${c:l('conferenciaController.btnEncerrarMovimentoDiario.tooltiptext')}"
|
||||
|
@ -185,7 +184,6 @@
|
|||
<vbox>
|
||||
<label style="font-weight:bold;"
|
||||
value="${c:l('conferenciaController.lhTotalFormapago')}" />
|
||||
|
||||
<listbox id="formapagosList"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
vflex="true" multiple="false" height="290px">
|
||||
|
@ -206,19 +204,17 @@
|
|||
<hbox>
|
||||
<label style="font-weight:bold;"
|
||||
value="${c:l('conferenciaController.lbImpressorasFiscais')}" />
|
||||
|
||||
<button id="btnInformarIrregularidade"
|
||||
style="margin-left: 205px;" width="225px" height="25px"
|
||||
label="${c:l('conferenciaController.lbBtnIrregularidade.label')}" />
|
||||
</hbox>
|
||||
|
||||
<listbox id="ecfListBox"
|
||||
<listbox id="ecfListBox" height="290px"
|
||||
sizedByContent="false"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
vflex="true" multiple="true" height="290px">
|
||||
multiple="false">
|
||||
<listhead sizable="true">
|
||||
<listheader
|
||||
image="/gui/img/builder.gif"
|
||||
label="${c:l('conferenciaController.lblNumSerieECF')}" />
|
||||
<listheader
|
||||
label="${c:l('conferenciaController.lbBtnIrregularidade.label')}" />
|
||||
</listhead>
|
||||
</listbox>
|
||||
</vbox>
|
||||
|
@ -1016,11 +1012,13 @@
|
|||
<column width="40%" />
|
||||
</columns>
|
||||
<rows>
|
||||
<row visible="false" id="rowDataMovimento">
|
||||
<label value="${c:l('conferenciaController.lbDatamovimento2.label')}" />
|
||||
<row visible="false"
|
||||
id="rowDataMovimento">
|
||||
<label
|
||||
value="${c:l('conferenciaController.lbDatamovimento2.label')}" />
|
||||
<combobox id="cmbConferenciaDia"
|
||||
width="70%" mold="rounded" buttonVisible="true"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"/>
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" />
|
||||
</row>
|
||||
|
||||
<row>
|
||||
|
|
Loading…
Reference in New Issue