wilian 2016-02-12 20:25:26 +00:00
parent 5bac7e400c
commit a2e2e81c43
17 changed files with 747 additions and 172 deletions

View File

@ -18,7 +18,7 @@ import org.apache.log4j.Logger;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
import com.rjconsultores.ventaboletos.relatorios.utilitarios.SaidaRelatorio;
import com.rjconsultores.ventaboletos.web.utilerias.LocaleUtil;
import com.rjconsultores.ventaboletos.utilerias.LocaleUtil;
/**
* Implementação da classe abstrata de renderização acoplada a uma tecnologia de renderização especifica

View File

@ -24,9 +24,9 @@ import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
import com.rjconsultores.ventaboletos.enums.comissao.CoresConferencia;
import com.rjconsultores.ventaboletos.exception.BusinessException;
import com.rjconsultores.ventaboletos.service.ConferenciaComissaoService;
import com.rjconsultores.ventaboletos.utilerias.LocaleUtil;
import com.rjconsultores.ventaboletos.vo.comissao.ConferenciaComissaoVO;
import com.rjconsultores.ventaboletos.vo.comissao.DiaConferenciaComissaoVO;
import com.rjconsultores.ventaboletos.web.utilerias.LocaleUtil;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderConferenciaComissao;

View File

@ -16,9 +16,13 @@ import org.zkoss.util.resource.Labels;
import org.zkoss.zhtml.Messagebox;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.CheckEvent;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zul.Checkbox;
import org.zkoss.zul.Comboitem;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.Radio;
import com.rjconsultores.ventaboletos.constantes.Constantes;
@ -31,15 +35,16 @@ import com.rjconsultores.ventaboletos.enums.comissao.StatusLogConferencia;
import com.rjconsultores.ventaboletos.enums.comissao.TipoLogConferencia;
import com.rjconsultores.ventaboletos.exception.BusinessException;
import com.rjconsultores.ventaboletos.service.ConferenciaComissaoService;
import com.rjconsultores.ventaboletos.utilerias.BigDecimalUtil;
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
import com.rjconsultores.ventaboletos.utilerias.LocaleUtil;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.vo.comissao.BoletoComissao;
import com.rjconsultores.ventaboletos.vo.comissao.ConferenciaComissaoVO;
import com.rjconsultores.ventaboletos.vo.comissao.EventosFinanceirosVO;
import com.rjconsultores.ventaboletos.vo.comissao.LogConferenciaVO;
import com.rjconsultores.ventaboletos.vo.comissao.OcdVO;
import com.rjconsultores.ventaboletos.web.utilerias.BigDecimalUtil;
import com.rjconsultores.ventaboletos.web.utilerias.LocaleUtil;
import com.rjconsultores.ventaboletos.vo.comissao.ResumoComissao;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
@ -47,6 +52,7 @@ import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
import com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderBoletoComissao;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderEventosFinanceiros;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderFormapagoComissao;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderLogConferencia;
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderOcd;
@ -129,6 +135,19 @@ public class ConferenciaController extends MyGenericForwardComposer {
private Radio rDebito;
private ResumoComissao resumo;
private BigDecimal totalBilhetesManual;
private BigDecimal totalBilhetesVendidos;
private BigDecimal totalBilhetesCancelados;
private BigDecimal totalBilhetesDevolvidos;
private BigDecimal totalBilhetesGap;
private BigDecimal totalBilhetesGapCancelados;
private BigDecimal totalBilhetesGapDevolvidos;
private BigDecimal totalCreditosEventoFinanceiros;
private BigDecimal totalDebitosEventoFinanceiros;
private OcdVO ocdTotal;
private MyListbox formapagosList;
@Override
public void doAfterCompose(Component comp) throws Exception {
@ -155,7 +174,33 @@ public class ConferenciaController extends MyGenericForwardComposer {
}
});
eventosFinanceirosList.setItemRenderer(new RenderEventosFinanceiros());
eventosFinanceirosList.setItemRenderer(new RenderEventosFinanceiros(){
@Override
@SuppressWarnings("unchecked")
public void render(Listitem lstm, Object o) throws Exception {
super.render(lstm, o);
final EventosFinanceirosVO eventoFinanceiro = (EventosFinanceirosVO) o;
List<Component> com = lstm.getChildren();
for (Component component: com) {
Listcell listCell = (Listcell) component;
if(listCell.getFirstChild() instanceof Checkbox) {
Checkbox chk = (Checkbox)component.getFirstChild();
chk.setDisabled(isExibirBotaoReabrirMovimento());
chk.addEventListener("onCheck", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
CheckEvent checkEvent = (CheckEvent) event;
if(checkEvent.isChecked() && eventoFinanceiro.getLogconferenciaId() == null) {
gravarLogConferenciaEventoFinanceiro(eventoFinanceiro);
} else if(!checkEvent.isChecked() && eventoFinanceiro.getLogconferenciaId() != null) {
removerLogConferenciaEventoFinanceiro(eventoFinanceiro);
}
}
});
}
}
}
});
eventosFinanceirosList.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
@ -164,7 +209,45 @@ public class ConferenciaController extends MyGenericForwardComposer {
}
});
bilhetesManualList.setItemRenderer(new RenderBoletoComissao());
ajustarListsBilhetes();
rDebito.setChecked(Boolean.TRUE);
formapagosList.setItemRenderer(new RenderFormapagoComissao());
popularCombobox();
carregarDados();
}
private void ajustarListsBilhetes() {
bilhetesManualList.setItemRenderer(new RenderBoletoComissao(){
@Override
@SuppressWarnings("unchecked")
public void render(Listitem lstm, Object o) throws Exception {
super.render(lstm, o);
final BoletoComissao boletoComissao = (BoletoComissao) o;
List<Component> com = lstm.getChildren();
for (Component component: com) {
Listcell listCell = (Listcell) component;
if(listCell.getFirstChild() instanceof Checkbox) {
Checkbox chk = (Checkbox)component.getFirstChild();
chk.setDisabled(isExibirBotaoReabrirMovimento());
chk.addEventListener("onCheck", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
CheckEvent checkEvent = (CheckEvent) event;
if(checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
gravarLogConferenciaBilhete(bilhetesManualList, boletoComissao);
} else if(!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
removerLogConferenciaBilhete(bilhetesManualList, boletoComissao);
}
}
});
}
}
}
});
bilhetesManualList.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
@ -173,7 +256,33 @@ public class ConferenciaController extends MyGenericForwardComposer {
}
});
bilhetesList.setItemRenderer(new RenderBoletoComissao());
bilhetesList.setItemRenderer(new RenderBoletoComissao(){
@Override
@SuppressWarnings("unchecked")
public void render(Listitem lstm, Object o) throws Exception {
super.render(lstm, o);
final BoletoComissao boletoComissao = (BoletoComissao) o;
List<Component> com = lstm.getChildren();
for (Component component: com) {
Listcell listCell = (Listcell) component;
if(listCell.getFirstChild() instanceof Checkbox) {
Checkbox chk = (Checkbox)component.getFirstChild();
chk.setDisabled(isExibirBotaoReabrirMovimento());
chk.addEventListener("onCheck", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
CheckEvent checkEvent = (CheckEvent) event;
if(checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
gravarLogConferenciaBilhete(bilhetesList, boletoComissao);
} else if(!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
removerLogConferenciaBilhete(bilhetesList, boletoComissao);
}
}
});
}
}
}
});
bilhetesList.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
@ -182,7 +291,33 @@ public class ConferenciaController extends MyGenericForwardComposer {
}
});
bilhetesCanceladosList.setItemRenderer(new RenderBoletoComissao());
bilhetesCanceladosList.setItemRenderer(new RenderBoletoComissao(){
@Override
@SuppressWarnings("unchecked")
public void render(Listitem lstm, Object o) throws Exception {
super.render(lstm, o);
final BoletoComissao boletoComissao = (BoletoComissao) o;
List<Component> com = lstm.getChildren();
for (Component component: com) {
Listcell listCell = (Listcell) component;
if(listCell.getFirstChild() instanceof Checkbox) {
Checkbox chk = (Checkbox)component.getFirstChild();
chk.setDisabled(isExibirBotaoReabrirMovimento());
chk.addEventListener("onCheck", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
CheckEvent checkEvent = (CheckEvent) event;
if(checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
gravarLogConferenciaBilhete(bilhetesCanceladosList, boletoComissao);
} else if(!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
removerLogConferenciaBilhete(bilhetesCanceladosList, boletoComissao);
}
}
});
}
}
}
});
bilhetesCanceladosList.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
@ -191,7 +326,33 @@ public class ConferenciaController extends MyGenericForwardComposer {
}
});
bilhetesDevolvidosList.setItemRenderer(new RenderBoletoComissao());
bilhetesDevolvidosList.setItemRenderer(new RenderBoletoComissao(){
@Override
@SuppressWarnings("unchecked")
public void render(Listitem lstm, Object o) throws Exception {
super.render(lstm, o);
final BoletoComissao boletoComissao = (BoletoComissao) o;
List<Component> com = lstm.getChildren();
for (Component component: com) {
Listcell listCell = (Listcell) component;
if(listCell.getFirstChild() instanceof Checkbox) {
Checkbox chk = (Checkbox)component.getFirstChild();
chk.setDisabled(isExibirBotaoReabrirMovimento());
chk.addEventListener("onCheck", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
CheckEvent checkEvent = (CheckEvent) event;
if(checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
gravarLogConferenciaBilhete(bilhetesDevolvidosList, boletoComissao);
} else if(!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
removerLogConferenciaBilhete(bilhetesDevolvidosList, boletoComissao);
}
}
});
}
}
}
});
bilhetesDevolvidosList.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
@ -200,7 +361,33 @@ public class ConferenciaController extends MyGenericForwardComposer {
}
});
bilhetesGapList.setItemRenderer(new RenderBoletoComissao());
bilhetesGapList.setItemRenderer(new RenderBoletoComissao(){
@Override
@SuppressWarnings("unchecked")
public void render(Listitem lstm, Object o) throws Exception {
super.render(lstm, o);
final BoletoComissao boletoComissao = (BoletoComissao) o;
List<Component> com = lstm.getChildren();
for (Component component: com) {
Listcell listCell = (Listcell) component;
if(listCell.getFirstChild() instanceof Checkbox) {
Checkbox chk = (Checkbox)component.getFirstChild();
chk.setDisabled(isExibirBotaoReabrirMovimento());
chk.addEventListener("onCheck", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
CheckEvent checkEvent = (CheckEvent) event;
if(checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
gravarLogConferenciaBilhete(bilhetesGapList, boletoComissao);
} else if(!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
removerLogConferenciaBilhete(bilhetesGapList, boletoComissao);
}
}
});
}
}
}
});
bilhetesGapList.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
@ -209,7 +396,33 @@ public class ConferenciaController extends MyGenericForwardComposer {
}
});
bilhetesGapCanceladosList.setItemRenderer(new RenderBoletoComissao());
bilhetesGapCanceladosList.setItemRenderer(new RenderBoletoComissao(){
@Override
@SuppressWarnings("unchecked")
public void render(Listitem lstm, Object o) throws Exception {
super.render(lstm, o);
final BoletoComissao boletoComissao = (BoletoComissao) o;
List<Component> com = lstm.getChildren();
for (Component component: com) {
Listcell listCell = (Listcell) component;
if(listCell.getFirstChild() instanceof Checkbox) {
Checkbox chk = (Checkbox)component.getFirstChild();
chk.setDisabled(isExibirBotaoReabrirMovimento());
chk.addEventListener("onCheck", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
CheckEvent checkEvent = (CheckEvent) event;
if(checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
gravarLogConferenciaBilhete(bilhetesGapCanceladosList, boletoComissao);
} else if(!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
removerLogConferenciaBilhete(bilhetesGapCanceladosList, boletoComissao);
}
}
});
}
}
}
});
bilhetesGapCanceladosList.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
@ -218,7 +431,33 @@ public class ConferenciaController extends MyGenericForwardComposer {
}
});
bilhetesGapDevolvidosList.setItemRenderer(new RenderBoletoComissao());
bilhetesGapDevolvidosList.setItemRenderer(new RenderBoletoComissao(){
@Override
@SuppressWarnings("unchecked")
public void render(Listitem lstm, Object o) throws Exception {
super.render(lstm, o);
final BoletoComissao boletoComissao = (BoletoComissao) o;
List<Component> com = lstm.getChildren();
for (Component component: com) {
Listcell listCell = (Listcell) component;
if(listCell.getFirstChild() instanceof Checkbox) {
Checkbox chk = (Checkbox)component.getFirstChild();
chk.setDisabled(isExibirBotaoReabrirMovimento());
chk.addEventListener("onCheck", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
CheckEvent checkEvent = (CheckEvent) event;
if(checkEvent.isChecked() && boletoComissao.getLogconferenciaId() == null) {
gravarLogConferenciaBilhete(bilhetesGapDevolvidosList, boletoComissao);
} else if(!checkEvent.isChecked() && boletoComissao.getLogconferenciaId() != null) {
removerLogConferenciaBilhete(bilhetesGapDevolvidosList, boletoComissao);
}
}
});
}
}
}
});
bilhetesGapDevolvidosList.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
@ -226,12 +465,6 @@ public class ConferenciaController extends MyGenericForwardComposer {
lancarLogConferenciaBilhete(boletoComissao, bilhetesDevolvidosList);
}
});
rDebito.setChecked(Boolean.TRUE);
popularCombobox();
carregarDados();
}
private void popularCombobox() {
@ -244,68 +477,83 @@ public class ConferenciaController extends MyGenericForwardComposer {
private void carregarDados() {
try {
carregarBilhetesManual();
carregarBilhetes();
carregarBilhetesCancelados();
carregarBilhetesDevolvidos();
carregarBilhetesGap();
carregarBilhetesGapCancelados();
carregarBilhetesGapDevolvidos();
List<BoletoComissao> boletosComissaos = conferenciaComissaoService.carregarBilhetesComissao(null, getConferencia(), null);
carregarBilhetesManual(boletosComissaos);
carregarBilhetesVendidos(boletosComissaos);
carregarBilhetesCancelados(boletosComissaos);
carregarBilhetesDevolvidos(boletosComissaos);
carregarBilhetesGap(boletosComissaos);
carregarBilhetesGapCancelados(boletosComissaos);
carregarBilhetesGapDevolvidos(boletosComissaos);
carregarEventosFinanceiros();
carregarOcds();
carregarLogsConferencia();
carregarResumo(boletosComissaos);
} catch (BusinessException e) {
log.error(e.getMessage(), e);
}
}
private void carregarBilhetesManual() throws BusinessException {
lsBilhetesManual = conferenciaComissaoService.carregarBilhetesComissao(conferencia, BoletoStatusComissao.BOLETO_MANUAL);
txtTotalBilhetesManual.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesManual), LocaleUtil.getLocale()));
private void carregarResumo(List<BoletoComissao> boletosComissaos) throws BusinessException {
resumo = conferenciaComissaoService.gerarResumo(conferencia, boletosComissaos, lsEventosFinanceiros, totalBilhetesManual, totalBilhetesVendidos, totalBilhetesCancelados, totalBilhetesDevolvidos, totalBilhetesGap, totalBilhetesGapCancelados, totalBilhetesGapDevolvidos, totalCreditosEventoFinanceiros, totalDebitosEventoFinanceiros, ocdTotal);
formapagosList.setData(resumo.getTotalFormapago());
}
private void carregarBilhetesManual(List<BoletoComissao> boletosComissaos) throws BusinessException {
lsBilhetesManual = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETO_MANUAL);
totalBilhetesManual = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesManual);
txtTotalBilhetesManual.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(totalBilhetesManual, LocaleUtil.getLocale()));
txtQtdeTotalBilhetesManual.setValue(String.valueOf(lsBilhetesManual.size()));
bilhetesManualList.setData(lsBilhetesManual);
}
private void carregarBilhetes() throws BusinessException {
lsBilhetes = conferenciaComissaoService.carregarBilhetesComissao(conferencia, BoletoStatusComissao.BOLETOS);
txtTotalBilhetes.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(conferenciaComissaoService.totalizarBoletoComissao(lsBilhetes), LocaleUtil.getLocale()));
private void carregarBilhetesVendidos(List<BoletoComissao> boletosComissaos) throws BusinessException {
lsBilhetes = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETOS_VENDIDOS);
totalBilhetesVendidos = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetes);
txtTotalBilhetes.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(totalBilhetesVendidos, LocaleUtil.getLocale()));
txtQtdeTotalBilhetes.setValue(String.valueOf(lsBilhetes.size()));
bilhetesList.setData(lsBilhetes);
}
private void carregarBilhetesCancelados() throws BusinessException {
lsBilhetesCancelados = conferenciaComissaoService.carregarBilhetesComissao(conferencia, BoletoStatusComissao.BOLETO_CANCELADO);
txtTotalBilhetesCancelados.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesCancelados), LocaleUtil.getLocale()));
private void carregarBilhetesCancelados(List<BoletoComissao> boletosComissaos) throws BusinessException {
lsBilhetesCancelados = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETO_CANCELADO);
totalBilhetesCancelados = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesCancelados);
txtTotalBilhetesCancelados.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(totalBilhetesCancelados, LocaleUtil.getLocale()));
txtQtdeTotalBilhetesCancelados.setValue(String.valueOf(lsBilhetesCancelados.size()));
bilhetesCanceladosList.setData(lsBilhetesCancelados);
}
private void carregarBilhetesDevolvidos() throws BusinessException {
private void carregarBilhetesDevolvidos(List<BoletoComissao> boletosComissaos) throws BusinessException {
totalBilhetesDevolvidos = BigDecimal.ZERO;
if(empresa.getIndcarboletosdevolvidosconf() != null && empresa.getIndcarboletosdevolvidosconf()) {
lsBilhetesDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(conferencia, BoletoStatusComissao.BOLETO_DEVOLVIDO);
txtTotalBilhetesDevolvidos.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesDevolvidos), LocaleUtil.getLocale()));
lsBilhetesDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.BOLETO_DEVOLVIDO);
totalBilhetesDevolvidos = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesDevolvidos);
txtTotalBilhetesDevolvidos.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(totalBilhetesDevolvidos, LocaleUtil.getLocale()));
txtQtdeTotalBilhetesDevolvidos.setValue(String.valueOf(lsBilhetesDevolvidos.size()));
bilhetesDevolvidosList.setData(lsBilhetesDevolvidos);
}
}
private void carregarBilhetesGap() throws BusinessException {
lsBilhetesGap = conferenciaComissaoService.carregarBilhetesComissao(conferencia, BoletoStatusComissao.GAP);
txtTotalBilhetesGap.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesGap), LocaleUtil.getLocale()));
private void carregarBilhetesGap(List<BoletoComissao> boletosComissaos) throws BusinessException {
lsBilhetesGap = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.GAP_VENDIDOS);
totalBilhetesGap = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesGap);
txtTotalBilhetesGap.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(totalBilhetesGap, LocaleUtil.getLocale()));
txtQtdeTotalBilhetesGap.setValue(String.valueOf(lsBilhetesGap.size()));
bilhetesGapList.setData(lsBilhetesGap);
}
private void carregarBilhetesGapCancelados() throws BusinessException {
lsBilhetesGapCancelados = conferenciaComissaoService.carregarBilhetesComissao(conferencia, BoletoStatusComissao.GAP_CANCELADO);
txtTotalBilhetesGapCancelados.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesGapCancelados), LocaleUtil.getLocale()));
private void carregarBilhetesGapCancelados(List<BoletoComissao> boletosComissaos) throws BusinessException {
lsBilhetesGapCancelados = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.GAP_CANCELADO);
totalBilhetesGapCancelados = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesGapCancelados);
txtTotalBilhetesGapCancelados.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(totalBilhetesGapCancelados, LocaleUtil.getLocale()));
txtQtdeTotalBilhetesGapCancelados.setValue(String.valueOf(lsBilhetesGapCancelados.size()));
bilhetesGapCanceladosList.setData(lsBilhetesGapCancelados);
}
private void carregarBilhetesGapDevolvidos() throws BusinessException {
lsBilhetesGapDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(conferencia, BoletoStatusComissao.GAP_DEVOLVIDO);
txtTotalBilhetesGapDevolvidos.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesGapDevolvidos), LocaleUtil.getLocale()));
private void carregarBilhetesGapDevolvidos(List<BoletoComissao> boletosComissaos) throws BusinessException {
lsBilhetesGapDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(boletosComissaos, conferencia, BoletoStatusComissao.GAP_DEVOLVIDO);
totalBilhetesGapDevolvidos = conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesGapDevolvidos);
txtTotalBilhetesGapDevolvidos.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(totalBilhetesGapDevolvidos, LocaleUtil.getLocale()));
txtQtdeTotalBilhetesGapDevolvidos.setValue(String.valueOf(lsBilhetesGapDevolvidos.size()));
bilhetesGapDevolvidosList.setData(lsBilhetesGapDevolvidos);
}
@ -319,8 +567,8 @@ public class ConferenciaController extends MyGenericForwardComposer {
lsEventosFinanceiros = conferenciaComissaoService.carregarEventosFinanceiros(conferencia);
eventosFinanceirosList.setData(lsEventosFinanceiros);
BigDecimal totalCreditosEventoFinanceiros = BigDecimal.ZERO;
BigDecimal totalDebitosEventoFinanceiros = BigDecimal.ZERO;
totalCreditosEventoFinanceiros = BigDecimal.ZERO;
totalDebitosEventoFinanceiros = BigDecimal.ZERO;
for (EventosFinanceirosVO eventoFinanceiro : lsEventosFinanceiros) {
if(eventoFinanceiro.isCredito()) {
@ -337,11 +585,11 @@ public class ConferenciaController extends MyGenericForwardComposer {
private void carregarOcds() throws BusinessException {
lsOcds = conferenciaComissaoService.carregarOcds(conferencia);
OcdVO total = conferenciaComissaoService.totalizarOcd(lsOcds);
ocdTotal = conferenciaComissaoService.totalizarOcd(lsOcds);
if(total != null) {
txtTotalOcdValorPagar.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(total.getValorPagar(), LocaleUtil.getLocale()));
txtTotalOcdPenalizacion.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(total.getPenalizacion(), LocaleUtil.getLocale()));
if(ocdTotal != null) {
txtTotalOcdValorPagar.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(ocdTotal.getValorPagar(), LocaleUtil.getLocale()));
txtTotalOcdPenalizacion.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(ocdTotal.getPenalizacion(), LocaleUtil.getLocale()));
txtQtdeTotalOcd.setValue(String.valueOf(lsOcds.size()));
}
ocdsList.setData(lsOcds);
@ -598,7 +846,7 @@ public class ConferenciaController extends MyGenericForwardComposer {
Messagebox.OK,Messagebox.INFORMATION);
return;
}
lsBilhetesDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(conferencia, BoletoStatusComissao.BOLETO_DEVOLVIDO);
lsBilhetesDevolvidos = conferenciaComissaoService.carregarBilhetesComissao(null, conferencia, BoletoStatusComissao.BOLETO_DEVOLVIDO);
txtTotalBilhetesDevolvidos.setValue(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(conferenciaComissaoService.totalizarBoletoComissao(lsBilhetesDevolvidos), LocaleUtil.getLocale()));
txtQtdeTotalBilhetesDevolvidos.setValue(String.valueOf(lsBilhetesDevolvidos.size()));
bilhetesDevolvidosList.setData(lsBilhetesDevolvidos);
@ -667,14 +915,206 @@ public class ConferenciaController extends MyGenericForwardComposer {
return (conferencia.getIndmaloterecebido() == null || !conferencia.getIndmaloterecebido()) && isMovimentoNaoEncerrado();
}
public void onClick$btnCerrar() {
public void onClick$btnCerrar() throws InterruptedException {
validarConferencia();
this.closeWindow();
}
private void validarConferencia() throws InterruptedException {
try {
validarBilhetes();
validarEventosFinanceiros();
validarOcds();
} catch (Exception e) {
log.error(e.getMessage(), e);
Messagebox.show(Labels.getLabel("MSG.Error"),
Labels.getLabel("conferenciaController.window.title"),
Messagebox.OK,Messagebox.ERROR);
}
}
private void validarOcds() {
}
private void validarEventosFinanceiros() {
}
private void validarBilhetes() throws BusinessException {
/*validarListBilhetes(bilhetesManualList);
validarListBilhetes(bilhetesList);
validarListBilhetes(bilhetesCanceladosList);
validarListBilhetes(bilhetesDevolvidosList);
validarListBilhetes(bilhetesGapCanceladosList);
validarListBilhetes(bilhetesGapDevolvidosList);
validarListBilhetes(bilhetesGapList);*/
}
/*@SuppressWarnings("unchecked")
private void validarListBilhetes(MyListbox bilhetes) throws BusinessException {
int index = 0;
List<Listitem> itens = bilhetes.getItems();
List<BoletoComissao> boletoComissaos = bilhetes.getListData();
for (Listitem item: itens) {
BoletoComissao boletoComissao = boletoComissaos.get(index++);
boletoComissao.setConferido(validarListitemMarcado(item, boletoComissao));
if(boletoComissao.isConferido() && boletoComissao.getLogconferenciaId() == null) {
LogConferencia logConferencia = gravarLogConferencia(TipoLogConferencia.BOLETO, boletoComissao.getBoletoId(), boletoComissao.getNumFolioSistema());
boletoComissao.setLogconferenciaId(logConferencia.getLogconferenciaId());
boletoComissao.setStatus(logConferencia.getStatus().getValue());
boletoComissao.setConferido(Boolean.TRUE);
bilhetes.updateItem(boletoComissao);
} else if(!boletoComissao.isConferido() && boletoComissao.getLogconferenciaId() != null) {
LogConferencia logConferencia = conferenciaComissaoService.obtenerLogConferenciaID(boletoComissao.getLogconferenciaId());
conferenciaComissaoService.borrarLogConferencia(logConferencia);
boletoComissao.setLogconferenciaId(null);
boletoComissao.setStatus(null);
boletoComissao.setConferido(Boolean.FALSE);
removerLogConferencia(logConferencia);
bilhetes.updateItem(boletoComissao);
}
}
}*/
private void removerLogConferencia(Long logconferenciaId) {
logsConferenciaList.removeItem(new LogConferenciaVO(logconferenciaId));
}
private LogConferencia gravarLogConferencia(TipoLogConferencia tipo, Long id, String numfoliosistema) throws BusinessException {
LogConferencia logConferencia = new LogConferencia();
logConferencia.setObservacao("OK");
logConferencia.setConferencia(conferencia);
logConferencia.setStatus(StatusLogConferencia.CONFERIDO);
logConferencia.setTipo(tipo);
logConferencia.setIndcredito(Boolean.TRUE);
if(tipo.equals(TipoLogConferencia.BOLETO)) {
logConferencia.setBoletoId(id);
}
if(tipo.equals(TipoLogConferencia.OCD)) {
logConferencia.setOcdId(id);
}
if(tipo.equals(TipoLogConferencia.EVENTO_FINANCEIRO)) {
logConferencia.setEventoextraId(id);
}
logConferencia = conferenciaComissaoService.suscribirLogConferencia(logConferencia);
atualizarLogConferenciaList(logConferencia, numfoliosistema);
return logConferencia;
}
private void atualizarLogConferenciaList(LogConferencia logConferencia, String numfoliosistema) {
LogConferenciaVO logConferenciaVO = new LogConferenciaVO();
logConferenciaVO.setLogconferenciaId(logConferencia.getLogconferenciaId());
logConferenciaVO.setBoletoId(logConferencia.getBoletoId());
logConferenciaVO.setEventoextraId(logConferencia.getEventoextraId());
logConferenciaVO.setOcdId(logConferencia.getOcdId());
logConferenciaVO.setFecmodif(logConferencia.getFecmodif());
logConferenciaVO.setNombusuario(UsuarioLogado.getUsuarioLogado().getNombusuario());
logConferenciaVO.setNumfoliosistema(numfoliosistema);
logConferenciaVO.setObservacao(logConferencia.getObservacao());
logConferenciaVO.setPreco(logConferencia.getPreco());
logConferenciaVO.setStatus(logConferencia.getStatus().getValue());
logConferenciaVO.setTipo(logConferencia.getTipo().getValue());
logsConferenciaList.updateItem(logConferenciaVO);
}
/*@SuppressWarnings("unchecked")
private void addCheckboxEventListenerBilhetes(MyListbox bilhetes) {
int index = 0;
List<Listitem> itens = bilhetes.getItems();
List<BoletoComissao> boletoComissaos = bilhetes.getListData();
for (Listitem item: itens) {
List<Component> com = item.getChildren();
for (Component component: com) {
Listcell listCell = (Listcell) component;
System.out.println(listCell.getFirstChild());
if(listCell.getFirstChild() instanceof Checkbox) {
Checkbox chk = (Checkbox)component.getFirstChild();
chk.setId(boletoComissaos.get(index++).getBoletoId()+"");
chk.addEventListener("onCheck", new EventListener() {
@Override
public void onEvent(Event arg0) throws Exception {
System.out.println("EXECUTOU");
}
});
}
}
}
}*/
private void gravarLogConferenciaBilhete(MyListbox bilhetes, BoletoComissao boletoComissao) {
try {
LogConferencia logConferencia = gravarLogConferencia(TipoLogConferencia.BOLETO, boletoComissao.getBoletoId(), boletoComissao.getNumFolioSistema());
boletoComissao.setLogconferenciaId(logConferencia.getLogconferenciaId());
boletoComissao.setStatus(logConferencia.getStatus().getValue());
boletoComissao.setConferido(Boolean.TRUE);
bilhetes.updateItem(boletoComissao);
} catch (BusinessException e) {
log.error(e.getMessage(), e);
}
}
private void removerLogConferenciaBilhete(MyListbox bilhetes, BoletoComissao boletoComissao) {
try {
LogConferencia logConferencia = conferenciaComissaoService.obtenerLogConferenciaID(boletoComissao.getLogconferenciaId());
conferenciaComissaoService.borrarLogConferencia(logConferencia);
boletoComissao.setLogconferenciaId(null);
boletoComissao.setStatus(null);
boletoComissao.setConferido(Boolean.FALSE);
removerLogConferencia(logConferencia.getLogconferenciaId());
bilhetes.updateItem(boletoComissao);
} catch (BusinessException e) {
log.error(e.getMessage(), e);
}
}
private void gravarLogConferenciaEventoFinanceiro(EventosFinanceirosVO eventoFinanceiro) {
try {
LogConferencia logConferencia = gravarLogConferencia(TipoLogConferencia.EVENTO_FINANCEIRO, eventoFinanceiro.getEventoextraId(), null);
eventoFinanceiro.setLogconferenciaId(logConferencia.getLogconferenciaId());
eventoFinanceiro.setStatus(logConferencia.getStatus().getValue());
eventoFinanceiro.setConferido(Boolean.TRUE);
eventosFinanceirosList.updateItem(eventoFinanceiro);
} catch (BusinessException e) {
log.error(e.getMessage(), e);
}
}
private void removerLogConferenciaEventoFinanceiro(EventosFinanceirosVO eventoFinanceiro) {
try {
LogConferencia logConferencia = conferenciaComissaoService.obtenerLogConferenciaID(eventoFinanceiro.getLogconferenciaId());
conferenciaComissaoService.borrarLogConferencia(logConferencia);
eventoFinanceiro.setLogconferenciaId(null);
eventoFinanceiro.setStatus(null);
eventoFinanceiro.setConferido(Boolean.FALSE);
removerLogConferencia(logConferencia.getLogconferenciaId());
eventosFinanceirosList.updateItem(eventoFinanceiro);
} catch (BusinessException e) {
log.error(e.getMessage(), e);
}
}
@Override
public void closeWindow() {
carregarDadosConferencia();
super.closeWindow();
}
public ResumoComissao getResumo() {
return resumo;
}
public void setResumo(ResumoComissao resumo) {
this.resumo = resumo;
}
public MyListbox getFormapagosList() {
return formapagosList;
}
public void setFormapagosList(MyListbox formapagosList) {
this.formapagosList = formapagosList;
}
}

