fixes bug#0011731

dev: lucas
qua: junia

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@84493 d1611594-4594-4d17-8e1d-87c2c4800839
master
emerson 2018-08-22 21:11:08 +00:00
parent 012742e5bc
commit 3881892f4e
3 changed files with 41 additions and 48 deletions

View File

@ -89,11 +89,11 @@ public class RelatorioHistoricoCompras extends Relatorio {
sql.append(" ca.corrida_id servico, ");
sql.append(" o.descparada origem, ");
sql.append(" d.descparada destino, ");
sql.append(" u.nombusuario operador, ");
sql.append(" ca.preciopagado valor, ");
sql.append(" u.cveusuario operador, ");
sql.append(" ca.preciopagado + ca.importeoutros + ca.importepedagio + ca.importeseguro + ca.importetaxaembarque valor, ");
sql.append(" ca.fechorviaje viagem, ");
sql.append(" ca.numasiento poltrona, ");
sql.append(" pv.nombpuntoventa agencia, ");
sql.append(" pv.numpuntoventa||'-'||pv.nombpuntoventa agencia, ");
sql.append(" cli.numtelefonodos celular, ");
sql.append(" cli.numtelefono telefone, ");
sql.append(" cli.numfax comercial, ");
@ -106,13 +106,11 @@ public class RelatorioHistoricoCompras extends Relatorio {
sql.append(" cpf ");
sql.append(" FROM ");
sql.append(" caja ca ");
sql.append(" INNER JOIN cliente cli ON ca.cliente_id = cli.cliente_id ");
sql.append(" INNER JOIN cliente cli ON ca.clientecomprador_id = cli.cliente_id ");
sql.append(" INNER JOIN usuario u ON ca.usuario_id = u.usuario_id ");
sql.append(" INNER JOIN punto_venta pv ON ca.puntoventa_id = pv.puntoventa_id ");
sql.append(" INNER JOIN corrida co ON ca.corrida_id = co.corrida_id ");
sql.append(" AND ca.feccorrida = co.feccorrida ");
sql.append(" LEFT JOIN parada o ON co.origen_id = o.parada_id ");
sql.append(" LEFT JOIN parada d ON co.destino_id = d.parada_id ");
sql.append(" LEFT JOIN parada o ON ca.origen_id = o.parada_id ");
sql.append(" LEFT JOIN parada d ON ca.destino_id = d.parada_id ");
if (parametros.get("dtVendaInicial") != null
&& parametros.get("dtEmbarqueInicial") != null) {

View File

@ -1,8 +1,9 @@
<?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="RelatorioHistoricoCompras" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="832" leftMargin="5" rightMargin="5" topMargin="5" bottomMargin="5" uuid="704929c0-c799-46a5-9ca8-3e21a3f3f8b3">
<property name="ireport.zoom" value="1.1"/>
<property name="ireport.x" value="152"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>
<parameter name="NOME_RELATORIO" class="java.lang.String"/>
<field name="venda" class="java.lang.String"/>
<field name="bilhete" class="java.lang.String"/>
@ -23,9 +24,9 @@
<band splitType="Stretch"/>
</background>
<pageHeader>
<band height="62" splitType="Stretch">
<band height="52" splitType="Stretch">
<textField pattern="" isBlankWhenNull="false">
<reportElement uuid="fb13ecbc-e8ae-4663-9c10-fc9e3df409c6" mode="Transparent" x="0" y="16" width="382" height="35" forecolor="#000000" backcolor="#FFFFFF"/>
<reportElement uuid="fb13ecbc-e8ae-4663-9c10-fc9e3df409c6" mode="Transparent" x="0" y="16" width="385" height="35" forecolor="#000000" backcolor="#FFFFFF"/>
<textElement textAlignment="Left" verticalAlignment="Top" rotation="None" markup="none">
<font fontName="SansSerif" size="15" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
<paragraph lineSpacing="Single"/>
@ -35,37 +36,37 @@
</band>
</pageHeader>
<columnHeader>
<band height="39" splitType="Stretch">
<band height="26" splitType="Stretch">
<staticText>
<reportElement uuid="bc37af37-9b2d-46dc-969d-800271b9247b" x="310" y="9" width="45" height="25"/>
<reportElement uuid="bc37af37-9b2d-46dc-969d-800271b9247b" x="310" y="0" width="45" height="25"/>
<textElement textAlignment="Left">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[Operador]]></text>
</staticText>
<staticText>
<reportElement uuid="05f6b0c4-65f5-4413-814f-5f3f5171bb89" x="0" y="9" width="65" height="25"/>
<reportElement uuid="05f6b0c4-65f5-4413-814f-5f3f5171bb89" x="0" y="0" width="65" height="25"/>
<textElement textAlignment="Left">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[Venda]]></text>
</staticText>
<staticText>
<reportElement uuid="8b901287-2a27-4555-a9ec-fc89e5b29701" x="150" y="9" width="80" height="25"/>
<reportElement uuid="8b901287-2a27-4555-a9ec-fc89e5b29701" x="150" y="0" width="80" height="25"/>
<textElement textAlignment="Left">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[Origem]]></text>
</staticText>
<staticText>
<reportElement uuid="127050d6-089c-4486-bffc-0dd6603debd4" x="65" y="9" width="40" height="25"/>
<reportElement uuid="127050d6-089c-4486-bffc-0dd6603debd4" x="65" y="0" width="40" height="25"/>
<textElement textAlignment="Left">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[Bilhete]]></text>
</staticText>
<staticText>
<reportElement uuid="9f01f9d0-b086-40f4-aa5d-57fa216a2955" x="105" y="9" width="45" height="25" isPrintWhenDetailOverflows="true"/>
<reportElement uuid="9f01f9d0-b086-40f4-aa5d-57fa216a2955" x="105" y="0" width="45" height="25" isPrintWhenDetailOverflows="true"/>
<textElement textAlignment="Left">
<font size="8" isBold="true"/>
</textElement>
@ -73,76 +74,70 @@
Serviço]]></text>
</staticText>
<staticText>
<reportElement uuid="b376832e-c8b6-47f9-b26b-5e0dbe81a34d" x="230" y="9" width="80" height="25"/>
<reportElement uuid="b376832e-c8b6-47f9-b26b-5e0dbe81a34d" x="230" y="0" width="80" height="25"/>
<textElement textAlignment="Left">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[Destino]]></text>
</staticText>
<staticText>
<reportElement uuid="f43caf02-0714-4e25-93b8-f6251b0473af" x="355" y="9" width="30" height="25"/>
<reportElement uuid="f43caf02-0714-4e25-93b8-f6251b0473af" x="355" y="0" width="30" height="25"/>
<textElement textAlignment="Left">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[Valor]]></text>
</staticText>
<staticText>
<reportElement uuid="02096d93-5c1a-436a-8bb3-b13b76f0d04f" x="385" y="9" width="65" height="25"/>
<reportElement uuid="02096d93-5c1a-436a-8bb3-b13b76f0d04f" x="385" y="0" width="65" height="25"/>
<textElement textAlignment="Left">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[Viagem]]></text>
</staticText>
<staticText>
<reportElement uuid="4b2a91fe-ac98-4b7c-b02e-d98862580cf4" x="450" y="9" width="20" height="25"/>
<reportElement uuid="4b2a91fe-ac98-4b7c-b02e-d98862580cf4" x="450" y="0" width="20" height="25"/>
<textElement textAlignment="Left">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[Poltr]]></text>
</staticText>
<staticText>
<reportElement uuid="6f895f9e-f2dd-404f-adf2-125732738753" x="470" y="9" width="70" height="25"/>
<reportElement uuid="6f895f9e-f2dd-404f-adf2-125732738753" x="470" y="0" width="70" height="25"/>
<textElement textAlignment="Left">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[Agência Venda]]></text>
</staticText>
<line>
<reportElement uuid="917f4346-87f6-4040-b8ec-781e8e14be30" x="0" y="7" width="825" height="2"/>
</line>
<line>
<reportElement uuid="56a46a13-901c-4cf2-b143-0ebd53e0f257" x="0" y="35" width="825" height="2"/>
</line>
<staticText>
<reportElement uuid="1ea05f32-6d68-463c-9f7b-d2927bab1854" x="540" y="9" width="60" height="25"/>
<reportElement uuid="1ea05f32-6d68-463c-9f7b-d2927bab1854" x="540" y="0" width="60" height="25"/>
<textElement textAlignment="Left">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[Celular]]></text>
</staticText>
<staticText>
<reportElement uuid="e61f7709-d34b-42da-8394-f5dbfcdcac08" x="600" y="9" width="60" height="25"/>
<reportElement uuid="e61f7709-d34b-42da-8394-f5dbfcdcac08" x="600" y="0" width="60" height="25"/>
<textElement textAlignment="Left">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[Telefone]]></text>
</staticText>
<staticText>
<reportElement uuid="2b6350da-3278-4348-974e-529acf12addf" x="660" y="9" width="60" height="25"/>
<reportElement uuid="2b6350da-3278-4348-974e-529acf12addf" x="660" y="0" width="60" height="25"/>
<textElement textAlignment="Left">
<font size="8"/>
</textElement>
<text><![CDATA[Tel. Com.]]></text>
</staticText>
<staticText>
<reportElement uuid="d687bf48-89bf-4df8-a222-16f30996587e" x="720" y="9" width="50" height="25"/>
<reportElement uuid="d687bf48-89bf-4df8-a222-16f30996587e" x="720" y="0" width="50" height="25"/>
<textElement>
<font size="8"/>
</textElement>
<text><![CDATA[Nome]]></text>
</staticText>
<staticText>
<reportElement uuid="e2e9fd80-1ca7-4f89-a95e-d8d89e37c095" x="770" y="9" width="55" height="25"/>
<reportElement uuid="e2e9fd80-1ca7-4f89-a95e-d8d89e37c095" x="770" y="0" width="55" height="25"/>
<textElement>
<font size="8"/>
</textElement>
@ -153,105 +148,105 @@ Serviço]]></text>
<detail>
<band height="24" splitType="Stretch">
<textField isStretchWithOverflow="true" pattern="">
<reportElement uuid="63e7f691-3da7-403b-b3c0-428204cd300b" x="470" y="0" width="70" height="20"/>
<reportElement uuid="63e7f691-3da7-403b-b3c0-428204cd300b" stretchType="RelativeToBandHeight" x="470" y="0" width="70" height="24"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{agencia}]]></textFieldExpression>
</textField>
<textField pattern="dd/MM/yyyy" isBlankWhenNull="true">
<reportElement uuid="f328e3a4-f1d7-46f6-9d02-9bfd4ad1d512" x="105" y="0" width="45" height="20"/>
<reportElement uuid="f328e3a4-f1d7-46f6-9d02-9bfd4ad1d512" stretchType="RelativeToBandHeight" x="105" y="0" width="45" height="24"/>
<textElement textAlignment="Left">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{servico}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
<reportElement uuid="e5de48ac-118a-416c-a88e-b42b7dc64e40" x="65" y="1" width="40" height="20"/>
<reportElement uuid="e5de48ac-118a-416c-a88e-b42b7dc64e40" stretchType="RelativeToBandHeight" x="65" y="0" width="40" height="24"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{bilhete}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="">
<reportElement uuid="cec35341-5bcd-4d7c-a59e-76434bc6d4fe" x="150" y="0" width="80" height="20"/>
<reportElement uuid="cec35341-5bcd-4d7c-a59e-76434bc6d4fe" stretchType="RelativeToBandHeight" x="150" y="0" width="80" height="24"/>
<textElement textAlignment="Left">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{origem}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="">
<reportElement uuid="2b3cb9a8-6893-4bdf-b9eb-2853038a9258" x="230" y="0" width="80" height="20"/>
<reportElement uuid="2b3cb9a8-6893-4bdf-b9eb-2853038a9258" stretchType="RelativeToBandHeight" x="230" y="0" width="80" height="24"/>
<textElement textAlignment="Left">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{destino}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" pattern="">
<reportElement uuid="c3ec1906-8357-49ca-bbe6-4bb7f927d668" x="310" y="0" width="45" height="20"/>
<reportElement uuid="c3ec1906-8357-49ca-bbe6-4bb7f927d668" stretchType="RelativeToBandHeight" x="310" y="0" width="45" height="24"/>
<textElement textAlignment="Left">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{operador}]]></textFieldExpression>
</textField>
<textField pattern="#,##0.00">
<reportElement uuid="a7933cd7-a8da-40c1-b4fe-7c499fbddcb6" x="355" y="0" width="30" height="20"/>
<reportElement uuid="a7933cd7-a8da-40c1-b4fe-7c499fbddcb6" stretchType="RelativeToBandHeight" x="355" y="0" width="30" height="24"/>
<textElement textAlignment="Left">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{valor}]]></textFieldExpression>
</textField>
<textField pattern="">
<reportElement uuid="0abd4d65-b47b-4bb5-9db2-fc1b08842641" x="385" y="0" width="65" height="20"/>
<reportElement uuid="0abd4d65-b47b-4bb5-9db2-fc1b08842641" stretchType="RelativeToBandHeight" x="385" y="0" width="65" height="24"/>
<textElement textAlignment="Left">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{viagem}]]></textFieldExpression>
</textField>
<textField pattern="">
<reportElement uuid="18f38bde-1e97-481b-8f10-bdfe51bc8492" x="450" y="0" width="20" height="20"/>
<reportElement uuid="18f38bde-1e97-481b-8f10-bdfe51bc8492" stretchType="RelativeToBandHeight" x="450" y="0" width="20" height="24"/>
<textElement textAlignment="Center">
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{poltrona}]]></textFieldExpression>
</textField>
<textField>
<reportElement uuid="fc9fe78f-59b8-40bd-8d49-1996da4c1952" x="0" y="1" width="65" height="20"/>
<reportElement uuid="fc9fe78f-59b8-40bd-8d49-1996da4c1952" stretchType="RelativeToBandHeight" x="0" y="0" width="65" height="24"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{venda}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="1166e37c-7c52-4d7b-ba6b-d6ae47181144" x="540" y="0" width="60" height="20"/>
<reportElement uuid="1166e37c-7c52-4d7b-ba6b-d6ae47181144" stretchType="RelativeToBandHeight" x="540" y="0" width="60" height="24"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{celular}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="2471b6f6-ede2-4163-aca6-73054f093f8b" x="600" y="0" width="60" height="20"/>
<reportElement uuid="2471b6f6-ede2-4163-aca6-73054f093f8b" stretchType="RelativeToBandHeight" x="600" y="0" width="60" height="24"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{telefone}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="15ec1323-6b11-41e2-aa4d-57f5e3fd0a96" x="660" y="0" width="60" height="20"/>
<reportElement uuid="15ec1323-6b11-41e2-aa4d-57f5e3fd0a96" stretchType="RelativeToBandHeight" x="660" y="0" width="60" height="24"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{comercial}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement uuid="b44da132-4555-4070-91e8-96b444b996ba" x="720" y="0" width="50" height="20"/>
<reportElement uuid="b44da132-4555-4070-91e8-96b444b996ba" stretchType="RelativeToBandHeight" x="720" y="0" width="50" height="24"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{nome}]]></textFieldExpression>
</textField>
<textField isBlankWhenNull="true">
<reportElement uuid="a68083d7-956e-40f2-ba18-d3622f0696a8" x="770" y="0" width="55" height="20"/>
<reportElement uuid="a68083d7-956e-40f2-ba18-d3622f0696a8" stretchType="RelativeToBandHeight" x="770" y="0" width="55" height="24"/>
<textElement>
<font size="8"/>
</textElement>