bug #8977
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@69361 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
2c7528adf0
commit
a34e213573
Binary file not shown.
|
@ -1,7 +1,7 @@
|
|||
<?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="RelatorioImpressaoRMD" printOrder="Horizontal" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="d3d490c9-33e7-4eeb-97cc-1fa9be0f10d4">
|
||||
<property name="ireport.zoom" value="1.6105100000000008"/>
|
||||
<property name="ireport.x" value="526"/>
|
||||
<property name="ireport.zoom" value="1.948717100000002"/>
|
||||
<property name="ireport.x" value="448"/>
|
||||
<property name="ireport.y" value="0"/>
|
||||
<field name="empresa" class="java.lang.String"/>
|
||||
<field name="enderecoEmpresa" class="java.lang.String"/>
|
||||
|
@ -39,131 +39,131 @@
|
|||
<band splitType="Stretch"/>
|
||||
</background>
|
||||
<title>
|
||||
<band height="102" splitType="Stretch">
|
||||
<band splitType="Stretch"/>
|
||||
</title>
|
||||
<pageHeader>
|
||||
<band height="111" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement x="278" y="1" width="343" height="20" uuid="76bd1c26-ed5d-4155-916b-f90dbdb2b9dc"/>
|
||||
<reportElement x="277" y="0" width="343" height="20" uuid="76bd1c26-ed5d-4155-916b-f90dbdb2b9dc"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{empresa}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="278" y="21" width="343" height="20" uuid="1bc67f62-16e9-4681-891c-4d2680466d91"/>
|
||||
<reportElement x="277" y="20" width="343" height="20" uuid="1bc67f62-16e9-4681-891c-4d2680466d91"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{enderecoEmpresa}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="278" y="61" width="343" height="20" uuid="fe223feb-b29e-4f97-b359-272aa857ce87"/>
|
||||
<reportElement x="277" y="60" width="343" height="20" uuid="fe223feb-b29e-4f97-b359-272aa857ce87"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{ieEmpresa}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="278" y="41" width="343" height="20" uuid="cc73dace-ff3e-40cf-8292-9519af0108d4"/>
|
||||
<reportElement x="277" y="40" width="343" height="20" uuid="cc73dace-ff3e-40cf-8292-9519af0108d4"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{cnpjEmpresa}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="dd/MM/yyyy">
|
||||
<reportElement x="278" y="81" width="343" height="20" uuid="b716c82c-1944-4691-b907-1d194b41ecfd"/>
|
||||
<reportElement x="277" y="80" width="343" height="20" uuid="b716c82c-1944-4691-b907-1d194b41ecfd"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="676" y="21" width="126" height="20" uuid="1c447225-9f55-4f72-a269-d29c272ef2a4"/>
|
||||
<reportElement x="675" y="20" width="126" height="20" uuid="1c447225-9f55-4f72-a269-d29c272ef2a4"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{folio} != null ? Integer.parseInt($F{folio}) + ($V{PAGE_NUMBER} - 1) : $F{rmd}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="621" y="81" width="181" height="20" uuid="6de6219d-29c1-43bb-91be-718a93ee5e7b"/>
|
||||
<reportElement x="620" y="80" width="181" height="20" uuid="6de6219d-29c1-43bb-91be-718a93ee5e7b"/>
|
||||
<textElement>
|
||||
<font size="8"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{naturezaOperacao}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</title>
|
||||
<pageHeader>
|
||||
<band height="13" splitType="Stretch"/>
|
||||
</pageHeader>
|
||||
<columnHeader>
|
||||
<band splitType="Stretch"/>
|
||||
</columnHeader>
|
||||
<detail>
|
||||
<band height="16" splitType="Stretch">
|
||||
<band height="15" splitType="Stretch">
|
||||
<textField>
|
||||
<reportElement x="0" y="0" width="41" height="15" uuid="d9a99502-1f1e-4f22-930f-66bd8be3c7f0"/>
|
||||
<reportElement x="0" y="0" width="41" height="14" uuid="d9a99502-1f1e-4f22-930f-66bd8be3c7f0"/>
|
||||
<textElement>
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{tipo}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="41" y="0" width="150" height="15" uuid="b8964ae5-2660-4461-926e-8b7734cbe07f"/>
|
||||
<reportElement x="41" y="0" width="150" height="14" uuid="b8964ae5-2660-4461-926e-8b7734cbe07f"/>
|
||||
<textElement>
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{serie}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="191" y="0" width="70" height="15" uuid="b5444b15-beaa-42fb-814d-424acf42b6ab"/>
|
||||
<reportElement x="191" y="0" width="70" height="14" uuid="b5444b15-beaa-42fb-814d-424acf42b6ab"/>
|
||||
<textElement>
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{numero}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00" isBlankWhenNull="true">
|
||||
<reportElement x="261" y="0" width="70" height="15" uuid="f8fbd690-36bd-4d69-9af4-1490ec205698"/>
|
||||
<reportElement x="261" y="0" width="70" height="14" uuid="f8fbd690-36bd-4d69-9af4-1490ec205698"/>
|
||||
<textElement>
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{valorContabil}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00" isBlankWhenNull="true">
|
||||
<reportElement x="331" y="0" width="75" height="15" uuid="21f2b8f9-1acd-4e7d-bb27-643cfae50748"/>
|
||||
<reportElement x="331" y="0" width="75" height="14" uuid="21f2b8f9-1acd-4e7d-bb27-643cfae50748"/>
|
||||
<textElement>
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{baseCalculo}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00" isBlankWhenNull="true">
|
||||
<reportElement x="406" y="0" width="38" height="15" uuid="565fe3d7-bce7-480f-829f-0238cf7d2d74"/>
|
||||
<reportElement x="406" y="0" width="38" height="14" uuid="565fe3d7-bce7-480f-829f-0238cf7d2d74"/>
|
||||
<textElement>
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{aliquota}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00" isBlankWhenNull="true">
|
||||
<reportElement x="444" y="0" width="76" height="15" uuid="c07a3fa8-12c6-4a5b-8707-02c0524f943c"/>
|
||||
<reportElement x="444" y="0" width="76" height="14" uuid="c07a3fa8-12c6-4a5b-8707-02c0524f943c"/>
|
||||
<textElement>
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{icms}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00" isBlankWhenNull="true">
|
||||
<reportElement x="588" y="1" width="69" height="15" uuid="4f082fb1-15bc-41f6-985e-0f670459fceb"/>
|
||||
<reportElement x="588" y="0" width="69" height="14" uuid="4f082fb1-15bc-41f6-985e-0f670459fceb"/>
|
||||
<textElement>
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{outros}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="657" y="1" width="145" height="15" uuid="7c171d60-9889-4845-89d5-f656e34b1c37"/>
|
||||
<reportElement x="657" y="0" width="145" height="14" uuid="7c171d60-9889-4845-89d5-f656e34b1c37"/>
|
||||
<textElement>
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$F{obs}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00" isBlankWhenNull="true">
|
||||
<reportElement x="520" y="0" width="68" height="15" uuid="60865331-9449-4435-8b4a-664b747a90b3"/>
|
||||
<reportElement x="520" y="0" width="68" height="14" uuid="60865331-9449-4435-8b4a-664b747a90b3"/>
|
||||
<textElement>
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
|
@ -175,37 +175,37 @@
|
|||
<band splitType="Stretch"/>
|
||||
</columnFooter>
|
||||
<pageFooter>
|
||||
<band height="17" splitType="Stretch">
|
||||
<band height="14" splitType="Stretch">
|
||||
<textField pattern="###0.00" isBlankWhenNull="true">
|
||||
<reportElement x="261" y="0" width="70" height="15" uuid="e6c0383c-5062-4b22-989b-d1619add3ade"/>
|
||||
<reportElement x="261" y="0" width="70" height="14" uuid="e6c0383c-5062-4b22-989b-d1619add3ade"/>
|
||||
<textElement>
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{sum_valorContabil}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00" isBlankWhenNull="true">
|
||||
<reportElement x="331" y="0" width="75" height="15" uuid="810c93ac-4d8b-4edb-800c-ec2753286bb1"/>
|
||||
<reportElement x="331" y="0" width="75" height="14" uuid="810c93ac-4d8b-4edb-800c-ec2753286bb1"/>
|
||||
<textElement>
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{sum_baseCalculo}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00" isBlankWhenNull="true">
|
||||
<reportElement x="444" y="0" width="76" height="15" uuid="0a93d431-1b76-4590-aa1b-9af22283a5b3"/>
|
||||
<reportElement x="444" y="0" width="76" height="14" uuid="0a93d431-1b76-4590-aa1b-9af22283a5b3"/>
|
||||
<textElement>
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{sum_icms}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00" isBlankWhenNull="true">
|
||||
<reportElement x="520" y="0" width="68" height="15" uuid="748316ed-feb8-4a2d-9103-764eeb74873d"/>
|
||||
<reportElement x="520" y="0" width="68" height="14" uuid="748316ed-feb8-4a2d-9103-764eeb74873d"/>
|
||||
<textElement>
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
<textFieldExpression><![CDATA[$V{sum_isentos}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00" isBlankWhenNull="true">
|
||||
<reportElement x="588" y="0" width="69" height="15" uuid="66628be0-d424-4d61-96dc-aaf8652ded42"/>
|
||||
<reportElement x="588" y="0" width="69" height="14" uuid="66628be0-d424-4d61-96dc-aaf8652ded42"/>
|
||||
<textElement>
|
||||
<font size="6"/>
|
||||
</textElement>
|
||||
|
|
|
@ -65,7 +65,7 @@ public class BusquedaImpressaoRMDController extends MyGenericForwardComposer {
|
|||
|
||||
private Datebox datInicial;
|
||||
private Datebox datFinal;
|
||||
|
||||
|
||||
private MyTextbox folioInicial;
|
||||
|
||||
private MyComboboxEstandar cmbEmpresa;
|
||||
|
@ -112,43 +112,34 @@ public class BusquedaImpressaoRMDController extends MyGenericForwardComposer {
|
|||
};
|
||||
cmbAidf.setItemRenderer(aidfRenderer);
|
||||
cmbAidf.setModel(new BindingListModelList(lsAidf, true));
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public void onClick$btnExecutar(Event ev) throws InterruptedException {
|
||||
private void executarImpressao(boolean isView, boolean isExecutarRmd, boolean isCancelarRmd) throws InterruptedException {
|
||||
|
||||
Empresa empresa = cmbEmpresa.getSelectedItem() == null ? null : (Empresa) cmbEmpresa.getSelectedItem().getValue();
|
||||
Estado estado = cmbEstado.getSelectedItem() == null ? null : (Estado) cmbEstado.getSelectedItem().getValue();
|
||||
Aidf aidf = cmbAidf.getSelectedItem() == null ? null : (Aidf) cmbAidf.getSelectedItem().getValue();
|
||||
|
||||
int respAidf = Messagebox.NO;
|
||||
|
||||
if (empresa != null && estado != null) {
|
||||
try {
|
||||
String rmd = null;
|
||||
if (aidf != null) {
|
||||
|
||||
rmd = aidf.getDocfiscal();
|
||||
respAidf = Messagebox.show(
|
||||
Labels.getLabel("busquedaImpressaoRMDController.MSG.gravarRMDPergunta"),
|
||||
Labels.getLabel("busquedaImpressaoRMDController.mnImpressaoRMD.label"),
|
||||
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
// closeWindow();
|
||||
|
||||
} else {
|
||||
Messagebox.show(Labels.getLabel("busquedaImpressaoRMDController.select.RMD"),
|
||||
Labels.getLabel("busquedaImpressaoRMDController.mnImpressaoRMD.label"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
String folio = folioInicial.getValue();
|
||||
if (folio == null) {
|
||||
respAidf = Messagebox.show(
|
||||
Messagebox.show(
|
||||
Labels.getLabel("busquedaImpressaoRMDController.select.RMD"),
|
||||
Labels.getLabel("busquedaImpressaoRMDController.mnImpressaoRMD.label"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
List<ImpressaoRMD> list = null;
|
||||
|
@ -162,21 +153,25 @@ public class BusquedaImpressaoRMDController extends MyGenericForwardComposer {
|
|||
datInicial.getValue(), datFinal.getValue(), empresa, estado, rmd, folio);
|
||||
}
|
||||
|
||||
if (respAidf == Messagebox.YES) {
|
||||
fiscalService.gravarRMDBoleto(dataSourceRead.getConnection(), list, aidf);
|
||||
if (isExecutarRmd)
|
||||
fiscalService.gravarRMDBoleto(dataSourceRead.getConnection(), list, aidf, folio);
|
||||
|
||||
if (isCancelarRmd)
|
||||
fiscalService.cancelarRMDBoleto(dataSourceRead.getConnection(), datInicial.getValue(), datFinal.getValue(), empresa, estado, aidf, folio);
|
||||
|
||||
if (!isCancelarRmd) {
|
||||
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||
parametros.put("list", list);
|
||||
|
||||
Relatorio relatorio = new RelatorioImpressaoRMD(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("relatorio", relatorio);
|
||||
|
||||
openWindow("/component/reportView.zul",
|
||||
Labels.getLabel("indexController.mnImpressaoRMD.label"), args, MODAL);
|
||||
}
|
||||
|
||||
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||
parametros.put("list", list);
|
||||
|
||||
Relatorio relatorio = new RelatorioImpressaoRMD(parametros, dataSourceRead.getConnection());
|
||||
|
||||
Map args = new HashMap();
|
||||
args.put("relatorio", relatorio);
|
||||
|
||||
openWindow("/component/reportView.zul",
|
||||
Labels.getLabel("indexController.mnImpressaoRMD.label"), args, MODAL);
|
||||
|
||||
} catch (InterruptedException e) {
|
||||
log.error("", e);
|
||||
} catch (WrongValueException e) {
|
||||
|
@ -191,7 +186,18 @@ public class BusquedaImpressaoRMDController extends MyGenericForwardComposer {
|
|||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnView(Event ev) throws InterruptedException {
|
||||
executarImpressao(true, false, false);
|
||||
}
|
||||
|
||||
public void onClick$btnExecutar(Event ev) throws InterruptedException {
|
||||
executarImpressao(false, true, false);
|
||||
}
|
||||
|
||||
public void onClick$btnCancelar(Event ev) throws InterruptedException {
|
||||
executarImpressao(false, false, true);
|
||||
}
|
||||
|
||||
public List<Empresa> getLsEmpresa() {
|
||||
|
|
|
@ -8,6 +8,7 @@ import javax.servlet.ServletContext;
|
|||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.flywaydb.core.Flyway;
|
||||
import org.quartz.JobDetail;
|
||||
import org.quartz.Scheduler;
|
||||
import org.quartz.SchedulerException;
|
||||
|
@ -85,23 +86,23 @@ public class MyAppInit implements org.zkoss.zk.ui.util.WebAppInit {
|
|||
FlyWay.getInstance().defineDataSource(getDataSoure());
|
||||
FlyWay.getInstance().start();
|
||||
|
||||
// log.info("Executando Flyway...");
|
||||
//
|
||||
// try{
|
||||
// final Flyway flyway = new Flyway();
|
||||
//
|
||||
// flyway.setDataSource(getDataSoure());
|
||||
// flyway.setValidateOnMigrate(false);
|
||||
// flyway.setIgnoreFutureMigrations(true);
|
||||
// flyway.setOutOfOrder(true);
|
||||
// flyway.setBaselineOnMigrate(true);
|
||||
//
|
||||
// flyway.migrate();
|
||||
// }catch(Throwable t){
|
||||
// log.error("Erro ao executar o flyway",t);
|
||||
// }
|
||||
//
|
||||
// log.info("Flyway executado.");
|
||||
log.info("Executando Flyway...");
|
||||
|
||||
try{
|
||||
final Flyway flyway = new Flyway();
|
||||
|
||||
flyway.setDataSource(getDataSoure());
|
||||
flyway.setValidateOnMigrate(false);
|
||||
flyway.setIgnoreFutureMigrations(true);
|
||||
flyway.setOutOfOrder(true);
|
||||
flyway.setBaselineOnMigrate(true);
|
||||
|
||||
flyway.migrate();
|
||||
}catch(Throwable t){
|
||||
log.error("Erro ao executar o flyway",t);
|
||||
}
|
||||
|
||||
log.info("Flyway executado.");
|
||||
}
|
||||
|
||||
private boolean ipBloqueadoGeracaoServico() {
|
||||
|
|
|
@ -6513,7 +6513,9 @@ busquedaImportacionFiscalController.btnExe.label = Executar Importação
|
|||
#busquedaImportacionFiscalController.btnExeNaoFiscal.label = Importação Não Fiscal
|
||||
#busquedaImportacionFiscalController.btnExeImportacionReducaoZ.label = Importação Fiscal Redução Z
|
||||
|
||||
busquedaExportacaoFiscalController.btnExe.label = Executar Exportação
|
||||
busquedaExportacaoFiscalController.btnView.label = Visualização
|
||||
busquedaExportacaoFiscalController.btnExe.label = Executar Exportação
|
||||
busquedaExportacaoFiscalController.btnCancel.label = Cancelar/Inativar
|
||||
|
||||
editarRelgerencialEmpresaController.MSG.suscribirOK=Relatorio Gerencial gravado com sucesso!
|
||||
editarRelgerencialEmpresaController.window.title=Impressão Fiscal :: Editar Relatorio Gerencial
|
||||
|
|
|
@ -72,12 +72,8 @@
|
|||
</row>
|
||||
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('busquedaImpressaoRMDController.labelfolio.RMD.fim')}" />
|
||||
<textbox id="folioInicial" width="90%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
<label value="${c:l('busquedaImpressaoRMDController.labelfolio.RMD')}" />
|
||||
<textbox id="folioFinal" width="90%"
|
||||
<textbox id="folioInicial" width="90%"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
</row>
|
||||
|
||||
|
@ -85,8 +81,14 @@
|
|||
</grid>
|
||||
|
||||
<toolbar>
|
||||
<button id="btnView" image="/gui/img/find.png"
|
||||
label="${c:l('busquedaExportacaoFiscalController.btnView.label')}" />
|
||||
|
||||
<button id="btnExecutar" image="/gui/img/enginer.png"
|
||||
label="${c:l('busquedaExportacaoFiscalController.btnExe.label')}" />
|
||||
|
||||
<button id="btnCancelar" image="/gui/img/enginer.png"
|
||||
label="${c:l('busquedaExportacaoFiscalController.btnCancel.label')}" />
|
||||
</toolbar>
|
||||
|
||||
</window>
|
||||
|
|
Loading…
Reference in New Issue