bug #6817
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@54523 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
9391fd440e
commit
6de9d52323
|
@ -0,0 +1,118 @@
|
|||
package com.rjconsultores.ventaboletos.relatorios.impl;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.DataSource;
|
||||
import com.rjconsultores.ventaboletos.relatorios.utilitarios.Relatorio;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ItemRelatorioVoucher;
|
||||
|
||||
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
|
||||
|
||||
public class RelatorioAnaliticoVoucher extends Relatorio {
|
||||
|
||||
private static Logger log = Logger.getLogger(RelatorioAnaliticoVoucher.class);
|
||||
|
||||
List<ItemRelatorioVoucher> listdata = null;
|
||||
|
||||
public RelatorioAnaliticoVoucher(final Map<String, Object> parametros, Connection conexao) throws Exception {
|
||||
super(parametros, conexao);
|
||||
|
||||
this.setCustomDataSource(new DataSource(this) {
|
||||
@Override
|
||||
public void initDados() throws Exception {
|
||||
|
||||
try {
|
||||
Date inicio = (Date) parametros.get("inicio");
|
||||
Date fim = (Date) parametros.get("fim");
|
||||
Empresa empresa = (Empresa) parametros.get("empresa");
|
||||
|
||||
listdata = buscarMovimentosAnaliticos(inicio, fim, empresa.getEmpresaId());
|
||||
|
||||
} catch (SQLException e) {
|
||||
log.error("", e);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
this.setCollectionDataSource(new JRBeanCollectionDataSource(listdata));
|
||||
}
|
||||
|
||||
public List<ItemRelatorioVoucher> buscarMovimentosAnaliticos(Date inicio, Date fim, Integer empresaId) throws SQLException {
|
||||
|
||||
inicio = DateUtil.inicioFecha(inicio);
|
||||
fim = DateUtil.fimFecha(fim);
|
||||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("select ");
|
||||
sql.append(" TO_CHAR(b.fechorventa, 'dd-MM-yyyy') as dataVendaVoucher, ");
|
||||
sql.append(" TO_CHAR(impres.fechorventa, 'dd-MM-yyyy') as dataEmissao, ");
|
||||
sql.append(" e.nombempresa as empresa, ");
|
||||
sql.append(" fr4.coo as numDocFiscal, ");
|
||||
sql.append(" coalesce(b.numfoliosistema, impres.numfoliosistema) as bilhete, ");
|
||||
sql.append(" b.boleto_id as boletoVoucher, ");
|
||||
sql.append(" impres.boleto_id as boletoImpresso, ");
|
||||
sql.append(" tv.desctipoventa as tipoVenda, ");
|
||||
sql.append(" case when b.motivocancelacion_id in (31, 32) then b.preciopagado * -1 else b.preciopagado end as tarifa, ");
|
||||
sql.append(" case when b.motivocancelacion_id in (31, 32) then b.importepedagio * -1 else b.importepedagio end as pedagio, ");
|
||||
sql.append(" case when b.motivocancelacion_id in (31, 32) then b.importetaxaembarque * -1 else b.importetaxaembarque end as embarque, ");
|
||||
sql.append(" case when mc.descmotivo is null then 'VOUCHER' else mc.descmotivo end as status ");
|
||||
sql.append(" from boleto b ");
|
||||
sql.append(" join empresa e on b.marca_id = e.empresa_id ");
|
||||
sql.append(" left join boleto impres on b.boleto_id = impres.boletooriginal_id ");
|
||||
sql.append(" left join fiscal_r4 fr4 on impres.boleto_id = fr4.boleto_id ");
|
||||
sql.append(" left join tipo_venta tv on tv.tipoventa_id = coalesce(b.tipoventa_id, impres.tipoventa_id) ");
|
||||
sql.append(" left join motivo_cancelacion mc on mc.motivocancelacion_id = coalesce(b.motivocancelacion_id, impres.motivocancelacion_id) ");
|
||||
sql.append(" where b.tipoventa_id in (5,12,18) ");
|
||||
sql.append(" and b.fechorventa between ? and ? ");
|
||||
sql.append(" and b.marca_id = ? ");
|
||||
sql.append(" order by dataVendaVoucher, dataEmissao desc ");
|
||||
|
||||
PreparedStatement stmt = getConexao().prepareStatement(sql.toString());
|
||||
stmt.setTimestamp(1, new java.sql.Timestamp(inicio.getTime()));
|
||||
stmt.setTimestamp(2, new java.sql.Timestamp(fim.getTime()));
|
||||
stmt.setInt(3, empresaId);
|
||||
|
||||
ResultSet rset = stmt.executeQuery();
|
||||
List<ItemRelatorioVoucher> list = new ArrayList<ItemRelatorioVoucher>();
|
||||
while (rset.next()) {
|
||||
ItemRelatorioVoucher item = new ItemRelatorioVoucher();
|
||||
|
||||
item.setDataVendaVoucher(rset.getString("dataVendaVoucher"));
|
||||
item.setDataEmissao(rset.getString("dataEmissao"));
|
||||
item.setEmpresa(rset.getString("empresa"));
|
||||
item.setNumDocFiscal(rset.getString("numDocFiscal"));
|
||||
item.setBilhete(rset.getString("bilhete"));
|
||||
item.setBoletoVoucher(rset.getLong("boletoVoucher"));
|
||||
item.setBoletoImpresso(rset.getLong("boletoImpresso"));
|
||||
item.setTipoVenda(rset.getString("tipoVenda"));
|
||||
item.setTarifa(rset.getBigDecimal("tarifa"));
|
||||
item.setPedagio(rset.getBigDecimal("pedagio"));
|
||||
item.setEmbarque(rset.getBigDecimal("embarque"));
|
||||
item.setStatus(rset.getString("status"));
|
||||
|
||||
list.add(item);
|
||||
}
|
||||
|
||||
if (!getConexao().isClosed())
|
||||
getConexao().close();
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void processaParametros() throws Exception {
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
#geral
|
||||
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
|
@ -0,0 +1,2 @@
|
|||
#geral
|
||||
msg.noData=Não foi possivel obter dados com os parâmetros informados.
|
Binary file not shown.
|
@ -0,0 +1,227 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="RelatorioAnaliticoVoucher" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="0e8aff42-5ba8-48ac-9950-da8178561888">
|
||||
<property name="ireport.zoom" value="1.0"/>
|
||||
<property name="ireport.x" value="0"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<parameter name="inicio" class="java.util.Date"/>
|
||||
<parameter name="fim" class="java.util.Date"/>
|
||||
<field name="dataVendaVoucher" class="java.lang.String"/>
|
||||
<field name="dataEmissao" class="java.lang.String"/>
|
||||
<field name="empresa" class="java.lang.String"/>
|
||||
<field name="numDocFiscal" class="java.lang.String"/>
|
||||
<field name="bilhete" class="java.lang.String"/>
|
||||
<field name="tipoVenda" class="java.lang.String"/>
|
||||
<field name="status" class="java.lang.String"/>
|
||||
<field name="tarifa" class="java.math.BigDecimal"/>
|
||||
<field name="pedagio" class="java.math.BigDecimal"/>
|
||||
<field name="embarque" class="java.math.BigDecimal"/>
|
||||
<background>
|
||||
<band splitType="Stretch"/>
|
||||
</background>
|
||||
<title>
|
||||
<band height="65" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement x="84" y="40" width="471" height="23" uuid="63ce47a3-7e94-42a2-8325-eceef777fbe2"/>
|
||||
<textElement verticalAlignment="Middle"/>
|
||||
<textFieldExpression><![CDATA[$F{empresa}]]></textFieldExpression>
|
||||
</textField>
|
||||
<staticText>
|
||||
<reportElement x="0" y="0" width="276" height="20" uuid="2e2e9caa-4076-4209-bdaf-0017ddf83a56"/>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font size="14" isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[ANALITICO DE VOUCHERS]]></text>
|
||||
</staticText>
|
||||
<textField pattern="dd/MM/yyyy HH:mm">
|
||||
<reportElement x="276" y="0" width="279" height="20" uuid="6b4f1375-4f4b-4b80-83b8-7650e62e107e"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="0" y="20" width="80" height="20" uuid="3f1d0681-30be-4c3a-ae90-cf34dd4ede3c"/>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA["Período: "]]></textFieldExpression>
|
||||
</textField>
|
||||
<staticText>
|
||||
<reportElement x="0" y="40" width="84" height="23" uuid="cf05ce5a-615b-41ac-b24d-2c45ca1bc60e"/>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Empresa:]]></text>
|
||||
</staticText>
|
||||
<textField pattern="dd/MM/yyyy">
|
||||
<reportElement x="80" y="20" width="78" height="20" uuid="7f5ee01d-f86d-49a4-a2a1-f1c671621ef0"/>
|
||||
<textElement textAlignment="Left" verticalAlignment="Middle"/>
|
||||
<textFieldExpression><![CDATA[$P{inicio}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="158" y="20" width="28" height="20" uuid="c1dec10a-743d-4569-916d-f1b65d4475b7"/>
|
||||
<textElement verticalAlignment="Middle">
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[" a "]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="dd/MM/yyyy">
|
||||
<reportElement x="186" y="20" width="369" height="20" uuid="0b39fe78-5378-404c-b364-8be6ca288e25"/>
|
||||
<textElement verticalAlignment="Middle"/>
|
||||
<textFieldExpression><![CDATA[$P{fim}]]></textFieldExpression>
|
||||
</textField>
|
||||
<line>
|
||||
<reportElement x="0" y="63" width="555" height="1" uuid="481b2107-ee62-4815-8a89-8435d34384c8"/>
|
||||
</line>
|
||||
</band>
|
||||
</title>
|
||||
<pageHeader>
|
||||
<band splitType="Stretch"/>
|
||||
</pageHeader>
|
||||
<columnHeader>
|
||||
<band height="22" splitType="Stretch">
|
||||
<staticText>
|
||||
<reportElement x="0" y="0" width="48" height="20" uuid="50fa60b3-221d-4212-b152-b48b594ed56a"/>
|
||||
<textElement>
|
||||
<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Data Venda]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement x="103" y="0" width="62" height="20" uuid="ee589d02-2cee-4658-b6f9-349848c75f44"/>
|
||||
<textElement>
|
||||
<font fontName="SansSerif" size="7" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
|
||||
</textElement>
|
||||
<text><![CDATA[COO (Nº FISCAL)]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement x="165" y="0" width="47" height="20" uuid="4b7ed572-ce95-425f-9c5f-2126e90c47b9"/>
|
||||
<textElement>
|
||||
<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Bilhete]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement x="212" y="0" width="90" height="20" uuid="32335d78-4824-437e-838c-de0b3751553c"/>
|
||||
<textElement>
|
||||
<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Tipo Venda]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement x="302" y="0" width="103" height="20" uuid="0bf25756-adb5-4916-a5d4-35f8328416a7"/>
|
||||
<textElement>
|
||||
<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Status]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement x="405" y="0" width="58" height="20" uuid="e4898d0c-32c3-4749-93ae-a826e6afeca4"/>
|
||||
<textElement>
|
||||
<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Tarifa]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement x="463" y="0" width="42" height="20" uuid="3cf6b3ba-fb0b-4e64-b3f3-f779644659e9"/>
|
||||
<textElement>
|
||||
<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Pedagio]]></text>
|
||||
</staticText>
|
||||
<staticText>
|
||||
<reportElement x="505" y="0" width="50" height="20" uuid="3aa2a829-891e-48e6-aef1-540d5ddd9877"/>
|
||||
<textElement>
|
||||
<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Embarque]]></text>
|
||||
</staticText>
|
||||
<line>
|
||||
<reportElement x="0" y="20" width="555" height="1" uuid="a33f21d9-c821-4fa9-8dd8-1768914351f2"/>
|
||||
</line>
|
||||
<staticText>
|
||||
<reportElement x="48" y="0" width="55" height="20" uuid="c9c171bb-64d8-41d8-a2c5-cc89e4a420aa"/>
|
||||
<textElement>
|
||||
<font fontName="SansSerif" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
|
||||
</textElement>
|
||||
<text><![CDATA[Data Emissão]]></text>
|
||||
</staticText>
|
||||
</band>
|
||||
</columnHeader>
|
||||
<detail>
|
||||
<band height="21" splitType="Stretch">
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="0" y="0" width="48" height="20" uuid="880453bc-b85e-49c3-996a-6441cf25df5f"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{dataVendaVoucher}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="48" y="0" width="55" height="20" uuid="04367436-a76e-4e64-a157-4325ce7d98a5"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{dataEmissao}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="103" y="0" width="62" height="20" uuid="1e0ca195-eef6-46b7-ba9f-66af0ef33209"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{numDocFiscal}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="165" y="0" width="47" height="20" uuid="2564f9af-3487-4dda-bfaa-4467ea076db0"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{bilhete}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="212" y="0" width="90" height="20" uuid="5a614727-0d7b-41da-a7b7-293558bf2bdc"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{tipoVenda}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="302" y="0" width="103" height="20" uuid="45664dba-aceb-4198-bcc7-5e6567daf0a5"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{status}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="¤ #,##0.00" isBlankWhenNull="true">
|
||||
<reportElement x="405" y="0" width="58" height="20" uuid="c3aa8f19-46d6-4c0b-9703-e74adaa2b5d7"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{tarifa}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="¤ #,##0.00" isBlankWhenNull="true">
|
||||
<reportElement x="463" y="0" width="42" height="20" uuid="655984a8-3e4a-4ac7-8816-317469c6a3ee"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{pedagio}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="¤ #,##0.00" isBlankWhenNull="true">
|
||||
<reportElement x="505" y="0" width="50" height="20" uuid="fced1969-520a-4be8-b126-45c7dc8fae72"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{embarque}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</detail>
|
||||
<columnFooter>
|
||||
<band splitType="Stretch"/>
|
||||
</columnFooter>
|
||||
<pageFooter>
|
||||
<band splitType="Stretch"/>
|
||||
</pageFooter>
|
||||
<summary>
|
||||
<band height="33" splitType="Stretch"/>
|
||||
</summary>
|
||||
</jasperReport>
|
|
@ -28,6 +28,7 @@ import org.zkoss.zul.Filedownload;
|
|||
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioAnaliticoFinanceiro;
|
||||
import com.rjconsultores.ventaboletos.relatorios.impl.RelatorioAnaliticoVoucher;
|
||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||
import com.rjconsultores.ventaboletos.service.FiscalService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
|
@ -58,6 +59,7 @@ public class BusquedaImportacionFiscalController extends MyGenericForwardCompose
|
|||
private Button btnExeImportacionManual;
|
||||
private Button btnExeImportacionNaoFiscal;
|
||||
private Button btnExeRelatorioFinanceiro;
|
||||
private Button btnExeRelatorioVoucher;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
@ -111,6 +113,13 @@ public class BusquedaImportacionFiscalController extends MyGenericForwardCompose
|
|||
btnExeRelatorioFinanceiro.setVisible(false);
|
||||
}
|
||||
|
||||
boolean isRelatorioVoucher = (Boolean) Executions.getCurrent().getArg().get("RELATORIO_VOUCHER");
|
||||
if (isRelatorioVoucher) {
|
||||
btnExeRelatorioVoucher.setVisible(true);
|
||||
} else {
|
||||
btnExeRelatorioVoucher.setVisible(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void onClick$btnExeImportacionManual(Event ev) throws InterruptedException {
|
||||
|
@ -240,6 +249,35 @@ public class BusquedaImportacionFiscalController extends MyGenericForwardCompose
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void onClick$btnExeRelatorioVoucher(Event ev) throws InterruptedException {
|
||||
try {
|
||||
Empresa empresa = null;
|
||||
Comboitem itemEmpresa = cmbEmpresa.getSelectedItem();
|
||||
if (itemEmpresa != null) {
|
||||
empresa = (Empresa) itemEmpresa.getValue();
|
||||
}
|
||||
|
||||
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||
parametros.put("inicio", datInicial.getValue());
|
||||
parametros.put("fim", datFinal.getValue());
|
||||
parametros.put("empresa", empresa);
|
||||
|
||||
RelatorioAnaliticoVoucher relatorio = new RelatorioAnaliticoVoucher(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("relatorio", relatorio);
|
||||
|
||||
openWindow("/component/reportView.zul",
|
||||
Labels.getLabel("relatorioAproveitamentoController.window.title"), args, MODAL);
|
||||
|
||||
} catch (SQLException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
public List<Empresa> getLsEmpresa() {
|
||||
return lsEmpresa;
|
||||
}
|
||||
|
|
|
@ -5,12 +5,19 @@ import java.util.HashMap;
|
|||
public class TipoImportacaoFiscal {
|
||||
|
||||
public enum TipoImportacao {
|
||||
ECF, ECF_CANCELADOS, MANUAL, REDUCAO_Z, NAO_FISCAL, RELATORIO_FINANCEIRO;
|
||||
ECF, ECF_CANCELADOS, MANUAL, REDUCAO_Z, NAO_FISCAL, RELATORIO_FINANCEIRO, RELATORIO_VOUCHER;
|
||||
}
|
||||
|
||||
public static HashMap<String, Boolean> selecionaTipoImportacao(TipoImportacao tipo, HashMap<String, Boolean> args) {
|
||||
public static HashMap<String, Boolean> selecionaTipoImportacao(TipoImportacao tipo, HashMap<String, Boolean> map) {
|
||||
|
||||
map.remove(TipoImportacao.ECF.toString());
|
||||
map.remove(TipoImportacao.ECF_CANCELADOS.toString());
|
||||
map.remove(TipoImportacao.MANUAL.toString());
|
||||
map.remove(TipoImportacao.REDUCAO_Z.toString());
|
||||
map.remove(TipoImportacao.NAO_FISCAL.toString());
|
||||
map.remove(TipoImportacao.RELATORIO_FINANCEIRO.toString());
|
||||
map.remove(TipoImportacao.RELATORIO_VOUCHER.toString());
|
||||
|
||||
HashMap<String, Boolean> map = args;
|
||||
if (tipo.equals(TipoImportacao.ECF)) {
|
||||
map.put(TipoImportacao.ECF.toString(), Boolean.TRUE);
|
||||
map.put(TipoImportacao.ECF_CANCELADOS.toString(), Boolean.FALSE);
|
||||
|
@ -18,6 +25,7 @@ public class TipoImportacaoFiscal {
|
|||
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);
|
||||
}
|
||||
|
||||
if (tipo.equals(TipoImportacao.ECF_CANCELADOS)) {
|
||||
|
@ -27,6 +35,7 @@ public class TipoImportacaoFiscal {
|
|||
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);
|
||||
}
|
||||
|
||||
if (tipo.equals(TipoImportacao.MANUAL)) {
|
||||
|
@ -36,6 +45,7 @@ public class TipoImportacaoFiscal {
|
|||
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);
|
||||
}
|
||||
|
||||
if (tipo.equals(TipoImportacao.REDUCAO_Z)) {
|
||||
|
@ -45,6 +55,7 @@ public class TipoImportacaoFiscal {
|
|||
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);
|
||||
}
|
||||
|
||||
if (tipo.equals(TipoImportacao.NAO_FISCAL)) {
|
||||
|
@ -54,6 +65,7 @@ public class TipoImportacaoFiscal {
|
|||
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);
|
||||
}
|
||||
|
||||
if (tipo.equals(TipoImportacao.RELATORIO_FINANCEIRO)) {
|
||||
|
@ -63,6 +75,17 @@ public class TipoImportacaoFiscal {
|
|||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
return map;
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.impressaofiscal.relatorios;
|
||||
|
||||
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;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.menu.item.relatorios.impressaofiscal.TipoImportacaoFiscal.TipoImportacao;
|
||||
|
||||
public class ItemMenuFiscalRelatorioVoucher extends DefaultItemMenuSistema {
|
||||
|
||||
public ItemMenuFiscalRelatorioVoucher() {
|
||||
super("indexController.mniRelatorioVoucher.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.RELATORIO_VOUCHER, (HashMap<String, Boolean>) getArgs());
|
||||
|
||||
PantallaUtileria.openWindow("/gui/impressaofiscal/busquedaImportacionFiscal.zul",
|
||||
Labels.getLabel("busquedaImportacionFiscalController.window.title"), map, desktop);
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -280,6 +280,7 @@ indexController.mniImportacionFiscalManual.label=Manual
|
|||
indexController.mniImportacionFiscalReducaoZ.label=Redução Z
|
||||
indexController.mniImportacionNaoFiscal.label=Não Fiscal
|
||||
indexController.mniRelatorioFinanceiro.label=Financeiro
|
||||
indexController.mniRelatorioVoucher.label=Voucher
|
||||
|
||||
indexController.mniSubMenuClientePacote.label=Paquete
|
||||
indexController.mniManutencaoPacote.label=Mantenimiento Paquete
|
||||
|
|
|
@ -286,6 +286,7 @@ indexController.mniImportacionFiscalManual.label=Manual
|
|||
indexController.mniImportacionFiscalReducaoZ.label=Redução Z
|
||||
indexController.mniImportacionNaoFiscal.label=Não Fiscal
|
||||
indexController.mniRelatorioFinanceiro.label=Financeiro
|
||||
indexController.mniRelatorioVoucher.label=Voucher
|
||||
|
||||
indexController.mniSubMenuClientePacote.label=Pacote
|
||||
indexController.mniManutencaoPacote.label=Manutenção Pacote
|
||||
|
|
|
@ -63,6 +63,9 @@
|
|||
<button id="btnExeRelatorioFinanceiro" image="/gui/img/enginer.png"
|
||||
label="${c:l('busquedaImportacionFiscalController.btnExe.label')}" />
|
||||
|
||||
<button id="btnExeRelatorioVoucher" image="/gui/img/enginer.png"
|
||||
label="${c:l('busquedaImportacionFiscalController.btnExe.label')}" />
|
||||
|
||||
</toolbar>
|
||||
|
||||
</window>
|
||||
|
|
Loading…
Reference in New Issue