View File

@ -9,7 +9,6 @@ import org.zkoss.util.resource.Labels;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zul.Comboitem;
import org.zkoss.zul.Messagebox;
import org.zkoss.zul.Radio;
@ -23,7 +22,6 @@ import com.rjconsultores.ventaboletos.vo.comissao.BoletoComissao;
import com.rjconsultores.ventaboletos.vo.comissao.EventosFinanceirosVO;
import com.rjconsultores.ventaboletos.vo.comissao.LogConferenciaVO;
import com.rjconsultores.ventaboletos.vo.comissao.OcdVO;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
@ -43,7 +41,6 @@ public class EditarLogConfenciaComissaoController extends MyGenericForwardCompos
private MyListbox logsConferenciaList;
private MyListbox atualizarList;
private MyComboboxEstandar cmbSituacaoLog;
private MyTextboxDecimal txtPrecoLog;
private MyTextbox txtObservacaoLog;
@ -74,7 +71,6 @@ public class EditarLogConfenciaComissaoController extends MyGenericForwardCompos
rDebito.setChecked(Boolean.TRUE);
popularCombobox();
}
public void onClick$btnSalvar(Event ev) throws InterruptedException {
@ -86,7 +82,7 @@ public class EditarLogConfenciaComissaoController extends MyGenericForwardCompos
logConferencia.setPreco(txtPrecoLog.getValueDecimal());
logConferencia.setObservacao(txtObservacaoLog.getValue());
logConferencia.setConferencia(conferencia);
logConferencia.setStatus(StatusLogConferencia.getStatusLogConferencia((Integer)cmbSituacaoLog.getSelectedItem().getValue()));
logConferencia.setStatus(StatusLogConferencia.PENDENCIA);
logConferencia.setTipo(TipoLogConferencia.AVULSO);
logConferencia.setIndcredito(!rDebito.isChecked());
@ -94,6 +90,7 @@ public class EditarLogConfenciaComissaoController extends MyGenericForwardCompos
logConferencia.setBoletoId(boletoComissao.getBoletoId());
logConferencia.setTipo(TipoLogConferencia.BOLETO);
boletoComissao.setStatus(logConferencia.getStatus().getValue());
boletoComissao.setConferido(Boolean.TRUE);
}
if(eventosFinanceiros != null) {
@ -174,12 +171,4 @@ public class EditarLogConfenciaComissaoController extends MyGenericForwardCompos
logsConferenciaList.updateItem(logConferenciaVO);
}
private void popularCombobox() {
for (StatusLogConferencia status : StatusLogConferencia.values()) {
Comboitem comboItem = new Comboitem(status.toString());
comboItem.setValue(status.getValue());
comboItem.setParent(cmbSituacaoLog);
}
}
}

