<?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="th_pedido_venda" language="groovy" pageWidth="595" pageHeight="842" whenNoDataType="NoDataSection" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="3d4d741b-bef4-4baf-90d0-1d633c914be4">
	<property name="ireport.zoom" value="1.8150000000000015"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<style name="Zebra">
		<conditionalStyle>
			<conditionExpression><![CDATA[new Boolean( $V{REPORT_COUNT}.intValue() % 2 == 0)]]></conditionExpression>
			<style mode="Opaque" backcolor="#CCCCCC"/>
		</conditionalStyle>
	</style>
	<style name="Grade" fill="Solid" hAlign="Center" vAlign="Middle" markup="none">
		<box topPadding="1" leftPadding="2" bottomPadding="1" rightPadding="2">
			<pen lineWidth="0.0"/>
			<topPen lineWidth="0.25"/>
			<leftPen lineWidth="0.0"/>
			<bottomPen lineWidth="0.25"/>
			<rightPen lineWidth="0.0"/>
		</box>
	</style>
	<style name="Coluna" mode="Opaque" forecolor="#FFFFFF" backcolor="#666666" fill="Solid" hAlign="Center" vAlign="Middle" markup="none" fontSize="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false">
		<box topPadding="1" leftPadding="2" bottomPadding="1" rightPadding="2">
			<pen lineWidth="0.5" lineColor="#FFFFFF"/>
			<topPen lineWidth="0.5" lineColor="#FFFFFF"/>
			<leftPen lineWidth="0.5" lineColor="#FFFFFF"/>
			<bottomPen lineWidth="0.5" lineColor="#FFFFFF"/>
			<rightPen lineWidth="0.5" lineColor="#FFFFFF"/>
		</box>
	</style>
	<style name="Total" hAlign="Center" vAlign="Middle" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false"/>
	<parameter name="P_PVCOD" class="java.lang.Integer"/>
	<parameter name="P_EMP" class="java.lang.Integer">
		<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[select
/*****************************************
CABECALHO/RODAPE
*/
'Pedido de Venda' as relatorio,
to_char(now(),'dd/mm/yyyy HH24:MI')||' ('||coalesce((select usulogin from usu where usuid=100),'...')||')' as dtimpr,
'th_pedido_venda_ncm_cest V26.08.17 - www.brsistemas.com.br' as versao,
'..\logo.jpg' as pathlogo,
(select conf_arq_logo from conf where confempparcod = $P{P_EMP}) as logo,
/*****************************************
*/

	e.parcod as empcod
	,e.pardes as empdes
	,e.parfan as empfan
	,e.parcnpjcpf as empcnpj
	,e.parrua||', Bairro '||coalesce(e.parbai,'')||', '||coalesce(emp.mundes,'')||'-'||coalesce(emp.munufsigla,'') as emprua
	,e.parbai as empbai
	,e.parcep as empcep
	,e.pardddfone as empdddfone
	,e.parfone as empfone
	,pvcod
	,pvcadhorario
	,c.parcod as clicod
	,c.parfan as clifan
	,c.pardes as clides
	,c.parcnpjcpf as clicnpj
	,c.parrua||', Bairro '||coalesce(c.parbai,'')||', '||coalesce(clii.mundes,'')||'-'||coalesce(clii.munufsigla,'') as clirua
	,case when c.pardddfone is not null then c.pardddfone else ' - ' end as clidddfone
	,case when c.parfone is not null then c.parfone else ' - ' end as clifone
	,plpgdes
	,tcdes
	,cliloccod
	,locdes
	,pvrcaparcod
	,substr(r.parfan,1,15) as rcafan

	,procod
	,proref
	,prodes
	,pviuveun
	,pviuvedes
	,round(pviqtdeatecar,2) as pviqtdeatecar
	,pvivlven
	,(case when pvivlven>pvivltab then pvivlven else pvivltab end)*pviqtdeatecar as pvivltab
	,(case when pvivlven>pvivltab then 0 else pvivltab-pvivlven end)*pviqtdeatecar as vldesc
	,pvivltotal
	,coalesce(pvivlst,0) as pvivlst
	,coalesce(pvivlipi,0) as pvivlipi
	,coalesce(pvvlfrete,0) as pvvlfrete
	,coalesce(pvobsped,'') as pvobsped
	,pvivlipi
	,pvivlst

	,proncm
	,procest
from pv
join cli on pvcliparcod=cliparcod
join par c on cliparcod=c.parcod
join plpg on pvplpgcod=plpgcod
join tc on pvtccod=tccod
join loc on cliloccod = loccod
join par r on pvrcaparcod = r.parcod
join par e on pvempparcod = e.parcod
join mun clii on c.parmuncod=muncod
join mun emp on e.parmuncod=emp.muncod

join pvi on pvcod=pvipvcod
join uve on uveprocod = pviprocod and uvecod = pviuvecod and uvedispven = 'S'
join pro on pviprocod=procod

where pviqtdeatecar>0 and pvsta <> 'EX'
and pvcod=$P{P_PVCOD}

order by prodes]]>
	</queryString>
	<field name="relatorio" class="java.lang.String"/>
	<field name="dtimpr" class="java.lang.String"/>
	<field name="versao" class="java.lang.String"/>
	<field name="pathlogo" class="java.lang.String"/>
	<field name="logo" class="java.lang.String"/>
	<field name="empcod" class="java.lang.Integer"/>
	<field name="empdes" class="java.lang.String"/>
	<field name="empfan" class="java.lang.String"/>
	<field name="empcnpj" class="java.lang.String"/>
	<field name="emprua" class="java.lang.String"/>
	<field name="empbai" class="java.lang.String"/>
	<field name="empcep" class="java.lang.String"/>
	<field name="empdddfone" class="java.lang.String"/>
	<field name="empfone" class="java.lang.String"/>
	<field name="pvcod" class="java.lang.Integer"/>
	<field name="pvcadhorario" class="java.sql.Timestamp"/>
	<field name="clicod" class="java.lang.Integer"/>
	<field name="clifan" class="java.lang.String"/>
	<field name="clides" class="java.lang.String"/>
	<field name="clicnpj" class="java.lang.String"/>
	<field name="clirua" class="java.lang.String"/>
	<field name="clidddfone" class="java.lang.String"/>
	<field name="clifone" class="java.lang.String"/>
	<field name="plpgdes" class="java.lang.String"/>
	<field name="tcdes" class="java.lang.String"/>
	<field name="cliloccod" class="java.lang.Integer"/>
	<field name="locdes" class="java.lang.String"/>
	<field name="pvrcaparcod" class="java.lang.Integer"/>
	<field name="rcafan" class="java.lang.String"/>
	<field name="procod" class="java.lang.Integer"/>
	<field name="proref" class="java.lang.String"/>
	<field name="prodes" class="java.lang.String"/>
	<field name="pviuveun" class="java.lang.String"/>
	<field name="pviuvedes" class="java.lang.String"/>
	<field name="pviqtdeatecar" class="java.math.BigDecimal"/>
	<field name="pvivlven" class="java.math.BigDecimal"/>
	<field name="pvivltab" class="java.math.BigDecimal"/>
	<field name="vldesc" class="java.math.BigDecimal"/>
	<field name="pvivltotal" class="java.math.BigDecimal"/>
	<field name="pvivlst" class="java.math.BigDecimal"/>
	<field name="pvivlipi" class="java.math.BigDecimal"/>
	<field name="pvvlfrete" class="java.math.BigDecimal"/>
	<field name="pvobsped" class="java.lang.String"/>
	<field name="proncm" class="java.lang.String"/>
	<field name="procest" class="java.lang.String"/>
	<variable name="procod_1" class="java.lang.Integer" calculation="DistinctCount">
		<variableExpression><![CDATA[$F{procod}]]></variableExpression>
	</variable>
	<variable name="pvivltotal_1" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{pvivltotal}]]></variableExpression>
	</variable>
	<variable name="pvivltab_1" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{pvivltab}]]></variableExpression>
	</variable>
	<variable name="vldesc_1" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{vldesc}]]></variableExpression>
	</variable>
	<variable name="pvivltotst" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{pvivlst}]]></variableExpression>
	</variable>
	<variable name="pvivltotipi" class="java.math.BigDecimal" calculation="Sum">
		<variableExpression><![CDATA[$F{pvivlipi}]]></variableExpression>
	</variable>
	<variable name="pvvlfrete_1" class="java.math.BigDecimal" calculation="First">
		<variableExpression><![CDATA[$F{pvvlfrete}]]></variableExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<pageHeader>
		<band height="174">
			<textField>
				<reportElement x="424" y="20" width="131" height="15" uuid="8f882361-718c-40ae-a2fc-2dd66aae12d8"/>
				<box leftPadding="3" rightPadding="2">
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="9"/>
				</textElement>
				<textFieldExpression><![CDATA["CNPJ: "+( $F{empcnpj}.length() == 14 ? ($F{empcnpj}.substring(0, 2) + "." + $F{empcnpj}.substring(2, 5) + "." + $F{empcnpj}.substring(5, 8) + "/" + $F{empcnpj}.substring(8, 12) + "-" + $F{empcnpj}.substring(12, 14)) : ($F{empcnpj}.substring(0, 3) + "." + $F{empcnpj}.substring(3, 6) + "." + $F{empcnpj}.substring(6, 9) + "-" + $F{empcnpj}.substring(9, 11)) )]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="92" y="70" width="463" height="13" uuid="1e95fdf4-2882-4338-abfe-2ebe479f6ffa"/>
				<box leftPadding="3" rightPadding="2">
					<topPen lineWidth="0.25"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Cliente]]></text>
			</staticText>
			<staticText>
				<reportElement x="146" y="122" width="150" height="13" uuid="bc6a5061-7ee9-414c-b551-f8af196957d3"/>
				<box leftPadding="3" rightPadding="2">
					<topPen lineWidth="0.25"/>
					<leftPen lineWidth="0.25"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Telefone]]></text>
			</staticText>
			<staticText>
				<reportElement x="122" y="148" width="138" height="13" uuid="11c08a27-ce2c-4b54-a301-b4bb1855327a"/>
				<box leftPadding="3" rightPadding="2">
					<topPen lineWidth="0.25"/>
					<leftPen lineWidth="0.25"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Pl. Pagamento]]></text>
			</staticText>
			<textField>
				<reportElement x="260" y="161" width="121" height="13" uuid="40f140fe-5e6c-4f0c-ba1d-c4e62a3289c3"/>
				<box leftPadding="3" rightPadding="2">
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.25"/>
					<bottomPen lineWidth="0.25"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="8" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{tcdes}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="260" y="148" width="121" height="13" uuid="d1be0879-0e22-4c05-86df-3dfdb2e83dea"/>
				<box leftPadding="3" rightPadding="2">
					<topPen lineWidth="0.25"/>
					<leftPen lineWidth="0.25"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Cobrança]]></text>
			</staticText>
			<textField>
				<reportElement x="100" y="20" width="324" height="15" uuid="ff5249ee-e67a-40ca-825e-85bb971e1237"/>
				<box leftPadding="3" rightPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="9"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{empdes}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="100" y="35" width="345" height="15" uuid="53bee673-bc02-43d4-b3b3-762fcef95583"/>
				<box leftPadding="3" rightPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="9"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{emprua}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="381" y="161" width="174" height="13" uuid="a908c794-f4d1-44b6-9577-a2f94eaa3068"/>
				<box leftPadding="3" rightPadding="2">
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.25"/>
					<bottomPen lineWidth="0.25"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="8" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{rcafan}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement positionType="Float" stretchType="RelativeToBandHeight" x="296" y="135" width="259" height="13" isPrintWhenDetailOverflows="true" uuid="05ad4d8b-bd83-45c1-8a83-2e028e611ae6"/>
				<box leftPadding="3" rightPadding="2">
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.25"/>
					<bottomPen lineWidth="0.25"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="8" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{locdes}]]></textFieldExpression>
			</textField>
			<textField pattern="dd/MM/yyyy HH.mm" isBlankWhenNull="true">
				<reportElement x="0" y="161" width="122" height="13" uuid="702324e3-969d-404b-8da8-13df8fac4899"/>
				<box leftPadding="3" rightPadding="2">
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.25"/>
					<bottomPen lineWidth="0.25"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font size="8" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{pvcadhorario}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true">
				<reportElement positionType="Float" stretchType="RelativeToBandHeight" x="0" y="70" width="92" height="78" isPrintWhenDetailOverflows="true" uuid="eab700d4-49eb-4e90-9097-1721a7ae67ce"/>
				<box leftPadding="3" rightPadding="2">
					<topPen lineWidth="0.25"/>
					<leftPen lineWidth="0.25"/>
					<bottomPen lineWidth="0.25"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="11" isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA["Pedido: "+$F{pvcod}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="100" y="50" width="100" height="15" uuid="d627ecb3-3f79-44a6-9222-a4a45e928b2b"/>
				<box leftPadding="3" rightPadding="2"/>
				<textElement verticalAlignment="Middle">
					<font size="9"/>
				</textElement>
				<textFieldExpression><![CDATA['('+$F{empdddfone}+')'+' '+$F{empfone}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement positionType="Float" stretchType="RelativeToBandHeight" x="146" y="135" width="150" height="13" isPrintWhenDetailOverflows="true" uuid="ad3b003f-3096-483f-8182-e1981676bdf4"/>
				<box leftPadding="3" rightPadding="2">
					<leftPen lineWidth="0.25"/>
					<bottomPen lineWidth="0.25"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="8" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA["("+$F{clidddfone}+")"+$F{clifone}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="296" y="122" width="259" height="13" uuid="d72859c8-a31f-4ace-9321-8adb97d8b265"/>
				<box leftPadding="3" rightPadding="2">
					<topPen lineWidth="0.25"/>
					<leftPen lineWidth="0.25"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Localidade]]></text>
			</staticText>
			<textField>
				<reportElement x="122" y="161" width="138" height="13" uuid="885a04dd-578f-4086-95da-f16d10a75d60"/>
				<box leftPadding="3" rightPadding="2">
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.25"/>
					<bottomPen lineWidth="0.25"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="8" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{plpgdes}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="0" y="148" width="122" height="13" uuid="16f4d770-976d-48a5-8866-1782186ad875"/>
				<box leftPadding="3" rightPadding="2">
					<topPen lineWidth="0.25"/>
					<leftPen lineWidth="0.25"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Horário]]></text>
			</staticText>
			<staticText>
				<reportElement x="381" y="148" width="174" height="13" uuid="487caa75-5b14-4bfa-8ffe-889c002b0dfb"/>
				<box leftPadding="3" rightPadding="2">
					<topPen lineWidth="0.25"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Vendedor]]></text>
			</staticText>
			<textField>
				<reportElement x="445" y="35" width="110" height="15" uuid="c328ea7e-02b2-4bfa-ade9-d75b4d29a52d"/>
				<box leftPadding="3" rightPadding="2"/>
				<textElement textAlignment="Right" verticalAlignment="Middle">
					<font size="9"/>
				</textElement>
				<textFieldExpression><![CDATA["CEP: "+$F{empcep}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement x="92" y="122" width="54" height="13" uuid="0407d28e-06f1-437e-8273-ca4040e74dd4"/>
				<box leftPadding="3" rightPadding="2">
					<topPen lineWidth="0.25"/>
					<leftPen lineWidth="0.25"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Cód]]></text>
			</staticText>
			<textField>
				<reportElement positionType="Float" stretchType="RelativeToBandHeight" x="92" y="135" width="54" height="13" isPrintWhenDetailOverflows="true" uuid="175ca3cd-91fd-4680-8967-7208a9574af0"/>
				<box leftPadding="3" rightPadding="2">
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.25"/>
					<bottomPen lineWidth="0.25"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="8" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{clicod}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement positionType="Float" stretchType="RelativeToBandHeight" x="92" y="83" width="463" height="13" isPrintWhenDetailOverflows="true" uuid="7bd618a2-2574-4e9b-8ce8-894c1610aa45"/>
				<box leftPadding="3" rightPadding="2">
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.25"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement verticalAlignment="Middle" markup="html">
					<font size="8" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{clides}+" - <b>CNPJ</b>: "+$F{clicnpj}]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="228" y="5" width="327" height="15" uuid="5bb1c608-bf2a-4b73-ae09-2e0cf6b7a4ca"/>
				<box leftPadding="3" rightPadding="2"/>
				<textElement textAlignment="Right">
					<font size="9" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{dtimpr}]]></textFieldExpression>
			</textField>
			<image scaleImage="FillFrame" onErrorType="Blank">
				<reportElement x="0" y="0" width="100" height="70" uuid="7a3ce132-e108-4e6c-981e-11216790f850"/>
				<imageExpression><![CDATA[$F{logo}]]></imageExpression>
			</image>
			<staticText>
				<reportElement x="92" y="96" width="463" height="13" uuid="04605456-954b-45e6-99d0-9e3261493848"/>
				<box leftPadding="3" rightPadding="2">
					<topPen lineWidth="0.25"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement verticalAlignment="Middle">
					<font size="8" isBold="true"/>
				</textElement>
				<text><![CDATA[Endereço]]></text>
			</staticText>
			<textField>
				<reportElement positionType="Float" stretchType="RelativeToBandHeight" x="92" y="109" width="463" height="13" isPrintWhenDetailOverflows="true" uuid="5c2191c4-160e-4647-a889-260b85a40350"/>
				<box leftPadding="3" rightPadding="2">
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.25"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement verticalAlignment="Middle" markup="html">
					<font size="8" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{clirua}]]></textFieldExpression>
			</textField>
		</band>
	</pageHeader>
	<columnHeader>
		<band height="12">
			<staticText>
				<reportElement style="Coluna" x="107" y="0" width="200" height="12" uuid="81c3a7b0-30c6-4796-8285-06d5ee9dfdc1"/>
				<textElement>
					<font size="7" isBold="false"/>
				</textElement>
				<text><![CDATA[Produto]]></text>
			</staticText>
			<staticText>
				<reportElement style="Coluna" x="307" y="0" width="24" height="12" uuid="8207cca4-71a6-44b7-a49a-541a52ef0f83"/>
				<textElement>
					<font size="7" isBold="false"/>
				</textElement>
				<text><![CDATA[Un]]></text>
			</staticText>
			<staticText>
				<reportElement style="Coluna" x="331" y="0" width="30" height="12" uuid="cf134f95-32d2-461d-a8fd-f3ea38ff0912"/>
				<textElement>
					<font size="7" isBold="false"/>
				</textElement>
				<text><![CDATA[Qtde]]></text>
			</staticText>
			<staticText>
				<reportElement style="Coluna" x="461" y="0" width="40" height="12" uuid="b4900581-4175-47dc-81dd-a873e550c2c1"/>
				<textElement textAlignment="Right">
					<font size="7" isBold="false"/>
				</textElement>
				<text><![CDATA[Vl.Unit]]></text>
			</staticText>
			<staticText>
				<reportElement style="Coluna" x="501" y="0" width="54" height="12" uuid="c0dd8346-b2ba-4288-8862-53bb477dc7ef"/>
				<textElement textAlignment="Right">
					<font size="7" isBold="false"/>
				</textElement>
				<text><![CDATA[Vl.Total]]></text>
			</staticText>
			<staticText>
				<reportElement style="Coluna" x="361" y="0" width="40" height="12" uuid="6e35d665-992b-4c6e-839e-86846903ecd3"/>
				<textElement textAlignment="Right">
					<font size="7" isBold="false"/>
				</textElement>
				<text><![CDATA[Valor]]></text>
			</staticText>
			<staticText>
				<reportElement style="Coluna" x="401" y="0" width="30" height="12" uuid="b3c2fb17-db26-4216-a817-9c5629a36dfd"/>
				<textElement textAlignment="Right">
					<font size="7" isBold="false"/>
				</textElement>
				<text><![CDATA[Vl. St]]></text>
			</staticText>
			<staticText>
				<reportElement style="Coluna" x="431" y="0" width="30" height="12" uuid="0ec4f079-4049-4e56-9eed-85af8ca42ef9"/>
				<textElement textAlignment="Right">
					<font size="7" isBold="false"/>
				</textElement>
				<text><![CDATA[Vl. Ipi]]></text>
			</staticText>
			<staticText>
				<reportElement style="Coluna" x="0" y="0" width="57" height="12" uuid="5f879ee8-f943-4b63-b04e-a83c098560bc"/>
				<textElement>
					<font size="7" isBold="false"/>
				</textElement>
				<text><![CDATA[NCM]]></text>
			</staticText>
			<staticText>
				<reportElement style="Coluna" x="57" y="0" width="50" height="12" uuid="c882672f-a0b1-49fb-b7c2-462b394b0033"/>
				<textElement>
					<font size="7" isBold="false"/>
				</textElement>
				<text><![CDATA[CEST]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="12" splitType="Stretch">
			<textField isStretchWithOverflow="true">
				<reportElement style="Grade" x="107" y="0" width="200" height="12" uuid="1081153c-aa8a-48f2-801f-6e2147bf297b"/>
				<textElement textAlignment="Left">
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{prodes}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true">
				<reportElement style="Grade" stretchType="RelativeToBandHeight" x="307" y="0" width="24" height="12" uuid="f29afcf8-84a3-4f39-8e7c-d7978e1bbe9a"/>
				<textElement>
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{pviuveun}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00;-#,##0.00">
				<reportElement style="Grade" stretchType="RelativeToBandHeight" x="331" y="0" width="30" height="12" uuid="fb6843a1-8a53-4034-bd47-ef5a14f4b790"/>
				<textElement>
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{pviqtdeatecar}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00;-#,##0.00">
				<reportElement style="Grade" stretchType="RelativeToBandHeight" x="501" y="0" width="54" height="12" uuid="5012f285-8afb-41b3-a0e1-b9d9a8182fba"/>
				<textElement textAlignment="Right">
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{pvivltotal}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00;-#,##0.00">
				<reportElement style="Grade" stretchType="RelativeToBandHeight" x="461" y="0" width="40" height="12" uuid="11a9313e-1ec0-4ab1-932a-f24ef47be3ee"/>
				<textElement textAlignment="Right">
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{pvivlven}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00;-#,##0.00">
				<reportElement style="Grade" stretchType="RelativeToBandHeight" x="361" y="0" width="40" height="12" uuid="eece37e8-0beb-4ee7-b6d8-ae66eb2c3a19"/>
				<textElement textAlignment="Right">
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{pvivltab}-$F{vldesc}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00;-#,##0.00">
				<reportElement style="Grade" stretchType="RelativeToBandHeight" x="401" y="0" width="30" height="12" uuid="eff02f83-a70d-4f16-80cd-afc0254e97f8"/>
				<textElement textAlignment="Right">
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{pvivlst}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00;-#,##0.00">
				<reportElement style="Grade" stretchType="RelativeToBandHeight" x="431" y="0" width="30" height="12" uuid="337195c7-08d4-499f-8f1b-eec55ee80a00"/>
				<textElement textAlignment="Right">
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{pvivlipi}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Grade" stretchType="RelativeToBandHeight" x="0" y="0" width="57" height="12" uuid="5a73353a-78a9-4411-9605-905cd4bb1ada"/>
				<textElement>
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{proncm}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Grade" stretchType="RelativeToBandHeight" x="57" y="0" width="50" height="12" uuid="bbd23281-13ad-4534-9f86-dafd26b23a2a"/>
				<textElement>
					<font size="7"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{procest}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<pageFooter>
		<band height="25">
			<line>
				<reportElement x="0" y="4" width="553" height="1" uuid="2574706b-717c-453c-a5ee-4ec9ae32806b"/>
			</line>
			<textField>
				<reportElement x="433" y="10" width="80" height="15" uuid="758da6eb-c111-4e7e-be5d-0fddbe1cbcd8"/>
				<box leftPadding="3" rightPadding="2"/>
				<textElement textAlignment="Right">
					<font size="9"/>
				</textElement>
				<textFieldExpression><![CDATA["Página "+$V{PAGE_NUMBER}+" de"]]></textFieldExpression>
			</textField>
			<textField>
				<reportElement x="0" y="10" width="433" height="15" uuid="6b4f2148-f630-4d6f-8bef-00503a2cf6ef"/>
				<box leftPadding="3" rightPadding="2"/>
				<textElement textAlignment="Left" verticalAlignment="Middle">
					<font size="8" isBold="true" isItalic="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{versao}]]></textFieldExpression>
			</textField>
			<textField evaluationTime="Report">
				<reportElement x="513" y="10" width="42" height="15" uuid="fb4c3cf6-65c0-4179-bf10-ddccf1e6f1ad"/>
				<box leftPadding="3" rightPadding="2"/>
				<textElement>
					<font size="9"/>
				</textElement>
				<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
			</textField>
		</band>
	</pageFooter>
	<summary>
		<band height="179">
			<textField>
				<reportElement style="Total" x="0" y="0" width="424" height="15" uuid="62a7cce0-cbf2-4380-8e28-97031238dd8f"/>
				<box leftPadding="3"/>
				<textElement textAlignment="Left">
					<font size="8"/>
				</textElement>
				<textFieldExpression><![CDATA["Qtde de itens: "+$V{procod_1}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;-#,##0.00">
				<reportElement style="Total" x="501" y="0" width="54" height="12" uuid="c67c57d5-1a98-40fc-bc1f-9bc686ee3d9c"/>
				<box rightPadding="5"/>
				<textElement textAlignment="Right">
					<font size="8" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$V{pvivltab_1}-$V{vldesc_1}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement positionType="Float" x="233" y="136" width="181" height="34" uuid="0c6695a3-20dd-4458-a9ee-189b70af838b"/>
				<box topPadding="2" leftPadding="3" rightPadding="2">
					<topPen lineWidth="0.25"/>
					<leftPen lineWidth="0.25"/>
					<bottomPen lineWidth="0.25"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement verticalAlignment="Top">
					<font size="9" isBold="true"/>
				</textElement>
				<text><![CDATA[Ass. Motorista:]]></text>
			</staticText>
			<staticText>
				<reportElement positionType="Float" x="414" y="136" width="141" height="34" uuid="b127be05-92ad-4264-a1b1-83e06a811deb"/>
				<box topPadding="2" leftPadding="3" rightPadding="2">
					<topPen lineWidth="0.25"/>
					<leftPen lineWidth="0.25"/>
					<bottomPen lineWidth="0.25"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement verticalAlignment="Top">
					<font size="9" isBold="true"/>
				</textElement>
				<text><![CDATA[Dt.Entrega:]]></text>
			</staticText>
			<staticText>
				<reportElement positionType="Float" x="0" y="136" width="233" height="34" uuid="2ce585a0-ce07-44ce-bda8-fdc116c4d009"/>
				<box topPadding="2" leftPadding="3" rightPadding="2">
					<topPen lineWidth="0.25"/>
					<leftPen lineWidth="0.25"/>
					<bottomPen lineWidth="0.25"/>
					<rightPen lineWidth="0.25"/>
				</box>
				<textElement verticalAlignment="Top">
					<font size="9" isBold="true"/>
				</textElement>
				<text><![CDATA[Ass. Cliente:]]></text>
			</staticText>
			<staticText>
				<reportElement style="Coluna" x="445" y="0" width="56" height="12" uuid="41f2ce2c-4f57-40f9-94f6-6d8ba064a3c3"/>
				<textElement textAlignment="Right">
					<font size="7" isBold="false"/>
				</textElement>
				<text><![CDATA[Sub.Total]]></text>
			</staticText>
			<staticText>
				<reportElement style="Coluna" x="445" y="12" width="56" height="12" uuid="6b8f468c-a672-4bf6-8c02-a88be298e000"/>
				<textElement textAlignment="Right">
					<font size="7" isBold="false"/>
				</textElement>
				<text><![CDATA[ICMS-ST:]]></text>
			</staticText>
			<staticText>
				<reportElement style="Coluna" x="445" y="24" width="56" height="12" uuid="6adf4e5c-aac3-45b5-8b46-95105a46df62"/>
				<textElement textAlignment="Right">
					<font size="7" isBold="false"/>
				</textElement>
				<text><![CDATA[IPI:]]></text>
			</staticText>
			<textField pattern="#,##0.00;-#,##0.00">
				<reportElement style="Total" x="501" y="12" width="54" height="12" uuid="76e37ab8-b661-40bd-88c0-66b85fa998b4"/>
				<box rightPadding="5"/>
				<textElement textAlignment="Right">
					<font size="8" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$V{pvivltotst}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement style="Coluna" x="445" y="48" width="56" height="12" uuid="16ad87e1-c57a-458c-82bd-d0b43d7d05e3"/>
				<textElement textAlignment="Right">
					<font size="7" isBold="false"/>
				</textElement>
				<text><![CDATA[Vl.TOTAL]]></text>
			</staticText>
			<textField pattern="#,##0.00;-#,##0.00">
				<reportElement style="Total" x="501" y="48" width="54" height="12" uuid="0683124b-baac-4f81-a353-58ef3bdf978b"/>
				<box rightPadding="5"/>
				<textElement textAlignment="Right">
					<font size="8" isBold="true"/>
				</textElement>
				<textFieldExpression><![CDATA[$V{pvivltotal_1}+$V{pvivltotipi}+$V{pvivltotst}+$V{pvvlfrete_1}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true">
				<reportElement x="0" y="24" width="424" height="102" uuid="51ccf9e9-1393-4ceb-a611-b3be382e3294"/>
				<box leftPadding="3" rightPadding="2"/>
				<textElement textAlignment="Left" verticalAlignment="Top">
					<font size="8" isBold="true" isItalic="false"/>
				</textElement>
				<textFieldExpression><![CDATA["Observacao: "+$F{pvobsped}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement style="Coluna" x="445" y="36" width="56" height="12" uuid="b20cb471-ba63-412b-b475-11df8a18c8dc"/>
				<textElement textAlignment="Right">
					<font size="7" isBold="false"/>
				</textElement>
				<text><![CDATA[Frete]]></text>
			</staticText>
			<textField pattern="#,##0.00;-#,##0.00">
				<reportElement style="Total" x="501" y="24" width="54" height="12" uuid="0d994fc2-0b5f-44d7-90fb-5f6cb4183afb"/>
				<box rightPadding="5"/>
				<textElement textAlignment="Right">
					<font size="8" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$V{pvivltotipi}]]></textFieldExpression>
			</textField>
			<textField pattern="#,##0.00;-#,##0.00">
				<reportElement style="Total" x="501" y="36" width="54" height="12" uuid="016f7323-70e7-4631-9148-011b1149f526"/>
				<box rightPadding="5"/>
				<textElement textAlignment="Right">
					<font size="8" isBold="false"/>
				</textElement>
				<textFieldExpression><![CDATA[$V{pvvlfrete_1}]]></textFieldExpression>
			</textField>
		</band>
	</summary>
	<noData>
		<band height="37">
			<staticText>
				<reportElement x="36" y="0" width="487" height="37" uuid="a82f10c5-bc3d-482a-9d1c-32d8ca2b6c05"/>
				<textElement textAlignment="Center" verticalAlignment="Middle">
					<font size="14" isBold="true"/>
				</textElement>
				<text><![CDATA[Pedido não disponível para impressão]]></text>
			</staticText>
		</band>
	</noData>
</jasperReport>
