<?xml version="1.0" encoding="utf-8" standalone="no"?>
<TfrxReport Version="6.4.11" DotMatrixReport="False" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Default" PrintOptions.PrintOnSheet="0" ReportOptions.Author="unionsystem" ReportOptions.CreateDate="41561,8945570602" ReportOptions.Description.Text="" ReportOptions.LastChange="44111,6907339352" ScriptLanguage="PascalScript" ScriptText.Text="&#13;&#10;function Ext1(Valor: Real): String;&#13;&#10;begin&#13;&#10;  // Linha 1&#13;&#10;&#13;&#10;  Result := Copy(Extenso(Valor), 0, 80);&#13;&#10;&#13;&#10;  while Length(Result) &#60;&#62; 80 do Result := Result + '*';&#13;&#10;end;&#13;&#10;&#13;&#10;function Ext2(Valor: Real): String;&#13;&#10;begin&#13;&#10;  // Linha 2&#13;&#10;&#13;&#10;  Result := Copy(Extenso(Valor), 81, 80);&#13;&#10;&#13;&#10;  while Length(Result) &#60;&#62; 80 do Result := Result + '*';&#13;&#10;end;&#13;&#10;&#13;&#10;function Ext3(Valor: Real): String;&#13;&#10;begin&#13;&#10;  // Linha 3&#13;&#10;&#13;&#10;  Result := Copy(Extenso(Valor), 162, 80);&#13;&#10;&#13;&#10;  while Length(Result) &#60;&#62; 80 do Result := Result + '*';&#13;&#10;end;&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;function Extenso(Valor: Real): String;&#13;&#10;&#13;&#10;function Mini(Valor: String): String;&#13;&#10;var&#13;&#10;  Texto : array[0..36] of string = (['A','UM', 'DOIS', 'TRES', 'QUATRO', 'CINCO', 'SEIS', 'SETE',&#13;&#10;                                   'OITO', 'NOVE', 'DEZ', 'ONZE', 'DOZE', 'TREZE', 'CATORZE',&#13;&#10;                                   'QUINZE', 'DEZESSEIS', 'DEZESSETE', 'DEZOITO', 'DEZENOVE',&#13;&#10;                                   'VINTE', 'TRINTA', 'QUARENTA', 'CINQÜENTA', 'SESSENTA',&#13;&#10;                                   'SETENTA', 'OITENTA', 'NOVENTA', 'CENTO', 'DUZENTOS',&#13;&#10;                                   'TREZENTOS', 'QUATROCENTOS', 'QUINHENTOS', 'SEISCENTOS', 'SETECENTOS', 'OITOCENTOS', 'NOVECENTOS']);&#13;&#10;begin&#13;&#10;  // Mini extenso&#13;&#10;&#13;&#10;  Result := '';&#13;&#10;&#13;&#10;  if Valor &#60;&#62; '000' then&#13;&#10;  begin&#13;&#10;    if StrToInt(Valor) &#60;= 20 then&#13;&#10;    begin&#13;&#10;      Result := Result + Texto[StrToInt(Valor)];&#13;&#10;    end&#13;&#10;    else&#13;&#10;    if (StrToInt(Valor) &#62; 20) and (StrToInt(Valor) &#60; 100) then&#13;&#10;    begin&#13;&#10;      if Copy(Valor, 2, 1) = '2' then Result := Result + Texto[20];&#13;&#10;      if Copy(Valor, 2, 1) = '3' then Result := Result + Texto[21];&#13;&#10;      if Copy(Valor, 2, 1) = '4' then Result := Result + Texto[22];&#13;&#10;      if Copy(Valor, 2, 1) = '5' then Result := Result + Texto[23];&#13;&#10;      if Copy(Valor, 2, 1) = '6' then Result := Result + Texto[24];&#13;&#10;      if Copy(Valor, 2, 1) = '7' then Result := Result + Texto[25];&#13;&#10;      if Copy(Valor, 2, 1) = '8' then Result := Result + Texto[26];&#13;&#10;      if Copy(Valor, 2, 1) = '9' then Result := Result + Texto[27];&#13;&#10;&#13;&#10;      if Copy(Valor, 3, 1) &#60;&#62; '0' then Result := Result + ' E ' + Texto[StrToInt(Copy(Valor, 3, 1))];&#13;&#10;    end&#13;&#10;    else&#13;&#10;    if StrToInt(Valor) &#62; 99 then&#13;&#10;    begin&#13;&#10;      if Valor = '100' then Result := Result + 'CEM' else&#13;&#10;      begin&#13;&#10;        if Copy(Valor, 1, 1) = '1' then Result := Result + Texto[28];&#13;&#10;        if Copy(Valor, 1, 1) = '2' then Result := Result + Texto[29];&#13;&#10;        if Copy(Valor, 1, 1) = '3' then Result := Result + Texto[30];&#13;&#10;        if Copy(Valor, 1, 1) = '4' then Result := Result + Texto[31];&#13;&#10;        if Copy(Valor, 1, 1) = '5' then Result := Result + Texto[32];&#13;&#10;        if Copy(Valor, 1, 1) = '6' then Result := Result + Texto[33];&#13;&#10;        if Copy(Valor, 1, 1) = '7' then Result := Result + Texto[34];&#13;&#10;        if Copy(Valor, 1, 1) = '8' then Result := Result + Texto[35];&#13;&#10;        if Copy(Valor, 1, 1) = '9' then Result := Result + Texto[36];&#13;&#10;      end;&#13;&#10;&#13;&#10;      if (StrToInt(Copy(Valor, 2, 2)) &#60;= 20) and (StrToInt(Copy(Valor, 2, 2)) &#62; 0) then&#13;&#10;      begin&#13;&#10;        Result := Result + ' E ' + Texto[StrToInt(Copy(Valor, 2, 2))];&#13;&#10;      end&#13;&#10;      else&#13;&#10;      if StrToInt(Copy(Valor, 2, 2)) &#62; 20 then&#13;&#10;      begin&#13;&#10;        if Copy(Valor, 2, 1) = '2' then Result := Result + ' E ' + Texto[20];&#13;&#10;        if Copy(Valor, 2, 1) = '3' then Result := Result + ' E ' + Texto[21];&#13;&#10;        if Copy(Valor, 2, 1) = '4' then Result := Result + ' E ' + Texto[22];&#13;&#10;        if Copy(Valor, 2, 1) = '5' then Result := Result + ' E ' + Texto[23];&#13;&#10;        if Copy(Valor, 2, 1) = '6' then Result := Result + ' E ' + Texto[24];&#13;&#10;        if Copy(Valor, 2, 1) = '7' then Result := Result + ' E ' + Texto[25];&#13;&#10;        if Copy(Valor, 2, 1) = '8' then Result := Result + ' E ' + Texto[26];&#13;&#10;        if Copy(Valor, 2, 1) = '9' then Result := Result + ' E ' + Texto[27];&#13;&#10;&#13;&#10;        if Copy(Valor, 3, 1) &#60;&#62; '0' then Result := Result + ' E ' + Texto[StrToInt(Copy(Valor, 3, 1))];&#13;&#10;      end;&#13;&#10;    end;&#13;&#10;  end;&#13;&#10;end;&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;var&#13;&#10;  ValorF: String;&#13;&#10;  Bilhao, Milhao, Milhar, Centena, Centavos: String;&#13;&#10;begin&#13;&#10;  // Verifico&#13;&#10;&#13;&#10;  if (Valor &#60; 0) or (Valor &#62; 999999999999.99) then&#13;&#10;  begin&#13;&#10;    Result := 'VALOR INVÁLIDO!!!';&#13;&#10;  end&#13;&#10;  else&#13;&#10;  begin&#13;&#10;    // Formato o valor e jogo numa variável&#13;&#10;&#13;&#10;    ValorF := FormatFloat('###,###,###,###,##000000000000.00', Valor);&#13;&#10;&#13;&#10;    // Divido o valor formatado e jogo em variáveis&#13;&#10;&#13;&#10;    Bilhao   := Copy(ValorF, 0, 3);&#13;&#10;    Milhao   := Copy(ValorF, 5, 3);&#13;&#10;    Milhar   := Copy(ValorF, 9, 3);&#13;&#10;    Centena  := Copy(ValorF, 13, 3);&#13;&#10;    Centavos := '0' + Copy(ValorF, 17, 2);&#13;&#10;&#13;&#10;    Result := '';&#13;&#10;&#13;&#10;    if Mini(Bilhao) &#60;&#62; '' then&#13;&#10;    begin&#13;&#10;      if StrToInt(Bilhao) = 1 then Result := Result + Mini(Bilhao) + ' ' + 'BILHAO' else Result := Result + Mini(Bilhao) + ' ' + 'BILHOES';&#13;&#10;    end;&#13;&#10;&#13;&#10;    if Mini(Milhao) &#60;&#62; '' then&#13;&#10;    begin&#13;&#10;      if Mini(Bilhao) &#60;&#62; '' then Result := Result + ', ';&#13;&#10;&#13;&#10;      if StrToInt(Milhao) = 1 then Result := Result + Mini(Milhao) + ' ' + 'MILHAO' else Result := Result + Mini(Milhao) + ' ' + 'MILHOES';&#13;&#10;    end;&#13;&#10;&#13;&#10;    if Mini(Milhar) &#60;&#62; '' then&#13;&#10;    begin&#13;&#10;      if (Mini(Bilhao) &#60;&#62; '') or (Mini(Milhao) &#60;&#62; '') then Result := Result + ', ';&#13;&#10;&#13;&#10;      Result := Result + Mini(Milhar) + ' ' + 'MIL';&#13;&#10;    end;&#13;&#10;&#13;&#10;    if Mini(Centena) &#60;&#62; '' then&#13;&#10;    begin&#13;&#10;      if (Mini(Bilhao) &#60;&#62; '') or (Mini(Milhao) &#60;&#62; '') or (Mini(Milhar) &#60;&#62; '') then Result := Result + ', ';&#13;&#10;&#13;&#10;      Result := Result + Mini(Centena);&#13;&#10;    end;&#13;&#10;&#13;&#10;    if Trunc(Valor) &#62; 1 then Result := Result + ' REAIS' else if Trunc(Valor) = 1 then Result := Result + ' REAL';&#13;&#10;&#13;&#10;    if Mini(Centavos) &#60;&#62; '' then&#13;&#10;    begin&#13;&#10;      if (Mini(Bilhao) &#60;&#62; '') or (Mini(Milhao) &#60;&#62; '') or (Mini(Milhar) &#60;&#62; '') or (Mini(Centena) &#60;&#62; '') then Result := Result + ' E ';&#13;&#10;&#13;&#10;      Result := Result + Mini(Centavos) + ' CENTAVOS';&#13;&#10;    end;&#13;&#10;  end;&#13;&#10;end;&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;procedure Page1OnBeforePrint(Sender: TfrxComponent);&#13;&#10;begin&#13;&#10; if &#60;Logo&#62; = null then exit;&#13;&#10;&#13;&#10; if &#60;Logo&#62; &#60;&#62; '' then&#13;&#10;   Picture1.picture.loadfromfile(&#60;Logo&#62;);&#13;&#10;end;&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;begin&#13;&#10;&#13;&#10;end.">
  <Datasets>
    <item DataSet="dados" DataSetName="dados"/>
    <item DataSet="fparametros" DataSetName="parametros"/>
  </Datasets>
  <Variables>
    <item Name=" externas"/>
    <item Name="logo"/>
    <item Name="titulo"/>
    <item Name="login"/>
    <item Name="mostraquantidade"/>
    <item Name="datainicial"/>
    <item Name="datafinal"/>
  </Variables>
  <TfrxDataPage Name="frxDataPage1" Height="1000" Left="0" Top="0" Width="1000"/>
  <TfrxReportPage Name="Page1" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="5" RightMargin="10" TopMargin="5" BottomMargin="5" ColumnWidth="0" ColumnPositions.Text="" Frame.Typ="0" MirrorMode="0" PrintIfEmpty="False" HGuides.Text="" VGuides.Text="" OnBeforePrint="Page1OnBeforePrint">
    <TfrxPageHeader Name="PageHeader1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="143,62204724" Left="0" Top="18,89765" Width="737,00835">
      <TfrxMemoView Name="parametrosrazao" Align="baRight" AllowVectorExport="True" Left="-547,29963" Top="1,23624" Width="549,29963" Height="34,01577" DataField="fantasia" DataSet="fparametros" DataSetName="parametros" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="Arial" Font.Style="5" Frame.Typ="0" ParentFont="False" Text="[parametros.&#34;fantasia&#34;]"/>
      <TfrxMemoView Name="Memo29" AllowVectorExport="True" Left="171,07885" Top="4,01577" Width="394,3389" Height="22,67718" DataSet="fparametros" DataSetName="parametros" Font.Charset="1" Font.Color="0" Font.Height="-15" Font.Name="Arial" Font.Style="1" Frame.Typ="0" ParentFont="False" Text="[parametros.&#34;razao&#34;]"/>
      <TfrxMemoView Name="Memo40" AllowVectorExport="True" Left="545,04762" Top="3,33859" Width="188,9765" Height="18,89765" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="Página [Page] de [TotalPages#]"/>
      <TfrxMemoView Name="Memo1" Align="baWidth" AllowVectorExport="True" Left="0" Top="86,92919" Width="737,00835" Height="26,45671" DataSet="fparametros" DataSetName="parametros" Font.Charset="1" Font.Color="0" Font.Height="-15" Font.Name="Arial" Font.Style="1" Frame.Typ="8" HAlign="haCenter" ParentFont="False" Text="ENTREGAS REALIZADAS"/>
      <TfrxMemoView Name="Date" AllowVectorExport="True" Left="533,70903" Top="26,45671" Width="200,31509" Height="18,89765" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="Data emissão [Date] [Time]"/>
      <TfrxPictureView Name="Picture1" AllowVectorExport="True" Left="2" Top="0,992270000000001" Width="102,55906" Height="75,42517" Frame.Typ="0" HightQuality="False" Transparent="False" TransparentColor="16777215"/>
      <TfrxMemoView Name="datainicial" AllowVectorExport="True" Left="272,12616" Top="37,7953" Width="79,37013" Height="18,89765" Frame.Typ="0" Text="[datainicial]"/>
      <TfrxMemoView Name="datafinal" AllowVectorExport="True" Left="387,51206" Top="37,7953" Width="79,37013" Height="18,89765" Frame.Typ="0" Text="[datafinal]"/>
      <TfrxMemoView Name="Memo7" AllowVectorExport="True" Left="207,19697" Top="38,57483" Width="56,69295" Height="18,89765" Frame.Typ="0" Text="Período:"/>
      <TfrxMemoView Name="Memo11" AllowVectorExport="True" Left="359,83488" Top="37,7953" Width="18,89765" Height="15,11812" Frame.Typ="0" Text="a"/>
      <TfrxMemoView Name="Memo9" AllowVectorExport="True" Left="337,18924" Top="120,94496" Width="102,04731" Height="18,89765" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="1" Frame.Typ="0" ParentFont="False" Text="CLIENTE ORIGEM"/>
      <TfrxMemoView Name="Memo8" AllowVectorExport="True" Left="44,81107" Top="120,94496" Width="98,26778" Height="18,89765" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="1" Frame.Typ="0" ParentFont="False" Text="DATA ENTREGA"/>
      <TfrxMemoView Name="Memo10" AllowVectorExport="True" Left="150,51979" Top="120,94496" Width="49,13389" Height="18,89765" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="1" Frame.Typ="0" ParentFont="False" Text="HORA"/>
      <TfrxMemoView Name="Memo12" AllowVectorExport="True" Left="481,9295" Top="120,94496" Width="102,04731" Height="18,89765" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="1" Frame.Typ="0" ParentFont="False" Text="CLIENTE DESTINO"/>
      <TfrxMemoView Name="Memo13" AllowVectorExport="True" Left="204,78757" Top="120,94496" Width="113,3859" Height="18,89765" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="1" Frame.Typ="0" ParentFont="False" Text="ENTREGADOR"/>
    </TfrxPageHeader>
    <TfrxPageFooter Name="PageFooter1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="18,89765" Left="0" Top="438,42548" Width="737,00835">
      <TfrxMemoView Name="Memo4" Align="baWidth" AllowVectorExport="True" Left="0" Top="0,77953" Width="737,00835" Height="11,33859" Font.Charset="1" Font.Color="0" Font.Height="-8" Font.Name="Arial" Font.Style="1" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="UNIONSYSTEM SISTEMAS - www.unionsystem.com.br"/>
    </TfrxPageFooter>
    <TfrxMasterData Name="MasterData1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="18,89765" Left="0" Top="268,34663" Width="737,00835" ColumnWidth="0" ColumnGap="0" DataSet="dados" DataSetName="dados" RowCount="0">
      <TfrxMemoView Name="dadosdata_cadastro" IndexTag="1" AllowVectorExport="True" Left="44,81107" Top="1,77953" Width="98,26778" Height="15,11812" DataField="data_cadastro" DataSet="dados" DataSetName="dados" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" Frame.Typ="0" ParentFont="False" Text="[dados.&#34;data_cadastro&#34;]"/>
      <TfrxMemoView Name="dadoshora_entregue" IndexTag="1" AllowVectorExport="True" Left="150,51979" Top="1,77953" Width="45,35436" Height="15,11812" DataField="hora_entregue" DataSet="dados" DataSetName="dados" DisplayFormat.FormatStr="hh:mm" DisplayFormat.Kind="fkDateTime" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" Frame.Typ="0" ParentFont="False" Text="[dados.&#34;hora_entregue&#34;]"/>
      <TfrxMemoView Name="dadosresponsavel_entrega" IndexTag="1" AllowVectorExport="True" Left="337,18924" Top="1,77953" Width="139,84261" Height="15,11812" DataField="responsavel_coleta" DataSet="dados" DataSetName="dados" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" Frame.Typ="0" ParentFont="False" Text="[dados.&#34;responsavel_coleta&#34;]"/>
      <TfrxMemoView Name="dadosempresa_coleta" IndexTag="1" AllowVectorExport="True" Left="481,9295" Top="1,77953" Width="151,1812" Height="15,11812" DataField="responsavel_entrega" DataSet="dados" DataSetName="dados" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" Frame.Typ="0" ParentFont="False" Text="[dados.&#34;responsavel_entrega&#34;]"/>
      <TfrxMemoView Name="dadosentregador" IndexTag="1" AllowVectorExport="True" Left="204,78757" Top="1,77953" Width="128,50402" Height="15,11812" DataField="entregador" DataSet="dados" DataSetName="dados" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" Frame.Typ="0" ParentFont="False" Text="[dados.&#34;entregador&#34;]"/>
    </TfrxMasterData>
    <TfrxFooter Name="Footer1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="22,67718" Left="0" Top="355,27582" Width="737,00835">
      <TfrxSysMemoView Name="SysMemo1" AllowVectorExport="True" Left="137,62214" Top="0" Width="94,48825" Height="18,89765" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="1" Frame.Typ="0" ParentFont="False" Text="[COUNT(MasterData1)]"/>
      <TfrxMemoView Name="Memo14" AllowVectorExport="True" Left="11,33859" Top="0" Width="120,94496" Height="18,89765" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="1" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="Total de geral:"/>
    </TfrxFooter>
    <TfrxGroupHeader Name="GroupHeader1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="22,67718" Left="0" Top="222,99227" Width="737,00835" Condition="dados.&#34;entregador&#34;">
      <TfrxMemoView Name="dadosentregador1" IndexTag="1" AllowVectorExport="True" Left="3,77953" Top="0" Width="680,3154" Height="18,89765" DataSet="dados" DataSetName="dados" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="1" Frame.Typ="0" ParentFont="False" Text="Entregador: [dados.&#34;entregador&#34;]"/>
    </TfrxGroupHeader>
    <TfrxGroupFooter Name="GroupFooter1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="22,67718" Left="0" Top="309,92146" Width="737,00835">
      <TfrxSysMemoView Name="SysMemo2" AllowVectorExport="True" Left="130,06308" Top="0" Width="94,48825" Height="18,89765" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="1" Frame.Typ="0" ParentFont="False" Text="[COUNT(MasterData1)]"/>
      <TfrxMemoView Name="Memo15" AllowVectorExport="True" Left="3,77953" Top="0" Width="120,94496" Height="18,89765" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="1" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="Total de entregas:"/>
    </TfrxGroupFooter>
  </TfrxReportPage>
</TfrxReport>
