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
|
@Override
|
||||||
public void doAfterCompose(Component comp) throws Exception {
|
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");
|
dataInicial = (Date) Executions.getCurrent().getArg().get("dataInicial");
|
||||||
dataFinal = (Date) Executions.getCurrent().getArg().get("dataFinal");
|
dataFinal = (Date) Executions.getCurrent().getArg().get("dataFinal");
|
||||||
|
|
||||||
SimpleDateFormat formato = new SimpleDateFormat("dd/MM/yyyy");
|
SimpleDateFormat formato = new SimpleDateFormat("dd/MM/yyyy");
|
||||||
datamovimento = formato.format(dataInicial) + " - " + formato.format(dataFinal);
|
datamovimento = formato.format(dataInicial) + " - " + formato.format(dataFinal);
|
||||||
}else{
|
} else {
|
||||||
datamovimento = (String) Executions.getCurrent().getArg().get("datamovimento");
|
datamovimento = (String) Executions.getCurrent().getArg().get("datamovimento");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,11 +233,11 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
lsConferenciaPendencia.add(new ConferenciaPendencia(-1, " "));
|
lsConferenciaPendencia.add(new ConferenciaPendencia(-1, " "));
|
||||||
lsConferenciaPendencia.addAll(conferenciaPendenciaService.obtenerTodos());
|
lsConferenciaPendencia.addAll(conferenciaPendenciaService.obtenerTodos());
|
||||||
|
|
||||||
if(isPeriodo){
|
if (isPeriodo) {
|
||||||
dataInicial = (Date) Executions.getCurrent().getArg().get("dataInicial");
|
dataInicial = (Date) Executions.getCurrent().getArg().get("dataInicial");
|
||||||
dataFinal = (Date) Executions.getCurrent().getArg().get("dataFinal");
|
dataFinal = (Date) Executions.getCurrent().getArg().get("dataFinal");
|
||||||
recuperarConferencias(conferenciaComissao);
|
recuperarConferencias(conferenciaComissao);
|
||||||
}else{
|
} else {
|
||||||
Long conferenciaId = (Long) Executions.getCurrent().getArg().get("conferenciaId");
|
Long conferenciaId = (Long) Executions.getCurrent().getArg().get("conferenciaId");
|
||||||
recuperarConferencia(conferenciaId);
|
recuperarConferencia(conferenciaId);
|
||||||
}
|
}
|
||||||
|
@ -357,10 +357,29 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
carregarDados();
|
carregarDados();
|
||||||
|
|
||||||
ecfListBox.setItemRenderer(new RenderEcfPontoVenda());
|
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() {
|
private void ajustarListsBilhetes() {
|
||||||
bilhetesManualList.setItemRenderer(new RenderBoletoComissao() {
|
bilhetesManualList.setItemRenderer(new RenderBoletoComissao() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -723,7 +742,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
private void carregarResumo(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
private void carregarResumo(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
||||||
if (isPeriodo) {
|
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);
|
resumo = conferenciaComissaoService.gerarResumo(conferencias.isEmpty() ? null : conferencias.get(0), boletosComissaos, lsEventosFinanceiros, totalBilhetesManual, totalBilhetesVendidos, totalBilhetesCancelados, totalBilhetesDevolvidos, totalBilhetesGap, totalBilhetesGapCancelados, totalBilhetesGapDevolvidos, totalCreditosEventoFinanceiros, totalDebitosEventoFinanceiros, ocdTotal, totalBilhetesDevolvidosTroca, totalBilhetesGapDevolvidosTroca);
|
||||||
} else {
|
} else {
|
||||||
resumo = conferenciaComissaoService.gerarResumo(conferencia, boletosComissaos, lsEventosFinanceiros, totalBilhetesManual, totalBilhetesVendidos, totalBilhetesCancelados, totalBilhetesDevolvidos, totalBilhetesGap, totalBilhetesGapCancelados, totalBilhetesGapDevolvidos, totalCreditosEventoFinanceiros, totalDebitosEventoFinanceiros, ocdTotal, totalBilhetesDevolvidosTroca, totalBilhetesGapDevolvidosTroca);
|
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 {
|
private void carregarBilhetesManual(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
||||||
if(isPeriodo){
|
if (isPeriodo) {
|
||||||
lsBilhetesManual = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.BOLETO_MANUAL, false);
|
lsBilhetesManual = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.BOLETO_MANUAL, false);
|
||||||
}else{
|
} else {
|
||||||
lsBilhetesManual = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETO_MANUAL, false);
|
lsBilhetesManual = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETO_MANUAL, false);
|
||||||
}
|
}
|
||||||
totalBilhetesManual = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesManual);
|
totalBilhetesManual = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesManual);
|
||||||
|
@ -748,9 +767,9 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void carregarBilhetesVendidos(List<BoletoComissao> boletosComissaos, boolean carregarDadosFaltantes) throws BusinessException {
|
private void carregarBilhetesVendidos(List<BoletoComissao> boletosComissaos, boolean carregarDadosFaltantes) throws BusinessException {
|
||||||
if(isPeriodo){
|
if (isPeriodo) {
|
||||||
lsBilhetes = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.BOLETOS_VENDIDOS, carregarDadosFaltantes);
|
lsBilhetes = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.BOLETOS_VENDIDOS, carregarDadosFaltantes);
|
||||||
}else{
|
} else {
|
||||||
lsBilhetes = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETOS_VENDIDOS, carregarDadosFaltantes);
|
lsBilhetes = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETOS_VENDIDOS, carregarDadosFaltantes);
|
||||||
}
|
}
|
||||||
totalBilhetesVendidos = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetes);
|
totalBilhetesVendidos = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetes);
|
||||||
|
@ -762,9 +781,9 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void carregarBilhetesCancelados(List<BoletoComissao> boletosComissaos, boolean carregarDadosFaltantes) throws BusinessException {
|
private void carregarBilhetesCancelados(List<BoletoComissao> boletosComissaos, boolean carregarDadosFaltantes) throws BusinessException {
|
||||||
if(isPeriodo){
|
if (isPeriodo) {
|
||||||
lsBilhetesCancelados = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.BOLETO_CANCELADO, carregarDadosFaltantes);
|
lsBilhetesCancelados = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.BOLETO_CANCELADO, carregarDadosFaltantes);
|
||||||
}else{
|
} else {
|
||||||
lsBilhetesCancelados = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETO_CANCELADO, carregarDadosFaltantes);
|
lsBilhetesCancelados = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETO_CANCELADO, carregarDadosFaltantes);
|
||||||
}
|
}
|
||||||
totalBilhetesCancelados = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesCancelados);
|
totalBilhetesCancelados = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesCancelados);
|
||||||
|
@ -778,9 +797,9 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
private void carregarBilhetesDevolvidos(List<BoletoComissao> boletosComissaos, boolean carregarDadosFaltantes) throws BusinessException {
|
private void carregarBilhetesDevolvidos(List<BoletoComissao> boletosComissaos, boolean carregarDadosFaltantes) throws BusinessException {
|
||||||
totalBilhetesDevolvidos = BigDecimal.ZERO;
|
totalBilhetesDevolvidos = BigDecimal.ZERO;
|
||||||
|
|
||||||
if(isPeriodo){
|
if (isPeriodo) {
|
||||||
lsBilhetesDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.BOLETO_DEVOLVIDO, carregarDadosFaltantes);
|
lsBilhetesDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.BOLETO_DEVOLVIDO, carregarDadosFaltantes);
|
||||||
}else{
|
} else {
|
||||||
lsBilhetesDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETO_DEVOLVIDO, carregarDadosFaltantes);
|
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 {
|
private void carregarBilhetesGap(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
||||||
if(isPeriodo){
|
if (isPeriodo) {
|
||||||
lsBilhetesGap = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.GAP_VENDIDOS, false);
|
lsBilhetesGap = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.GAP_VENDIDOS, false);
|
||||||
}else{
|
} else {
|
||||||
lsBilhetesGap = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.GAP_VENDIDOS, false);
|
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 {
|
private void carregarBilhetesGapCancelados(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
||||||
if(isPeriodo){
|
if (isPeriodo) {
|
||||||
lsBilhetesGapCancelados = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.GAP_CANCELADO, false);
|
lsBilhetesGapCancelados = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.GAP_CANCELADO, false);
|
||||||
}else{
|
} else {
|
||||||
lsBilhetesGapCancelados = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.GAP_CANCELADO, false);
|
lsBilhetesGapCancelados = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.GAP_CANCELADO, false);
|
||||||
}
|
}
|
||||||
totalBilhetesGapCancelados = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesGapCancelados);
|
totalBilhetesGapCancelados = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesGapCancelados);
|
||||||
|
@ -830,9 +849,9 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void carregarBilhetesGapDevolvidos(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
private void carregarBilhetesGapDevolvidos(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
||||||
if(isPeriodo){
|
if (isPeriodo) {
|
||||||
lsBilhetesGapDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.GAP_DEVOLVIDO, false);
|
lsBilhetesGapDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencias, BoletoStatusComissao.GAP_DEVOLVIDO, false);
|
||||||
}else {
|
} else {
|
||||||
lsBilhetesGapDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.GAP_DEVOLVIDO, false);
|
lsBilhetesGapDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.GAP_DEVOLVIDO, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -855,7 +874,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
private void carregarLogsConferencia() throws BusinessException {
|
private void carregarLogsConferencia() throws BusinessException {
|
||||||
if (isPeriodo) {
|
if (isPeriodo) {
|
||||||
List<LogConferenciaVO> temp = new ArrayList<LogConferenciaVO>();
|
List<LogConferenciaVO> temp = new ArrayList<LogConferenciaVO>();
|
||||||
lsLogsConferencia = new ArrayList<LogConferenciaVO>();
|
lsLogsConferencia = new ArrayList<LogConferenciaVO>();
|
||||||
|
|
||||||
for (Conferencia c : conferencias) {
|
for (Conferencia c : conferencias) {
|
||||||
temp = conferenciaComissaoService.carregarLogConferencia(c);
|
temp = conferenciaComissaoService.carregarLogConferencia(c);
|
||||||
|
@ -871,17 +890,17 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
private void carregarEventosFinanceiros(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
private void carregarEventosFinanceiros(List<BoletoComissao> boletosComissaos) throws BusinessException {
|
||||||
|
|
||||||
if(isPeriodo){
|
if (isPeriodo) {
|
||||||
List<EventosFinanceirosVO> temp = new ArrayList<EventosFinanceirosVO>();
|
List<EventosFinanceirosVO> temp = new ArrayList<EventosFinanceirosVO>();
|
||||||
if(lsEventosFinanceiros == null){
|
if (lsEventosFinanceiros == null) {
|
||||||
lsEventosFinanceiros = new ArrayList<EventosFinanceirosVO>();
|
lsEventosFinanceiros = new ArrayList<EventosFinanceirosVO>();
|
||||||
}
|
}
|
||||||
|
|
||||||
for(Conferencia c : conferencias){
|
for (Conferencia c : conferencias) {
|
||||||
temp = conferenciaComissaoService.carregarEventosFinanceiros(c);
|
temp = conferenciaComissaoService.carregarEventosFinanceiros(c);
|
||||||
lsEventosFinanceiros.addAll(temp);
|
lsEventosFinanceiros.addAll(temp);
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
lsEventosFinanceiros = conferenciaComissaoService.carregarEventosFinanceiros(conferencia);
|
lsEventosFinanceiros = conferenciaComissaoService.carregarEventosFinanceiros(conferencia);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -909,8 +928,8 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
if (isPeriodo) {
|
if (isPeriodo) {
|
||||||
List<OcdVO> temp = new ArrayList<OcdVO>();
|
List<OcdVO> temp = new ArrayList<OcdVO>();
|
||||||
if(lsOcds == null){
|
if (lsOcds == null) {
|
||||||
lsOcds = new ArrayList<OcdVO>();
|
lsOcds = new ArrayList<OcdVO>();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Conferencia c : conferencias) {
|
for (Conferencia c : conferencias) {
|
||||||
|
@ -934,13 +953,13 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
public void onClick$btnChegadaMalote(Event event) throws InterruptedException {
|
public void onClick$btnChegadaMalote(Event event) throws InterruptedException {
|
||||||
try {
|
try {
|
||||||
if(isPeriodo){
|
if (isPeriodo) {
|
||||||
for(Conferencia c : conferencias){
|
for (Conferencia c : conferencias) {
|
||||||
if (!isMaloteRecebido(c) && isMovimentoNaoEncerrado(c)) {
|
if (!isMaloteRecebido(c) && isMovimentoNaoEncerrado(c)) {
|
||||||
conferenciaComissaoService.confirmarChegadaMalote(c);
|
conferenciaComissaoService.confirmarChegadaMalote(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
conferencia = conferenciaComissaoService.confirmarChegadaMalote(conferencia);
|
conferencia = conferenciaComissaoService.confirmarChegadaMalote(conferencia);
|
||||||
}
|
}
|
||||||
Messagebox.show(Labels.getLabel("conferenciaController.msg.confirmarChegadaMalote"),
|
Messagebox.show(Labels.getLabel("conferenciaController.msg.confirmarChegadaMalote"),
|
||||||
|
@ -957,8 +976,8 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnCancelarChegada(Event event) throws InterruptedException{
|
public void onClick$btnCancelarChegada(Event event) throws InterruptedException {
|
||||||
conferencia=conferenciaComissaoService.cancelarChegadaMalote(conferencia);
|
conferencia = conferenciaComissaoService.cancelarChegadaMalote(conferencia);
|
||||||
|
|
||||||
log.debug("Chegada de malote canelada com sucesso");
|
log.debug("Chegada de malote canelada com sucesso");
|
||||||
Messagebox.show(Labels.getLabel("conferenciaController.msg.cancelarChegadaMalote"),
|
Messagebox.show(Labels.getLabel("conferenciaController.msg.cancelarChegadaMalote"),
|
||||||
|
@ -968,8 +987,6 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void onClick$btnEncerrarMovimentoDiario(Event event) throws InterruptedException {
|
public void onClick$btnEncerrarMovimentoDiario(Event event) throws InterruptedException {
|
||||||
try {
|
try {
|
||||||
if (isConferenciaPendente()) {
|
if (isConferenciaPendente()) {
|
||||||
|
@ -999,24 +1016,6 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
Messagebox.OK, Messagebox.ERROR);
|
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 {
|
private boolean isConferenciaPendente() throws InterruptedException, BusinessException {
|
||||||
List<BoletoComissao> lsBoletoComissao = new ArrayList<BoletoComissao>();
|
List<BoletoComissao> lsBoletoComissao = new ArrayList<BoletoComissao>();
|
||||||
|
@ -1102,34 +1101,34 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
conferencias = new ArrayList<Conferencia>();
|
conferencias = new ArrayList<Conferencia>();
|
||||||
|
|
||||||
if(conferenciaComissao.getDiasOrdenado() != null){
|
if (conferenciaComissao.getDiasOrdenado() != null) {
|
||||||
for (DiaConferenciaComissaoVO d : conferenciaComissao.getDiasOrdenado()) {
|
for (DiaConferenciaComissaoVO d : conferenciaComissao.getDiasOrdenado()) {
|
||||||
Conferencia conf = null;
|
Conferencia conf = null;
|
||||||
|
|
||||||
if (d.getConferenciaId() != null) {
|
if (d.getConferenciaId() != null) {
|
||||||
conf = conferenciaComissaoService.obtenerID(d.getConferenciaId());
|
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(){
|
private Short getDebitoCreditoInfo() {
|
||||||
if(rCredito.isSelected()){
|
if (rCredito.isSelected()) {
|
||||||
return (short) 1;
|
return (short) 1;
|
||||||
} else if (rDebito.isSelected()) {
|
} else if (rDebito.isSelected()) {
|
||||||
return (short) 0;
|
return (short) 0;
|
||||||
|
@ -1145,9 +1144,9 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
LogConferencia logConferencia = new LogConferencia();
|
LogConferencia logConferencia = new LogConferencia();
|
||||||
logConferencia.setPreco(txtPrecoLog.getValueDecimal());
|
logConferencia.setPreco(txtPrecoLog.getValueDecimal());
|
||||||
logConferencia.setObservacao(txtObservacaoLog.getValue());
|
logConferencia.setObservacao(txtObservacaoLog.getValue());
|
||||||
if(isPeriodo){
|
if (isPeriodo) {
|
||||||
logConferencia.setConferencia((Conferencia) cmbConferenciaDia.getSelectedItem().getValue());
|
logConferencia.setConferencia((Conferencia) cmbConferenciaDia.getSelectedItem().getValue());
|
||||||
}else{
|
} else {
|
||||||
logConferencia.setConferencia(conferencia);
|
logConferencia.setConferencia(conferencia);
|
||||||
}
|
}
|
||||||
logConferencia.setStatus(StatusLogConferencia.getStatusLogConferencia((Integer) cmbSituacaoLog.getSelectedItem().getValue()));
|
logConferencia.setStatus(StatusLogConferencia.getStatusLogConferencia((Integer) cmbSituacaoLog.getSelectedItem().getValue()));
|
||||||
|
@ -1186,25 +1185,25 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean validarCamposObservacao() throws InterruptedException {
|
private boolean validarCamposObservacao() throws InterruptedException {
|
||||||
try{
|
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
|
|
||||||
txtObservacaoLog.getValue();
|
txtObservacaoLog.getValue();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Messagebox.show(Labels.getLabel("conferenciaController.MSG.observacaoObrigatorio"),
|
Messagebox.show(Labels.getLabel("conferenciaController.MSG.observacaoObrigatorio"),
|
||||||
Labels.getLabel("conferenciaController.window.title"),
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1219,11 +1218,11 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isPeriodo
|
if (isPeriodo
|
||||||
&& cmbConferenciaDia.getSelectedItem() == null){
|
&& cmbConferenciaDia.getSelectedItem() == null) {
|
||||||
Messagebox.show(Labels.getLabel("conferenciaController.MSG.tipoInfomativoObrigatorio"),
|
Messagebox.show(Labels.getLabel("conferenciaController.MSG.tipoInfomativoObrigatorio"),
|
||||||
Labels.getLabel("conferenciaController.window.title"),
|
Labels.getLabel("conferenciaController.window.title"),
|
||||||
Messagebox.OK,Messagebox.ERROR);
|
Messagebox.OK, Messagebox.ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1307,7 +1306,8 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private boolean isObservacaoLancada(BoletoComissao boletoComissao) {
|
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())) {
|
if (boletoComissao.getCajaId().equals(logConferencia.getCajaId())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1346,8 +1346,8 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
diaConferenciaComissaoAux.setIndsemmovimento(diaConferenciaComissao.getIndsemmovimento());
|
diaConferenciaComissaoAux.setIndsemmovimento(diaConferenciaComissao.getIndsemmovimento());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(conferenciaList != null){
|
if (conferenciaList != null) {
|
||||||
conferenciaList.updateItem(conferenciaComissao);
|
conferenciaList.updateItem(conferenciaComissao);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (BusinessException e) {
|
} catch (BusinessException e) {
|
||||||
|
@ -1359,7 +1359,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
try {
|
try {
|
||||||
if (isPeriodo) {
|
if (isPeriodo) {
|
||||||
lsBilhetesDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(null, conferencias, BoletoStatusComissao.BOLETO_DEVOLVIDO, false);
|
lsBilhetesDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(null, conferencias, BoletoStatusComissao.BOLETO_DEVOLVIDO, false);
|
||||||
}else{
|
} else {
|
||||||
lsBilhetesDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(null, conferencia, BoletoStatusComissao.BOLETO_DEVOLVIDO, false);
|
lsBilhetesDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(null, conferencia, BoletoStatusComissao.BOLETO_DEVOLVIDO, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1410,7 +1410,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
return conferencia.getIndconferido() == null || !conferencia.getIndconferido();
|
return conferencia.getIndconferido() == null || !conferencia.getIndconferido();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean isMovimentoNaoEncerrado(Conferencia c){
|
public Boolean isMovimentoNaoEncerrado(Conferencia c) {
|
||||||
return c.getIndconferido() == null || !c.getIndconferido();
|
return c.getIndconferido() == null || !c.getIndconferido();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1443,13 +1443,14 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Boolean exibirBtnLogPeriodo = true;
|
private Boolean exibirBtnLogPeriodo = true;
|
||||||
|
|
||||||
public Boolean isExibirBotaoLancamentoObservacao() {
|
public Boolean isExibirBotaoLancamentoObservacao() {
|
||||||
if(isPeriodo){
|
if (isPeriodo) {
|
||||||
//caso Periodo, a validação é feita no combo de dias de conferencia
|
// caso Periodo, a validação é feita no combo de dias de conferencia
|
||||||
return exibirBtnLogPeriodo;
|
return exibirBtnLogPeriodo;
|
||||||
}else{
|
} else {
|
||||||
return !isMovimentoEncerrado() && (isMaloteRecebido() || !isNaopermiteconfsemmalote());
|
return !isMovimentoEncerrado() && (isMaloteRecebido() || !isNaopermiteconfsemmalote());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1483,14 +1484,14 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Boolean isMaloteRecebido() {
|
private Boolean isMaloteRecebido() {
|
||||||
if(conferencia != null) {
|
if (conferencia != null) {
|
||||||
return conferencia.getIndmaloterecebido() != null && conferencia.getIndmaloterecebido();
|
return conferencia.getIndmaloterecebido() != null && conferencia.getIndmaloterecebido();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Boolean isMaloteRecebido(Conferencia c){
|
private Boolean isMaloteRecebido(Conferencia c) {
|
||||||
if(c != null) {
|
if (c != null) {
|
||||||
return c.getIndmaloterecebido() != null && c.getIndmaloterecebido();
|
return c.getIndmaloterecebido() != null && c.getIndmaloterecebido();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -1533,9 +1534,9 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
LogConferencia logConferencia = new LogConferencia();
|
LogConferencia logConferencia = new LogConferencia();
|
||||||
logConferencia.setObservacao("OK");
|
logConferencia.setObservacao("OK");
|
||||||
|
|
||||||
if(isPeriodo){
|
if (isPeriodo) {
|
||||||
logConferencia.setConferencia(c);
|
logConferencia.setConferencia(c);
|
||||||
}else{
|
} else {
|
||||||
logConferencia.setConferencia(conferencia);
|
logConferencia.setConferencia(conferencia);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1582,7 +1583,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private void gravarLogConferenciaBilhete(MyListbox bilhetes, BoletoComissao boletoComissao, Tab tab, String label) {
|
private void gravarLogConferenciaBilhete(MyListbox bilhetes, BoletoComissao boletoComissao, Tab tab, String label) {
|
||||||
try {
|
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.setLogconferenciaId(logConferencia.getLogconferenciaId());
|
||||||
boletoComissao.setStatus(logConferencia.getStatus().getValue());
|
boletoComissao.setStatus(logConferencia.getStatus().getValue());
|
||||||
boletoComissao.setConferido(Boolean.TRUE);
|
boletoComissao.setConferido(Boolean.TRUE);
|
||||||
|
@ -1677,8 +1678,8 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void closeWindow() {
|
public void closeWindow() {
|
||||||
if(!isPeriodo){
|
if (!isPeriodo) {
|
||||||
carregarDadosConferencia();
|
carregarDadosConferencia();
|
||||||
}
|
}
|
||||||
super.closeWindow();
|
super.closeWindow();
|
||||||
}
|
}
|
||||||
|
@ -1786,7 +1787,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean getEnableDisableCheckBox(Conferencia conferencia) {
|
private boolean getEnableDisableCheckBox(Conferencia conferencia) {
|
||||||
if(isPeriodo){
|
if (isPeriodo) {
|
||||||
return (isMovimentoEncerrado(conferencia) && isPermissaoReabrirMovimento() || !isMaloteRecebido(conferencia) && isNaopermiteconfsemmalote());
|
return (isMovimentoEncerrado(conferencia) && isPermissaoReabrirMovimento() || !isMaloteRecebido(conferencia) && isNaopermiteconfsemmalote());
|
||||||
}
|
}
|
||||||
return isExibirBotaoReabrirMovimento() || (!isMaloteRecebido() && isNaopermiteconfsemmalote());
|
return isExibirBotaoReabrirMovimento() || (!isMaloteRecebido() && isNaopermiteconfsemmalote());
|
||||||
|
|
|
@ -24,11 +24,10 @@
|
||||||
image="/gui/img/confirmar_chegada.png" width="35px"
|
image="/gui/img/confirmar_chegada.png" width="35px"
|
||||||
tooltiptext="${c:l('conferenciaController.btnChegadaMalote.tooltiptext')}"
|
tooltiptext="${c:l('conferenciaController.btnChegadaMalote.tooltiptext')}"
|
||||||
visible="@{winConferencia$composer.exibirBotaoChegadaMalote}" />
|
visible="@{winConferencia$composer.exibirBotaoChegadaMalote}" />
|
||||||
<button id="btnCancelarChegada"
|
<button id="btnCancelarChegada" width="35px"
|
||||||
width="35px"
|
|
||||||
image="/gui/img/cancel.png"
|
image="/gui/img/cancel.png"
|
||||||
tooltiptext="${c:l('conferenciaController.btnCancelarChegada.tooltiptext')}"
|
tooltiptext="${c:l('conferenciaController.btnCancelarChegada.tooltiptext')}"
|
||||||
visible="@{winConferencia$composer.exibirBotaoCancelarChegadaMalote}"/>
|
visible="@{winConferencia$composer.exibirBotaoCancelarChegadaMalote}" />
|
||||||
<button id="btnEncerrarMovimentoDiario"
|
<button id="btnEncerrarMovimentoDiario"
|
||||||
image="/gui/img/encerrar.png" width="35px"
|
image="/gui/img/encerrar.png" width="35px"
|
||||||
tooltiptext="${c:l('conferenciaController.btnEncerrarMovimentoDiario.tooltiptext')}"
|
tooltiptext="${c:l('conferenciaController.btnEncerrarMovimentoDiario.tooltiptext')}"
|
||||||
|
@ -185,7 +184,6 @@
|
||||||
<vbox>
|
<vbox>
|
||||||
<label style="font-weight:bold;"
|
<label style="font-weight:bold;"
|
||||||
value="${c:l('conferenciaController.lhTotalFormapago')}" />
|
value="${c:l('conferenciaController.lhTotalFormapago')}" />
|
||||||
|
|
||||||
<listbox id="formapagosList"
|
<listbox id="formapagosList"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||||
vflex="true" multiple="false" height="290px">
|
vflex="true" multiple="false" height="290px">
|
||||||
|
@ -206,19 +204,17 @@
|
||||||
<hbox>
|
<hbox>
|
||||||
<label style="font-weight:bold;"
|
<label style="font-weight:bold;"
|
||||||
value="${c:l('conferenciaController.lbImpressorasFiscais')}" />
|
value="${c:l('conferenciaController.lbImpressorasFiscais')}" />
|
||||||
|
|
||||||
<button id="btnInformarIrregularidade"
|
|
||||||
style="margin-left: 205px;" width="225px" height="25px"
|
|
||||||
label="${c:l('conferenciaController.lbBtnIrregularidade.label')}" />
|
|
||||||
</hbox>
|
</hbox>
|
||||||
|
<listbox id="ecfListBox" height="290px"
|
||||||
<listbox id="ecfListBox"
|
sizedByContent="false"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||||
vflex="true" multiple="true" height="290px">
|
multiple="false">
|
||||||
<listhead sizable="true">
|
<listhead sizable="true">
|
||||||
<listheader
|
<listheader
|
||||||
image="/gui/img/builder.gif"
|
image="/gui/img/builder.gif"
|
||||||
label="${c:l('conferenciaController.lblNumSerieECF')}" />
|
label="${c:l('conferenciaController.lblNumSerieECF')}" />
|
||||||
|
<listheader
|
||||||
|
label="${c:l('conferenciaController.lbBtnIrregularidade.label')}" />
|
||||||
</listhead>
|
</listhead>
|
||||||
</listbox>
|
</listbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
|
@ -1016,11 +1012,13 @@
|
||||||
<column width="40%" />
|
<column width="40%" />
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row visible="false" id="rowDataMovimento">
|
<row visible="false"
|
||||||
<label value="${c:l('conferenciaController.lbDatamovimento2.label')}" />
|
id="rowDataMovimento">
|
||||||
|
<label
|
||||||
|
value="${c:l('conferenciaController.lbDatamovimento2.label')}" />
|
||||||
<combobox id="cmbConferenciaDia"
|
<combobox id="cmbConferenciaDia"
|
||||||
width="70%" mold="rounded" buttonVisible="true"
|
width="70%" mold="rounded" buttonVisible="true"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"/>
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" />
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
|
|
Loading…
Reference in New Issue