View File

@ -15,8 +15,8 @@ import org.zkoss.zk.ui.event.Event;
import com.rjconsultores.ventaboletos.entidad.PricingEspecifico;
import com.rjconsultores.ventaboletos.entidad.PricingEspecificoOcupacion;
import com.rjconsultores.ventaboletos.utilerias.BigDecimalUtil;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.BigDecimalUtil;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal;

View File

@ -1,37 +0,0 @@
package com.rjconsultores.ventaboletos.web.utilerias;
import java.math.BigDecimal;
import java.text.NumberFormat;
import java.text.ParseException;
import java.util.Locale;
import org.apache.commons.lang.StringUtils;
/**
*
* @author Wilian
*
*/
public class BigDecimalUtil {
public static BigDecimal getStringToBigDecimal(String value, Locale locale) throws ParseException {
if(value != null && StringUtils.isNotBlank(value)) {
NumberFormat nf = NumberFormat.getInstance(locale);
return new BigDecimal(nf.parse(value).toString());
}
return null;
}
public static String getBigDecimalToStringDouble2CasasDecimaisFormatado(BigDecimal value, Locale locale) {
if(value != null) {
NumberFormat nf = NumberFormat.getInstance(locale);
nf.setMinimumFractionDigits(2);
nf.setMaximumFractionDigits(2);
return nf.format(value.doubleValue());
}
return null;
}
}

