bug #7500
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@56832 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
c5159fa30d
commit
4d530f7f54
|
@ -67,6 +67,7 @@ public class BusquedaImportacionFiscalController extends MyGenericForwardCompose
|
|||
private Button btnExeRelatorioFinanceiro;
|
||||
private Button btnExeRelatorioVoucher;
|
||||
private Button btnExeRelatorioPendenciaEcf;
|
||||
private Button btnExeRelatorioPendenciaReducaoZ;
|
||||
|
||||
private Boolean isExibirTipoGeracaoArquivo;
|
||||
private Boolean isExibirCompetencia;
|
||||
|
@ -84,62 +85,69 @@ public class BusquedaImportacionFiscalController extends MyGenericForwardCompose
|
|||
|
||||
private void defineImportacao() {
|
||||
|
||||
boolean isEcf = (Boolean) Executions.getCurrent().getArg().get("ECF");
|
||||
boolean isEcf = Executions.getCurrent().getArg().get("ECF") == null ? Boolean.FALSE : (Boolean) Executions.getCurrent().getArg().get("ECF");
|
||||
if (isEcf) {
|
||||
btnExeImportacionEcf.setVisible(true);
|
||||
} else {
|
||||
btnExeImportacionEcf.setVisible(false);
|
||||
}
|
||||
|
||||
boolean isEcfCancel = (Boolean) Executions.getCurrent().getArg().get("ECF_CANCELADOS");
|
||||
boolean isEcfCancel = Executions.getCurrent().getArg().get("ECF_CANCELADOS") == null ? Boolean.FALSE : (Boolean) Executions.getCurrent().getArg().get("ECF_CANCELADOS");
|
||||
if (isEcfCancel) {
|
||||
btnExeImportacionEcfCancelados.setVisible(true);
|
||||
} else {
|
||||
btnExeImportacionEcfCancelados.setVisible(false);
|
||||
}
|
||||
|
||||
boolean isManual = (Boolean) Executions.getCurrent().getArg().get("MANUAL");
|
||||
boolean isManual = Executions.getCurrent().getArg().get("MANUAL") == null ? Boolean.FALSE : (Boolean) Executions.getCurrent().getArg().get("MANUAL");
|
||||
if (isManual) {
|
||||
btnExeImportacionManual.setVisible(true);
|
||||
} else {
|
||||
btnExeImportacionManual.setVisible(false);
|
||||
}
|
||||
|
||||
boolean isReducaoZ = (Boolean) Executions.getCurrent().getArg().get("REDUCAO_Z");
|
||||
boolean isReducaoZ = Executions.getCurrent().getArg().get("REDUCAO_Z") == null ? Boolean.FALSE : (Boolean) Executions.getCurrent().getArg().get("REDUCAO_Z");
|
||||
if (isReducaoZ) {
|
||||
btnExeImportacionReducaoZ.setVisible(true);
|
||||
} else {
|
||||
btnExeImportacionReducaoZ.setVisible(false);
|
||||
}
|
||||
|
||||
boolean isNaoFiscal = (Boolean) Executions.getCurrent().getArg().get("NAO_FISCAL");
|
||||
boolean isNaoFiscal = Executions.getCurrent().getArg().get("NAO_FISCAL") == null ? Boolean.FALSE : (Boolean) Executions.getCurrent().getArg().get("NAO_FISCAL");
|
||||
if (isNaoFiscal) {
|
||||
btnExeImportacionNaoFiscal.setVisible(true);
|
||||
} else {
|
||||
btnExeImportacionNaoFiscal.setVisible(false);
|
||||
}
|
||||
|
||||
boolean isRelatorioFinanceiro = (Boolean) Executions.getCurrent().getArg().get("RELATORIO_FINANCEIRO");
|
||||
boolean isRelatorioFinanceiro = Executions.getCurrent().getArg().get("RELATORIO_FINANCEIRO") == null ? Boolean.FALSE : (Boolean) Executions.getCurrent().getArg().get("RELATORIO_FINANCEIRO");
|
||||
if (isRelatorioFinanceiro) {
|
||||
btnExeRelatorioFinanceiro.setVisible(true);
|
||||
} else {
|
||||
btnExeRelatorioFinanceiro.setVisible(false);
|
||||
}
|
||||
|
||||
boolean isRelatorioVoucher = (Boolean) Executions.getCurrent().getArg().get("RELATORIO_VOUCHER");
|
||||
boolean isRelatorioVoucher = Executions.getCurrent().getArg().get("RELATORIO_VOUCHER") == null ? Boolean.FALSE : (Boolean) Executions.getCurrent().getArg().get("RELATORIO_VOUCHER");
|
||||
if (isRelatorioVoucher) {
|
||||
btnExeRelatorioVoucher.setVisible(true);
|
||||
} else {
|
||||
btnExeRelatorioVoucher.setVisible(false);
|
||||
}
|
||||
|
||||
boolean isRelatorioPendenciaEcf = (Boolean) Executions.getCurrent().getArg().get("PENDENCIA_ECF");
|
||||
boolean isRelatorioPendenciaEcf = Executions.getCurrent().getArg().get("PENDENCIA_ECF") == null ? Boolean.FALSE : (Boolean) Executions.getCurrent().getArg().get("PENDENCIA_ECF");
|
||||
if (isRelatorioPendenciaEcf) {
|
||||
btnExeRelatorioPendenciaEcf.setVisible(true);
|
||||
} else {
|
||||
btnExeRelatorioPendenciaEcf.setVisible(false);
|
||||
}
|
||||
|
||||
boolean isRelatorioPendenciaReducaoZ = Executions.getCurrent().getArg().get("PENDENCIA_REDUCAO_Z") == null ? Boolean.FALSE : (Boolean) Executions.getCurrent().getArg().get("PENDENCIA_REDUCAO_Z");
|
||||
if (isRelatorioPendenciaReducaoZ) {
|
||||
btnExeRelatorioPendenciaReducaoZ.setVisible(true);
|
||||
} else {
|
||||
btnExeRelatorioPendenciaReducaoZ.setVisible(false);
|
||||
}
|
||||
|
||||
isExibirTipoGeracaoArquivo = (Boolean) Executions.getCurrent().getArg().get("ExibirTipoGeracaoArquivo");
|
||||
isExibirCompetencia = (Boolean) Executions.getCurrent().getArg().get("ExibirCompetencia");
|
||||
isExibirDatas = isExibirCompetencia != null ? !isExibirCompetencia : true;
|
||||
|
@ -265,6 +273,30 @@ public class BusquedaImportacionFiscalController extends MyGenericForwardCompose
|
|||
}
|
||||
}
|
||||
|
||||
public void onClick$btnExeRelatorioPendenciaReducaoZ(Event ev) throws InterruptedException {
|
||||
|
||||
Empresa empresa = null;
|
||||
Comboitem itemEmpresa = cmbEmpresa.getSelectedItem();
|
||||
if (itemEmpresa != null) {
|
||||
empresa = (Empresa) itemEmpresa.getValue();
|
||||
}
|
||||
|
||||
try {
|
||||
File arquivoTxt = fiscalService.importacionFiscalReducaoZPendencia(datInicial.getValue(), datFinal.getValue(), empresa);
|
||||
File arquivoXls = null;
|
||||
// if (chkArquivoXls.isChecked()) {
|
||||
// arquivoXls = fiscalService.importacionFiscalReducaoZXls(empresa, arquivoTxt);
|
||||
// }
|
||||
downloadArquivo(arquivoTxt, arquivoXls);
|
||||
/*
|
||||
* File arquivo = fiscalService.importacionFiscalReducaoZ(datInicial.getValue(), datFinal.getValue(), empresa); InputStream is = new FileInputStream(arquivo); Filedownload.save(is, "application/notepad", "fiscal_reducao_z" + DateUtil.getStringDate(Calendar.getInstance().getTime(), "yyyyMMddhhmm") + ".txt"); arquivo.delete();
|
||||
*/
|
||||
} catch (Exception e) {
|
||||
log.error("", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void onClick$btnExeImportacionReducaoZ(Event ev) throws InterruptedException {
|
||||
|
||||
Empresa empresa = null;
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.impressaofiscal;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.zkoss.util.resource.Labels;
|
||||
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.impressaofiscal.TipoImportacaoFiscal.TipoImportacao;
|
||||
|
||||
public class ItemMenuImportacionFiscalReducaoZPendencia extends DefaultItemMenuSistema {
|
||||
|
||||
public ItemMenuImportacionFiscalReducaoZPendencia() {
|
||||
super("indexController.mniImportacionFiscalPendenciaReducaoZ.label");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getClaveMenu() {
|
||||
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.RELATORIOS.IMPRESSAOFISCAL.MENU.IMPORTACIONFISCAL";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ejecutar() {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
HashMap<String, Boolean> map = TipoImportacaoFiscal.selecionaTipoImportacao(TipoImportacao.PENDENCIA_REDUCAO_Z, (HashMap<String, Boolean>) getArgs());
|
||||
// map.put("ExibirTipoGeracaoArquivo", true);
|
||||
|
||||
PantallaUtileria.openWindow("/gui/impressaofiscal/busquedaImportacionFiscal.zul",
|
||||
Labels.getLabel("busquedaImportacionFiscalEcfPendenciaReducaoZController.window.title"), map, desktop);
|
||||
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@ import java.util.HashMap;
|
|||
public class TipoImportacaoFiscal {
|
||||
|
||||
public enum TipoImportacao {
|
||||
ECF, ECF_CANCELADOS, MANUAL, REDUCAO_Z, NAO_FISCAL, RELATORIO_FINANCEIRO, RELATORIO_VOUCHER, PENDENCIA_ECF;
|
||||
ECF, ECF_CANCELADOS, MANUAL, REDUCAO_Z, NAO_FISCAL, RELATORIO_FINANCEIRO, RELATORIO_VOUCHER, PENDENCIA_ECF, PENDENCIA_REDUCAO_Z;
|
||||
}
|
||||
|
||||
public static HashMap<String, Boolean> selecionaTipoImportacao(TipoImportacao tipo, HashMap<String, Boolean> map) {
|
||||
|
@ -21,92 +21,40 @@ public class TipoImportacaoFiscal {
|
|||
|
||||
if (tipo.equals(TipoImportacao.ECF)) {
|
||||
map.put(TipoImportacao.ECF.toString(), Boolean.TRUE);
|
||||
map.put(TipoImportacao.ECF_CANCELADOS.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.MANUAL.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.REDUCAO_Z.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.NAO_FISCAL.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.RELATORIO_FINANCEIRO.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.RELATORIO_VOUCHER.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.PENDENCIA_ECF.toString(), Boolean.FALSE);
|
||||
}
|
||||
|
||||
if (tipo.equals(TipoImportacao.ECF_CANCELADOS)) {
|
||||
map.put(TipoImportacao.ECF.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.ECF_CANCELADOS.toString(), Boolean.TRUE);
|
||||
map.put(TipoImportacao.MANUAL.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.REDUCAO_Z.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.NAO_FISCAL.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.RELATORIO_FINANCEIRO.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.RELATORIO_VOUCHER.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.PENDENCIA_ECF.toString(), Boolean.FALSE);
|
||||
}
|
||||
|
||||
if (tipo.equals(TipoImportacao.MANUAL)) {
|
||||
map.put(TipoImportacao.ECF.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.ECF_CANCELADOS.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.MANUAL.toString(), Boolean.TRUE);
|
||||
map.put(TipoImportacao.REDUCAO_Z.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.NAO_FISCAL.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.RELATORIO_FINANCEIRO.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.RELATORIO_VOUCHER.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.PENDENCIA_ECF.toString(), Boolean.FALSE);
|
||||
}
|
||||
|
||||
if (tipo.equals(TipoImportacao.REDUCAO_Z)) {
|
||||
map.put(TipoImportacao.ECF.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.ECF_CANCELADOS.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.MANUAL.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.REDUCAO_Z.toString(), Boolean.TRUE);
|
||||
map.put(TipoImportacao.NAO_FISCAL.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.RELATORIO_FINANCEIRO.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.RELATORIO_VOUCHER.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.PENDENCIA_ECF.toString(), Boolean.FALSE);
|
||||
}
|
||||
|
||||
if (tipo.equals(TipoImportacao.NAO_FISCAL)) {
|
||||
map.put(TipoImportacao.ECF.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.ECF_CANCELADOS.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.MANUAL.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.REDUCAO_Z.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.NAO_FISCAL.toString(), Boolean.TRUE);
|
||||
map.put(TipoImportacao.RELATORIO_FINANCEIRO.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.RELATORIO_VOUCHER.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.PENDENCIA_ECF.toString(), Boolean.FALSE);
|
||||
}
|
||||
|
||||
if (tipo.equals(TipoImportacao.RELATORIO_FINANCEIRO)) {
|
||||
map.put(TipoImportacao.ECF.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.ECF_CANCELADOS.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.MANUAL.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.REDUCAO_Z.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.NAO_FISCAL.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.RELATORIO_FINANCEIRO.toString(), Boolean.TRUE);
|
||||
map.put(TipoImportacao.RELATORIO_VOUCHER.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.PENDENCIA_ECF.toString(), Boolean.FALSE);
|
||||
}
|
||||
|
||||
if (tipo.equals(TipoImportacao.RELATORIO_VOUCHER)) {
|
||||
map.put(TipoImportacao.ECF.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.ECF_CANCELADOS.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.MANUAL.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.REDUCAO_Z.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.NAO_FISCAL.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.RELATORIO_FINANCEIRO.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.RELATORIO_VOUCHER.toString(), Boolean.TRUE);
|
||||
map.put(TipoImportacao.PENDENCIA_ECF.toString(), Boolean.FALSE);
|
||||
}
|
||||
|
||||
if (tipo.equals(TipoImportacao.PENDENCIA_ECF)) {
|
||||
map.put(TipoImportacao.ECF.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.ECF_CANCELADOS.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.MANUAL.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.REDUCAO_Z.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.NAO_FISCAL.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.RELATORIO_FINANCEIRO.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.RELATORIO_VOUCHER.toString(), Boolean.FALSE);
|
||||
map.put(TipoImportacao.PENDENCIA_ECF.toString(), Boolean.TRUE);
|
||||
}
|
||||
|
||||
if (tipo.equals(TipoImportacao.PENDENCIA_REDUCAO_Z)) {
|
||||
map.put(TipoImportacao.PENDENCIA_REDUCAO_Z.toString(), Boolean.TRUE);
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
|
@ -283,6 +283,7 @@ indexController.mniImportacionNaoFiscal.label=Não Fiscal
|
|||
indexController.mniRelatorioFinanceiro.label=Financeiro
|
||||
indexController.mniRelatorioVoucher.label=Voucher
|
||||
indexController.mniImportacionFiscalPendenciaEcf.label=Pendência ECF
|
||||
indexController.mniImportacionFiscalPendenciaReducaoZ.label=Pendência Redução Z
|
||||
|
||||
indexController.mniSubMenuClientePacote.label=Paquete
|
||||
indexController.mniManutencaoPacote.label=Mantenimiento Paquete
|
||||
|
@ -6442,6 +6443,7 @@ busquedaImportacionFiscalNaoFiscalController.window.title=Impressão Fiscal :: N
|
|||
busquedaImportacionFiscalRelatorioFinanceiroController.window.title=Impressão Fiscal :: Relatório Financeiro
|
||||
busquedaImportacionFiscalRelatorioVoucherController.window.title=Impressão Fiscal :: Relatório Voucher
|
||||
busquedaImportacionFiscalEcfPendenciaController.window.title=Impressão Fiscal :: Pendência ECF
|
||||
busquedaImportacionFiscalEcfPendenciaReducaoZController.window.title=Impressão Fiscal :: Pendência Redução Z
|
||||
|
||||
#OCD
|
||||
busquedaOCDParamController.empresa.label=Empresa
|
||||
|
|
|
@ -289,6 +289,7 @@ indexController.mniImportacionNaoFiscal.label=Não Fiscal
|
|||
indexController.mniRelatorioFinanceiro.label=Financeiro
|
||||
indexController.mniRelatorioVoucher.label=Voucher
|
||||
indexController.mniImportacionFiscalPendenciaEcf.label=Pendência ECF
|
||||
indexController.mniImportacionFiscalPendenciaReducaoZ.label=Pendência Redução Z
|
||||
|
||||
indexController.mniSubMenuClientePacote.label=Pacote
|
||||
indexController.mniManutencaoPacote.label=Manutenção Pacote
|
||||
|
@ -6591,4 +6592,5 @@ busquedaImportacionFiscalReducaoZController.window.title=Impressão Fiscal :: Re
|
|||
busquedaImportacionFiscalNaoFiscalController.window.title=Impressão Fiscal :: Não Fiscal
|
||||
busquedaImportacionFiscalRelatorioFinanceiroController.window.title=Impressão Fiscal :: Relatório Financeiro
|
||||
busquedaImportacionFiscalRelatorioVoucherController.window.title=Impressão Fiscal :: Relatório Voucher
|
||||
busquedaImportacionFiscalEcfPendenciaController.window.title=Impressão Fiscal :: Pendência ECF
|
||||
busquedaImportacionFiscalEcfPendenciaController.window.title=Impressão Fiscal :: Pendência ECF
|
||||
busquedaImportacionFiscalEcfPendenciaReducaoZController.window.title=Impressão Fiscal :: Pendência Redução Z
|
|
@ -94,6 +94,10 @@
|
|||
|
||||
<button id="btnExeRelatorioPendenciaEcf" image="/gui/img/enginer.png"
|
||||
label="${c:l('busquedaImportacionFiscalController.btnExe.label')}" />
|
||||
|
||||
<button id="btnExeRelatorioPendenciaReducaoZ" image="/gui/img/enginer.png"
|
||||
label="${c:l('busquedaImportacionFiscalController.btnExe.label')}" />
|
||||
|
||||
</toolbar>
|
||||
|
||||
</window>
|
||||
|
|
Loading…
Reference in New Issue