<?xml version="1.0" encoding="utf-8" standalone="no"?>
<TfrxReport Version="6.7.9" DotMatrixReport="False" EngineOptions.SilentMode="True" EngineOptions.NewSilentMode="simSilent" EngineOptions.UseFileCache="True" IniFile="\Software\Fast Reports" PreviewOptions.AllowEdit="False" PreviewOptions.Buttons="167935" PreviewOptions.Zoom="1" PrintOptions.Printer="Padrão" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="43487,3236286458" ReportOptions.Description.Text="" ReportOptions.LastChange="45084,6590859491" ScriptLanguage="PascalScript" ScriptText.Text="var&#13;&#10;CONTADOR : Integer;&#13;&#10;ultimaClasse: String;&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;procedure GroupHeader1OnBeforePrint(Sender: TfrxComponent);&#13;&#10;begin&#13;&#10;  ultimaClasse :='';&#13;&#10;  contador :=0;&#13;&#10;end;&#13;&#10;procedure MasterData1OnBeforePrint(Sender: TfrxComponent);&#13;&#10;   begin&#13;&#10;If &#60;tbRelatorio.&#34;CODVEN&#34;&#62; &#60;&#62; UltimaClasse then&#13;&#10;      BEGIN&#13;&#10;      UltimaClasse := &#60;tbRelatorio.&#34;CODVEN&#34;&#62;;&#13;&#10;      inc(CONTADOR);&#13;&#10;      END;&#13;&#10;end;&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;BEGIN&#13;&#10;END." ShowProgress="False" StoreInDFM="False">
  <Datasets>
    <item DataSet="tbRelatorio" DataSetName="tbRelatorio"/>
    <item DataSet="QryEmpresa" DataSetName="QryEmpresa"/>
    <item DataSet="qryFechada" DataSetName="qryFechada"/>
    <item DataSet="qryDevol" DataSetName="qryDevol"/>
  </Datasets>
  <Variables>
    <item Name=" Sisplan"/>
    <item Name="vUsuario" Value="'SISPLAN'"/>
    <item Name="vLayout" Value="''"/>
    <item Name="vNivel" Value="''"/>
    <item Name="vNivelDesc" Value="''"/>
    <item Name="vPastaFotos" Value="'C:\sisplan\..\Foto\'"/>
    <item Name="vPath" Value="'C:\sisplan'"/>
    <item Name="vTipoBanco" Value="'F'"/>
    <item Name="Empresa" Value="'_003'"/>
    <item Name="Layout" Value="'RelVenda1.FR3'"/>
    <item Name="PastaFotos" Value="''"/>
    <item Name="Usuario" Value="'SISPLAN'"/>
    <item Name="emp_id" Value="'3'"/>
    <item Name="EMISSAOATE" Value="'2023-06-07'"/>
    <item Name="RADIONFCE" Value="''"/>
    <item Name="TELA_ORDENACAO" Value="'RelVenda'"/>
    <item Name="CLIENTE" Value="''"/>
    <item Name="RADIOOP" Value="''"/>
    <item Name="ORDEM_ORDENACAO" Value="'1'"/>
    <item Name="VENDEDOR" Value="''"/>
    <item Name="CAIXAECF" Value="''"/>
    <item Name="EMISSAODE" Value="'2023-06-05'"/>
    <item Name="TABELA" Value="''"/>
    <item Name="DEVOLVIDO" Value="'true'"/>
    <item Name="CANCELADA" Value="'true'"/>
    <item Name="VENDA" Value="''"/>
    <item Name="AGRUPADA" Value="'true'"/>
    <item Name="PRODUTO" Value="''"/>
    <item Name="TIPOVENDA" Value="''"/>
    <item Name="EMITIDO" Value="'true'"/>
    <item Name="MARCA" Value="''"/>
    <item Name="PENDENTE" Value="'true'"/>
    <item Name="TIPO_ITEM" Value="'P'"/>
    <item Name="USR_CAIXA" Value="''"/>
    <item Name="GRUPO" Value="''"/>
  </Variables>
  <TfrxDataPage Name="Data" Height="1000" Left="0" Top="0" Width="1000">
    <TfrxFDDatabase Name="Conexao" DriverName="SisplanMSSqlDB" DatabaseName="14182S" Params.Text="Protocol=TCPIP&#13;&#10;Database=14182S&#13;&#10;Server=172.16.1.12&#13;&#10;Port=1433&#13;&#10;user_name=Sisplan&#13;&#10;password=Osm,2020.&#13;&#10;MonitorBy=Remote&#13;&#10;DriverID=SisplanMSSqlDB&#13;&#10;CharacterSet=UTF8&#13;&#10;ApplicationName=C:\Sistema\Sisplan\apiWeb.exe" LoginPrompt="False" Connected="false" PropData="05704C6566740340010470546F700258"/>
    <TfrxFDQuery Name="QryEmpresa" UserName="QryEmpresa" CloseDataSource="True" FieldAliases.Text="" BCDToCurrency="False" IgnoreDupParams="False" SQL.Text="SELECT * FROM EMPRESA WHERE EMP_ID = :EMP_ID  " MacroCreate="True" MacroExpand="True" ReadOnly="False" Database="Conexao" Left="400" Top="88">
      <Parameters>
        <item Name="EMP_ID" DataType="ftInteger" Expression="&#60;emp_id&#62;"/>
      </Parameters>
    </TfrxFDQuery>
    <TfrxFDQuery Name="qryFechada" UserName="qryFechada" CloseDataSource="True" FieldAliases.Text="" BCDToCurrency="False" Master="tbRelatorio" IgnoreDupParams="False" SQL.Text="SELECT FECHADA, CODVEN, ORCAMENTO, CANCELADA, COUNT (CODVEN)                                                                                                                         &#13;&#10;FROM VENDA_001 WHERE CODVEN IN (:CODVEN)&#13;&#10;GROUP BY CODVEN                                    " MacroCreate="True" MacroExpand="True" ReadOnly="False" Database="Conexao" Left="572" Top="88">
      <Parameters>
        <item Name="CODVEN" DataType="ftInteger" Expression="&#60;tbRelatorio.&#34;CODVEN&#34;&#62;"/>
      </Parameters>
    </TfrxFDQuery>
    <TfrxFDQuery Name="qryDevol" UserName="qryDevol" CloseDataSource="True" FieldAliases.Text="" BCDToCurrency="False" Master="tbRelatorio" IgnoreDupParams="False" SQL.Text="SELECT SUM (IT.TOTAL), SUM (IT.TOTAL_LIQ), SUM(IT.VALOR_DESC), SUM (IT.DESC_ITEM)  FROM VENDA_001 V&#13;&#10;INNER JOIN ITVENDA_001 IT ON IT.CODVEN = V.CODVEN &#13;&#10;WHERE  V.DATA IN (:DATA)                                                                                                                                                                                                                  " MacroCreate="True" MacroExpand="True" ReadOnly="False" Database="Conexao" Left="484" Top="88">
      <Parameters>
        <item Name="DATA" DataType="ftDate" Expression="&#60;tbRelatorio.&#34;DATA&#34;&#62;"/>
      </Parameters>
    </TfrxFDQuery>
  </TfrxDataPage>
  <TfrxReportPage Name="Page1" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" ColumnWidth="0" ColumnPositions.Text="" Frame.Typ="0" MirrorMode="0" HGuides.Text="" VGuides.Text="">
    <TfrxPageFooter Name="PageFooter1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="15,11812" Left="0" Top="366,61441" Width="718,1107">
      <TfrxMemoView Name="Memo1" AllowVectorExport="True" Left="0" Top="3,77953" Width="718,1107" Height="11,33859" Font.Charset="1" Font.Color="-16777208" Font.Height="-8" Font.Name="Arial" Font.Style="0" Frame.Typ="4" HAlign="haRight" ParentFont="False" VAlign="vaCenter" Text="Sisplan Sistemas e Planejamento LTDA - (47) 3380-6100 - www.sisplansistemas.com.br"/>
      <TfrxMemoView Name="Memo25" AllowVectorExport="True" Left="0" Top="3,77953" Width="347,71676" Height="11,33859" Font.Charset="1" Font.Color="-16777208" Font.Height="-8" Font.Name="Arial" Font.Style="0" Frame.Typ="0" ParentFont="False" VAlign="vaCenter" Text="[Page#]"/>
    </TfrxPageFooter>
    <TfrxPageHeader Name="PageHeader1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="107,91342" Left="0" Top="18,89765" Width="718,1107">
      <TfrxMemoView Name="Memo2" AllowVectorExport="True" Left="619,06339" Top="12,67718" Width="98,26778" Height="15,11812" Font.Charset="1" Font.Color="-16777208" Font.Height="-8" Font.Name="Arial" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" WordWrap="False" VAlign="vaCenter" Text="Pag.: [&#60;Page#&#62;] / [&#60;TotalPages#&#62;]">
        <Formats>
          <item/>
          <item/>
        </Formats>
      </TfrxMemoView>
      <TfrxMemoView Name="Memo3" AllowVectorExport="True" Left="619,28386" Top="24,11812" Width="98,26778" Height="15,11812" Font.Charset="1" Font.Color="-16777208" Font.Height="-8" Font.Name="Arial" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" VAlign="vaCenter" Text="[vUsuario]"/>
      <TfrxMemoView Name="Memo4" AllowVectorExport="True" Left="0" Top="31,89765" Width="718,1107" Height="26,45671" DataSetName="tbEmpresa" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Arial" Font.Style="5" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="RELATÓRIO DE VENDAS"/>
      <TfrxMemoView Name="tbEmpresaEMP_NOME" AllowVectorExport="True" Left="109,60637" Top="2,44094" Width="498,89796" Height="26,45671" DataSetName="tbEmpresa" Font.Charset="1" Font.Color="-16777208" Font.Height="-15" Font.Name="Arial" Font.Style="1" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="[QryEmpresa.&#34;EMP_NOME&#34;]">
        <Formats>
          <item/>
          <item/>
        </Formats>
      </TfrxMemoView>
      <TfrxMemoView Name="Date" AllowVectorExport="True" Left="619,28386" Top="2,44094" Width="98,26778" Height="15,11812" Font.Charset="1" Font.Color="-16777208" Font.Height="-8" Font.Name="Arial" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" WordWrap="False" VAlign="vaCenter" Text="[Date] - [Time]">
        <Formats>
          <item/>
          <item/>
        </Formats>
      </TfrxMemoView>
      <TfrxPictureView Name="Picture1" AllowVectorExport="True" Left="6,22047" Top="0" Width="105,82684" Height="68,03154" Center="True" DataField="EMP_LOGO" DataSet="QryEmpresa" DataSetName="QryEmpresa" Frame.Typ="0" HightQuality="True" Transparent="False" TransparentColor="16777215"/>
      <TfrxMemoView Name="Memo26" AllowVectorExport="True" Left="619,28386" Top="36,7953" Width="98,26778" Height="15,11812" Font.Charset="1" Font.Color="-16777208" Font.Height="-8" Font.Name="Arial" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" VAlign="vaCenter" Text="[vLayout]"/>
      <TfrxMemoView Name="Memo43" IndexTag="1" AllowVectorExport="True" Left="0" Top="86,92919" Width="332,59864" Height="18,89765" DataSet="tbRelatorio" DataSetName="tbRelatorio" Font.Charset="1" Font.Color="0" Font.Height="-16" Font.Name="Arial" Font.Style="1" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="VENDEDOR"/>
      <TfrxMemoView Name="Memo44" IndexTag="1" AllowVectorExport="True" Left="333,1577" Top="86,92919" Width="52,91342" Height="18,89765" DataSet="tbRelatorio" DataSetName="tbRelatorio" Font.Charset="1" Font.Color="0" Font.Height="-16" Font.Name="Arial" Font.Style="1" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="VP"/>
      <TfrxMemoView Name="Memo30" IndexTag="1" AllowVectorExport="True" Left="388,953" Top="86,92919" Width="52,91342" Height="18,89765" DataSet="tbRelatorio" DataSetName="tbRelatorio" Font.Charset="1" Font.Color="0" Font.Height="-16" Font.Name="Arial" Font.Style="1" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="CC"/>
      <TfrxMemoView Name="Memo31" IndexTag="1" AllowVectorExport="True" Left="442,08689" Top="86,92919" Width="52,91342" Height="18,89765" DataSet="tbRelatorio" DataSetName="tbRelatorio" Font.Charset="1" Font.Color="0" Font.Height="-16" Font.Name="Arial" Font.Style="1" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="PA"/>
      <TfrxMemoView Name="Memo32" IndexTag="1" AllowVectorExport="True" Left="495,44125" Top="86,92919" Width="52,91342" Height="18,89765" DataSet="tbRelatorio" DataSetName="tbRelatorio" Font.Charset="1" Font.Color="0" Font.Height="-16" Font.Name="Arial" Font.Style="1" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="TM"/>
      <TfrxMemoView Name="Memo46" IndexTag="1" AllowVectorExport="True" Left="548,1342" Top="86,92919" Width="52,91342" Height="18,89765" DataSet="tbRelatorio" DataSetName="tbRelatorio" Font.Charset="1" Font.Color="0" Font.Height="-16" Font.Name="Arial" Font.Style="1" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="PM"/>
      <TfrxMemoView Name="Memo47" IndexTag="1" AllowVectorExport="True" Left="600,94527" Top="86,92919" Width="83,14966" Height="18,89765" DataSet="tbRelatorio" DataSetName="tbRelatorio" Font.Charset="1" Font.Color="0" Font.Height="-16" Font.Name="Arial" Font.Style="1" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="VFL"/>
    </TfrxPageHeader>
    <TfrxGroupFooter Name="GroupFooter1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="26,45671" Left="0" Top="279,68522" Width="718,1107" Stretched="True">
      <TfrxMemoView Name="tbRelatorioREP_NOME" IndexTag="1" AllowVectorExport="True" Left="-0,25201" Top="-0,22047" Width="332,59864" Height="18,89765" DataSet="tbRelatorio" DataSetName="tbRelatorio" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="0" Frame.Typ="0" ParentFont="False" Text="[tbRelatorio.&#34;CODREP&#34;]-[tbRelatorio.&#34;REP_NOME&#34;]">
        <Formats>
          <item/>
          <item/>
        </Formats>
      </TfrxMemoView>
      <TfrxMemoView Name="Memo45" IndexTag="1" AllowVectorExport="True" Left="332,1577" Top="-0,22047" Width="52,91342" Height="18,89765" DataSet="tbRelatorio" DataSetName="tbRelatorio" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="0" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="[SUM(IIF(&#60;tbRelatorio.&#34;DEVOLUCAO&#34;&#62; = 0,&#60;tbRelatorio.&#34;QUANTIDADE&#34;&#62;,0),MasterData1,1)]"/>
      <TfrxMemoView Name="Memo49" IndexTag="1" AllowVectorExport="True" Left="442,08689" Top="-0,22047" Width="52,91342" Height="18,89765" DataSet="tbRelatorio" DataSetName="tbRelatorio" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="0" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="[(SUM(IIF(&#60;tbRelatorio.&#34;DEVOLUCAO&#34;&#62; = 0,&#60;tbRelatorio.&#34;QUANTIDADE&#34;&#62;,0),MasterData1,1))]"/>
      <TfrxMemoView Name="Memo50" IndexTag="1" AllowVectorExport="True" Left="495,44125" Top="-0,22047" Width="52,91342" Height="18,89765" DataSet="tbRelatorio" DataSetName="tbRelatorio" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="0" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="[SUM(IIF(&#60;tbRelatorio.&#34;DEVOLUCAO&#34;&#62; = 0,&#60;tbRelatorio.&#34;QUANTIDADE&#34;&#62;,0),MasterData1,1)]"/>
      <TfrxMemoView Name="Memo51" IndexTag="1" AllowVectorExport="True" Left="548,1342" Top="-0,22047" Width="52,91342" Height="18,89765" DataSet="tbRelatorio" DataSetName="tbRelatorio" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="0" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="[(SUM(iif(&#60;tbRelatorio.&#34;DEVOLUCAO&#34;&#62; = 0, &#60;tbRelatorio.&#34;TOTAL_LIQ&#34;&#62;,0))-SUM(iif(&#60;tbRelatorio.&#34;DEVOLUCAO&#34;&#62; = 1, &#60;tbRelatorio.&#34;TOTAL_LIQ&#34;&#62;,0),Masterdata1,1))/(SUM(IIF(&#60;tbRelatorio.&#34;DEVOLUCAO&#34;&#62; = 0,&#60;tbRelatorio.&#34;QUANTIDADE&#34;&#62;,0),MasterData1,1))]"/>
      <TfrxMemoView Name="Memo52" IndexTag="1" AllowVectorExport="True" Left="600,94527" Top="-0,22047" Width="83,14966" Height="18,89765" DataSet="tbRelatorio" DataSetName="tbRelatorio" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="0" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="[SUM(iif(&#60;tbRelatorio.&#34;DEVOLUCAO&#34;&#62; = 0, &#60;tbRelatorio.&#34;TOTAL_LIQ&#34;&#62;,0))-SUM(iif(&#60;tbRelatorio.&#34;DEVOLUCAO&#34;&#62; = 1, &#60;tbRelatorio.&#34;TOTAL_LIQ&#34;&#62;,0),Masterdata1,1)]"/>
      <TfrxMemoView Name="Memo48" IndexTag="1" AllowVectorExport="True" Left="385,17347" Top="-0,22047" Width="52,91342" Height="18,89765" DataSet="tbRelatorio" DataSetName="tbRelatorio" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="0" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text=""/>
    </TfrxGroupFooter>
    <TfrxMasterData Name="MasterData1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="22,67718" Left="0" Top="234,33086" Width="718,1107" OnBeforePrint="MasterData1OnBeforePrint" ColumnWidth="0" ColumnGap="0" DataSet="tbRelatorio" DataSetName="tbRelatorio" RowCount="0" Stretched="True">
      <TfrxMemoView Name="tbRelatorioCODVEN" IndexTag="1" AllowVectorExport="True" Left="3,77953" Top="1,38777878078145E-17" Width="79,37013" Height="18,89765" DataField="CODVEN" DataSet="tbRelatorio" DataSetName="tbRelatorio" Font.Charset="1" Font.Color="0" Font.Height="-16" Font.Name="Arial" Font.Style="1" Frame.Typ="0" Fill.BackColor="16700346" HAlign="haCenter" ParentFont="False" Text="[tbRelatorio.&#34;CODVEN&#34;]"/>
    </TfrxMasterData>
    <TfrxGroupHeader Name="GroupHeader2" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="22,67718" Left="0" Top="188,9765" Width="718,1107" Condition="tbRelatorio.&#34;CODREP&#34;"/>
  </TfrxReportPage>
</TfrxReport>