View File

@ -1,36 +0,0 @@
package com.rjconsultores.ventaboletos.web.utilerias;
import java.util.Locale;
import org.zkoss.util.Locales;
/**
* Retorna o locale atual, caso o locale não seja suportado pelo sistema,<br>
* será retornado o locale pt_br
* @author Wilian
*/
public class LocaleUtil {
private static Locale LOCALE_PT_BR = new Locale("pt", "br");
private static Locale LOCALE_ES_MX = new Locale("es", "mx");
private static Locale [] LOCALES = new Locale[]{LOCALE_PT_BR, LOCALE_ES_MX};
/**
* Retorna o locale atual, caso o locale não seja suportado pelo sistema,<br>
* será retornado o locale pt_br
* @return
*/
public static Locale getLocale() {
Locale localeCurrent = Locales.getCurrent();
for (Locale locale : LOCALES) {
if(localeCurrent.getLanguage().equals(locale.getLanguage())) {
return localeCurrent;
}
}
return LOCALE_PT_BR;
}
}

View File

@ -1,22 +1,38 @@
package com.rjconsultores.ventaboletos.web.utilerias.render;
import org.apache.commons.lang.StringUtils;
import org.zkoss.zul.Checkbox;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.enums.IndStatusBoleto;
import com.rjconsultores.ventaboletos.utilerias.BigDecimalUtil;
import com.rjconsultores.ventaboletos.utilerias.LocaleUtil;
import com.rjconsultores.ventaboletos.vo.comissao.BoletoComissao;
import com.rjconsultores.ventaboletos.web.utilerias.BigDecimalUtil;
import com.rjconsultores.ventaboletos.web.utilerias.LocaleUtil;
public class RenderBoletoComissao implements ListitemRenderer {
public RenderBoletoComissao() {
super();
}
@Override
public void render(Listitem lstm, Object o) throws Exception {
BoletoComissao boletoComissao = (BoletoComissao) o;
boletoComissao.setConferido(boletoComissao.getLogconferenciaId() != null);
Listcell lc = new Listcell(boletoComissao.getNumFolioSistema());
Listcell lc = new Listcell();
if(boletoComissao.isExigeConferencia()) {
Checkbox chk = new Checkbox();
chk.setId(boletoComissao.getBoletoId()+"");
chk.setChecked(boletoComissao.isConferido());
chk.setParent(lc);
}
lc.setParent(lstm);
lc = new Listcell(boletoComissao.getNumFolioSistema());
lc.setParent(lstm);
lc = new Listcell(boletoComissao.getNumSeriePreimpresa());
@ -31,7 +47,8 @@ public class RenderBoletoComissao implements ListitemRenderer {
lc = new Listcell(BigDecimalUtil.getBigDecimalToStringDouble2CasasDecimaisFormatado(boletoComissao.getTotal(), LocaleUtil.getLocale()));
lc.setParent(lstm);
if(StringUtils.isNotBlank(boletoComissao.getDescmotivocancelacion())) {
if(!boletoComissao.getIndstatusboleto().equalsIgnoreCase(IndStatusBoleto.V.getShortValue()) &&
StringUtils.isNotBlank(boletoComissao.getDescmotivocancelacion())) {
lc = new Listcell(boletoComissao.getDescmotivocancelacion());
} else {
IndStatusBoleto indStatusBoleto = IndStatusBoleto.getIndStatusBoleto(boletoComissao.getIndstatusboleto());

View File

@ -1,21 +1,32 @@
package com.rjconsultores.ventaboletos.web.utilerias.render;
import org.zkoss.util.resource.Labels;
import org.zkoss.zul.Checkbox;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.utilerias.BigDecimalUtil;
import com.rjconsultores.ventaboletos.utilerias.LocaleUtil;
import com.rjconsultores.ventaboletos.vo.comissao.EventosFinanceirosVO;
import com.rjconsultores.ventaboletos.web.utilerias.BigDecimalUtil;
import com.rjconsultores.ventaboletos.web.utilerias.LocaleUtil;
public class RenderEventosFinanceiros implements ListitemRenderer {
@Override
public void render(Listitem lstm, Object o) throws Exception {
EventosFinanceirosVO eventosFinanceiros = (EventosFinanceirosVO) o;
eventosFinanceiros.setConferido(eventosFinanceiros.getLogconferenciaId() != null);
Listcell lc = new Listcell(eventosFinanceiros.getNumdocumento());
Listcell lc = new Listcell();
if(eventosFinanceiros.isExigeConferencia()) {
Checkbox chk = new Checkbox();
chk.setId(eventosFinanceiros.getEventoextraId()+"");
chk.setChecked(eventosFinanceiros.isConferido());
chk.setParent(lc);
}
lc.setParent(lstm);
lc = new Listcell(eventosFinanceiros.getNumdocumento());
lc.setParent(lstm);
lc = new Listcell(eventosFinanceiros.getDesctipoevento());
@ -36,6 +47,9 @@ public class RenderEventosFinanceiros implements ListitemRenderer {
lc = new Listcell(eventosFinanceiros.getDescpago());
lc.setParent(lstm);
lc = new Listcell(eventosFinanceiros.getNombusuario());
lc.setParent(lstm);
lstm.setAttribute("data", eventosFinanceiros);
}

View File

@ -0,0 +1,25 @@
package com.rjconsultores.ventaboletos.web.utilerias.render;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.vo.comissao.FormapagoVO;
public class RenderFormapagoComissao implements ListitemRenderer {
@Override
public void render(Listitem lstm, Object o) throws Exception {
FormapagoVO formapago = (FormapagoVO) o;
Listcell lc = new Listcell(formapago.getDescpago());
lc.setParent(lstm);
lc = new Listcell(formapago.getImporteFormatado());
lc.setParent(lstm);
lstm.setAttribute("data", formapago);
}
}

View File

@ -8,7 +8,7 @@ import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.entidad.ItemDesconto;
import com.rjconsultores.ventaboletos.web.utilerias.LocaleUtil;
import com.rjconsultores.ventaboletos.utilerias.LocaleUtil;
public class RenderItemDesconto implements ListitemRenderer {

View File

@ -4,10 +4,10 @@ import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.utilerias.BigDecimalUtil;
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
import com.rjconsultores.ventaboletos.utilerias.LocaleUtil;
import com.rjconsultores.ventaboletos.vo.comissao.LogConferenciaVO;
import com.rjconsultores.ventaboletos.web.utilerias.BigDecimalUtil;
import com.rjconsultores.ventaboletos.web.utilerias.LocaleUtil;
public class RenderLogConferencia implements ListitemRenderer {

View File

@ -4,10 +4,10 @@ import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;
import com.rjconsultores.ventaboletos.utilerias.BigDecimalUtil;
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
import com.rjconsultores.ventaboletos.utilerias.LocaleUtil;
import com.rjconsultores.ventaboletos.vo.comissao.OcdVO;
import com.rjconsultores.ventaboletos.web.utilerias.BigDecimalUtil;
import com.rjconsultores.ventaboletos.web.utilerias.LocaleUtil;
public class RenderOcd implements ListitemRenderer {
@ -39,6 +39,9 @@ public class RenderOcd implements ListitemRenderer {
lc = new Listcell(ocd.getStatusDescricao());
lc.setParent(lstm);
lc = new Listcell(ocd.getNombusuario());
lc.setParent(lstm);
lstm.setAttribute("data", ocd);
}

View File

@ -6008,6 +6008,7 @@ conferenciaController.tab.gabVenda = GAP Venda
conferenciaController.tab.gabCancelado = GAP Cancelado
conferenciaController.tab.gabDevolvido = GAP Devolvido
conferenciaController.tab.ocd = OCD
conferenciaController.tab.resumo = Resumo
conferenciaController.lhTipoVenta.value = Tipo Venta
conferenciaController.lhNumdocumento.value = Documento
conferenciaController.lhFechoringreso.value = Data
@ -6061,6 +6062,15 @@ conferenciaController.lbQtdeTotal.label = Quantidade
conferenciaController.lbTotalOcdPenalizacion.label = Total Penalização
conferenciaController.lbTotalOcdValorPagar.label = Total Pagar
conferenciaController.lhNombusuario.value = Bilheteiro
conferenciaController.lhTotalVenda.value = Total Venda
conferenciaController.lhTotalCancelados.value = Total Cancelados
conferenciaController.lhTotalDevolvidos.value = Total Devolvidos
conferenciaController.lhTotalReceitas.value = Total Receitas
conferenciaController.lhTotalDespesas.value = Total Despesas
conferenciaController.lhTotalFormapago = Forma de pagamentos
conferenciaController.lhTotalDeposito.value = Deposito
conferenciaController.lhTotalDiferenca.value = Diferença
conferenciaController.lhConferido.value = Conferido
# Editar LogConferencia Comissao
editarLogConferenciaComissaoController.window.title = Registro de Observaciones

View File

@ -6154,6 +6154,7 @@ conferenciaController.tab.gabVenda = GAP Venda
conferenciaController.tab.gabCancelado = GAP Cancelado
conferenciaController.tab.gabDevolvido = GAP Devolvido
conferenciaController.tab.ocd = OCD
conferenciaController.tab.resumo = Resumo
conferenciaController.lhTipoVenta.value = Tipo Venda
conferenciaController.lhNumdocumento.value = Documento
conferenciaController.lhFechoringreso.value = Data
@ -6208,6 +6209,15 @@ conferenciaController.lbQtdeTotal.label = Quantidade
conferenciaController.lbTotalOcdPenalizacion.label = Total Penalização
conferenciaController.lbTotalOcdValorPagar.label = Total Pagar
conferenciaController.lhNombusuario.value = Bilheteiro
conferenciaController.lhTotalVenda.value = Total Venda
conferenciaController.lhTotalCancelados.value = Total Cancelados
conferenciaController.lhTotalDevolvidos.value = Total Devolvidos
conferenciaController.lhTotalReceitas.value = Total Receitas
conferenciaController.lhTotalDespesas.value = Total Despesas
conferenciaController.lhTotalFormapago = Forma de pagamentos
conferenciaController.lhTotalDeposito.value = Deposito
conferenciaController.lhTotalDiferenca.value = Diferença
conferenciaController.lhConferido.value = Conferido
# Editar LogConferencia Comissao
editarLogConferenciaComissaoController.window.title = Lançamento de Observações

View File

@ -10,7 +10,7 @@
apply="${conferenciaController}"
contentStyle="overflow:auto"
height="500px"
width="1100px"
width="1200px"
border="normal">
<toolbar>
<button id="btnCerrar"
@ -70,6 +70,7 @@
<tab label="${c:l('conferenciaController.tab.eventosFinanceiros')}" />
<tab label="${c:l('conferenciaController.tab.ocd')}" />
<tab label="${c:l('conferenciaController.tab.observacoes')}" />
<tab label="${c:l('conferenciaController.tab.resumo')}" />
</tabs>
<tabpanels>
@ -86,6 +87,9 @@
multiple="false"
height="350px">
<listhead sizable="true">
<listheader label="${c:l('conferenciaController.lhConferido.value')}"
width="70px"
align="center"/>
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhNumFolioSistema.value')}"
sort="auto(numFolioSistema)" />
@ -153,6 +157,9 @@
multiple="false"
height="350px">
<listhead sizable="true">
<listheader label="${c:l('conferenciaController.lhConferido.value')}"
width="70px"
align="center"/>
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhNumFolioSistema.value')}"
sort="auto(numFolioSistema)" />
@ -220,6 +227,9 @@
multiple="false"
height="350px">
<listhead sizable="true">
<listheader label="${c:l('conferenciaController.lhConferido.value')}"
width="70px"
align="center"/>
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhNumFolioSistema.value')}"
sort="auto(numFolioSistema)" />
@ -244,6 +254,9 @@
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhFormpago.value')}"
sort="auto(descFormapagos)" />
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhNombusuario.value')}"
sort="auto(nombusuario)" />
</listhead>
</listbox>
@ -303,6 +316,9 @@
multiple="false"
height="350px">
<listhead sizable="true">
<listheader label="${c:l('conferenciaController.lhConferido.value')}"
width="70px"
align="center"/>
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhNumFolioSistema.value')}"
sort="auto(numFolioSistema)" />
@ -327,6 +343,9 @@
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhFormpago.value')}"
sort="auto(descFormapagos)" />
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhNombusuario.value')}"
sort="auto(nombusuario)" />
</listhead>
</listbox>
@ -367,6 +386,9 @@
multiple="false"
height="350px">
<listhead sizable="true">
<listheader label="${c:l('conferenciaController.lhConferido.value')}"
width="70px"
align="center"/>
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhNumFolioSistema.value')}"
sort="auto(numFolioSistema)" />
@ -391,6 +413,9 @@
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhFormpago.value')}"
sort="auto(descFormapagos)" />
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhNombusuario.value')}"
sort="auto(nombusuario)" />
</listhead>
</listbox>
@ -431,6 +456,9 @@
multiple="false"
height="350px">
<listhead sizable="true">
<listheader label="${c:l('conferenciaController.lhConferido.value')}"
width="70px"
align="center"/>
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhNumFolioSistema.value')}"
sort="auto(numFolioSistema)" />
@ -455,6 +483,9 @@
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhFormpago.value')}"
sort="auto(descFormapagos)" />
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhNombusuario.value')}"
sort="auto(nombusuario)" />
</listhead>
</listbox>
@ -495,6 +526,9 @@
multiple="false"
height="350px">
<listhead sizable="true">
<listheader label="${c:l('conferenciaController.lhConferido.value')}"
width="70px"
align="center"/>
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhNumFolioSistema.value')}"
sort="auto(numFolioSistema)" />
@ -519,6 +553,9 @@
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhFormpago.value')}"
sort="auto(descFormapagos)" />
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhNombusuario.value')}"
sort="auto(nombusuario)" />
</listhead>
</listbox>
@ -559,6 +596,9 @@
multiple="false"
height="200px">
<listhead sizable="true">
<listheader label="${c:l('conferenciaController.lhConferido.value')}"
width="70px"
align="center"/>
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhNumdocumento.value')}"
sort="auto(numdocumento)" />
@ -580,6 +620,9 @@
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhFormpago.value')}"
sort="auto(descpago)" />
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhNombusuario.value')}"
sort="auto(nombusuario)" />
</listhead>
</listbox>
<grid fixedLayout="true">
@ -654,6 +697,9 @@
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhSituacaoObservacao.value')}"
sort="auto(situacaoObservacao)" />
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhNombusuario.value')}"
sort="auto(nombusuario)" />
</listhead>
</listbox>
@ -794,6 +840,110 @@
</listhead>
</listbox>
</tabpanel>
<!-- Resumo -->
<tabpanel>
<grid fixedLayout="true">
<columns>
<column width="13%" />
<column width="20%" />
<column width="13%" />
<column width="20%" />
<column width="13%" />
<column width="21%" />
</columns>
<rows>
<row spans="1,5">
<label value="${c:l('conferenciaController.lhTotalDeposito.value')}" />
<textbox id="totalDeposito"
width="12%"
value="@{winConferencia$composer.resumo.valorDepositoFormatado}"
readonly="true"
style="text-align:right" />
</row>
<row spans="1,5">
<label value="${c:l('conferenciaController.lhTotalVenda.value')}" />
<textbox id="totalBilhetesVendidos"
width="12%"
value="@{winConferencia$composer.resumo.totalVendasFormatado}"
readonly="true"
style="text-align:right" />
</row>
<row spans=",,,5,1">
<label value="${c:l('conferenciaController.lhTotalCancelados.value')}" />
<textbox id="txtTotalCancelados"
width="50%"
value="@{winConferencia$composer.resumo.totalCanceladosFormatado}"
readonly="true"
style="text-align:right" />
<label value="${c:l('conferenciaController.lhTotalDevolvidos.value')}" />
<textbox id="txtTotalDevolvidos"
width="18%"
value="@{winConferencia$composer.resumo.totalDevolvidosFormatado}"
readonly="true"
style="text-align:right" />
</row>
<row>
<label value="${c:l('conferenciaController.lhTotalReceitas.value')}" />
<textbox id="txtTotalReceitas"
width="50%"
value="@{winConferencia$composer.resumo.totalReceitasFormatado}"
readonly="true"
style="text-align:right" />
<label value="${c:l('conferenciaController.lhTotalDespesas.value')}" />
<textbox id="txtTotalDespesas"
width="50%"
value="@{winConferencia$composer.resumo.totalDespesasFormatado}"
readonly="true"
style="text-align:right" />
<label value="${c:l('conferenciaController.lhTotalDiferenca.value')}" />
<textbox id="txtTotalDiferenca"
width="50%"
value="@{winConferencia$composer.resumo.totalDiferencaFormatado}"
readonly="true"
style="text-align:right" />
</row>
<row spans="6">
<label value="${c:l('conferenciaController.tab.ocd')}" />
</row>
<row spans=",,,5,1">
<label value="${c:l('conferenciaController.lbTotalOcdValorPagar.label')}" />
<textbox id="txtTotalValorPagarOcd"
width="50%"
value="@{winConferencia$composer.resumo.totalOcd.valorPagarFormatado}"
readonly="true"
style="text-align:right" />
<label value="${c:l('conferenciaController.lbTotalOcdPenalizacion.label')}" />
<textbox id="txtTotalPenalizacionOcd"
width="18%"
value="@{winConferencia$composer.resumo.totalOcd.penalizacionFormatado}"
readonly="true"
style="text-align:right" />
</row>
<row spans="6">
<label value="${c:l('conferenciaController.lhTotalFormapago')}" />
</row>
</rows>
</grid>
<listbox id="formapagosList"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
vflex="true"
multiple="false"
height="195px">
<listhead sizable="true">
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lhFormpago.value')}"
sort="auto(descpago)" />
<listheader image="/gui/img/builder.gif"
label="${c:l('conferenciaController.lbValorTotal.label')}"
sort="auto(importe)" />
</listhead>
</listbox>
</tabpanel>
</tabpanels>
</tabbox>
</window>

View File

@ -33,23 +33,6 @@
</columns>
<rows>
<row>
<label value="${c:l('editarLogConferenciaComissaoController.lhSituacaoLog.value')}" />
<combobox id="cmbSituacaoLog"
width="70%"
mold="rounded"
buttonVisible="true"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
constraint="no empty" />
<label value="${c:l('editarLogConferenciaComissaoController.lhValorLog.value')}" />
<textbox id="txtPrecoLog"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
precision="7"
scale="2"
width="50%" />
</row>
<row spans="1,3">
<label value="${c:l('conferenciaController.lbDebitoCredito.value')}" />
<radiogroup>
<radio id="rDebito"
@ -57,6 +40,13 @@
<radio id="rCredito"
label="${c:l('conferenciaController.lbCredito.value')}"/>
</radiogroup>
<label value="${c:l('editarLogConferenciaComissaoController.lhValorLog.value')}" />
<textbox id="txtPrecoLog"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal"
precision="7"
scale="2"
width="50%" />
</row>
<row spans="1,3">