<?xml version="1.0" encoding="utf-8" standalone="no"?>
<TfrxReport Version="5.4.6" DotMatrixReport="False" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Default" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="41561,8945570602" ReportOptions.Description.Text="" ReportOptions.LastChange="42976,781411169" ScriptLanguage="PascalScript" ScriptText.Text="var&#13;&#10;  _total : string;&#13;&#10;&#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;procedure Page2OnBeforePrint(Sender: TfrxComponent);&#13;&#10;begin&#13;&#10;  if &#60;Logo&#62; &#60;&#62; '' then&#13;&#10;    Picture2.picture.loadfromfile(&#60;Logo&#62;);&#13;&#10;end;&#13;&#10;&#13;&#10;procedure Rich2OnBeforePrint(Sender: TfrxComponent);&#13;&#10;begin&#13;&#10;  _total := '(' + ext1(&#60;dadoscontrato.&#34;soma&#34;&#62;);&#13;&#10;end;&#13;&#10;&#13;&#10;begin&#13;&#10;&#13;&#10;end." StoreInDFM="False">
  <Datasets>
    <item DataSet="dadoscontrato" DataSetName="dadoscontrato"/>
    <item DataSet="dadositens" DataSetName="dadositens"/>
    <item DataSet="fparametros" DataSetName="parametros"/>
  </Datasets>
  <Variables>
    <item Name=" externas"/>
    <item Name="Logo"/>
    <item Name="Nomefuncionario"/>
    <item Name="email"/>
  </Variables>
  <TfrxDataPage Name="frxDataPage1" Height="1000" Left="0" Top="0" Width="1000"/>
  <TfrxReportPage Name="Page2" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="" OnBeforePrint="Page2OnBeforePrint">
    <TfrxPageHeader Name="PageHeader2" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="118,38837333" Left="0" Top="18,89765" Width="718,1107">
      <TfrxMemoView Name="Memo8" Left="567,10235" Top="27,78757" Width="151,1812" Height="22,67718" DataSet="dados" DataSetName="dados" DisplayFormat.FormatStr="dd/mm/yyyy" DisplayFormat.Kind="fkDateTime" Font.Charset="1" Font.Color="0" Font.Height="-16" Font.Name="Arial" Font.Style="0" Frame.Typ="11" Frame.Width="0,5" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="[Date]"/>
      <TfrxMemoView Name="Memo9" Left="567,10235" Top="77,12616" Width="151,1812" Height="22,67718" DataSet="dados" DataSetName="dados" Font.Charset="1" Font.Color="0" Font.Height="-16" Font.Name="Arial" Font.Style="1" Frame.Typ="11" Frame.Width="0,5" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="[dadoscontrato.&#34;codigo&#34;]"/>
      <TfrxPictureView Name="Picture2" Left="2" Top="0,99227" Width="163,03154" Height="105,66141" HightQuality="False" Transparent="False" TransparentColor="16777215"/>
      <TfrxMemoView Name="Memo10" Align="baCenter" Left="164,409555" Top="2,08658" Width="389,29159" Height="95" Font.Charset="1" Font.Color="0" Font.Height="-16" Font.Name="Arial" Font.Style="1" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="INSTRUMENTO PARTICULAR DE CONFISSÃO DE DÍVIDA"/>
      <TfrxMemoView Name="Memo11" Left="567,10235" Top="4,10235" Width="151,1812" Height="26,45671" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="0" Frame.Typ="7" Frame.Width="0,5" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="1 - Data de Emissão"/>
      <TfrxMemoView Name="Memo12" Left="567,10235" Top="54,10235" Width="151,1812" Height="22,67718" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="0" Frame.Typ="7" Frame.Width="0,5" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="2 - Contrato nº"/>
      <TfrxMemoView Name="Memo17" Align="baWidth" Left="0" Top="113,54329" Width="718,1107" Height="3,32282" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" Frame.Typ="15" Frame.Width="0,5" ParentFont="False" VAlign="vaCenter" Text=""/>
    </TfrxPageHeader>
    <TfrxMasterData Name="MasterData2" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="425,18058" Left="0" Top="196,53556" Width="718,1107" ColumnWidth="0" ColumnGap="0" DataSet="dadoscontrato" DataSetName="dadoscontrato" RowCount="0">
      <TfrxRichView Name="Rich2" Align="baClient" Left="0" Top="0" Width="718,1107" Height="425,18058" OnBeforePrint="Rich2OnBeforePrint" GapX="2" GapY="1" PropData="0852696368456469740A220800007B5C727466315C616E73695C616E7369637067313235325C64656666305C6465666C616E67313034367B5C666F6E7474626C7B5C66305C66726F6D616E5C66707271325C6663686172736574302043616D627269613B7D7B5C66315C666E696C5C6663686172736574302043616D627269613B7D7B5C66325C6673776973735C66707271325C66636861727365743020417269616C3B7D7B5C66335C666E696C5C66636861727365743020417269616C3B7D7D0D0A7B5C636F6C6F7274626C203B5C726564305C677265656E305C626C7565303B7D0D0A7B5C2A5C67656E657261746F72204D7366746564697420352E34312E32312E323531303B7D5C766965776B696E64345C7563315C706172645C73613230305C736C3237365C736C6D756C74315C716A5C66305C667332325C7061720D0A50656C6F2070726573656E746520696E737472756D656E746F20706172746963756C617220646520636F6E666973735C2765336F20646520645C276564766964612C206669677572616E646F20646520756D206C61646F2E5C7061720D0A5C625C6673323420435245444F523A20432E20646153696C766120436F6C63686F61726961204D655C62305C66733232202C2063756A6F206E6F6D652066616E7461736961205C276539205C625C695C667332342042494F5445524150595C62305C69305C66733232202C706573736F61206A75725C27656464696361206465206469726569746F207072697661646F2C20696E736372697461206E6F20434E504A20736F62206E5C2762612E2031382E3436392E3735382F303030312D33392C20636F6D20736564652061204156204D616A6F72204162656C6172646F204A6F735C276539206461204372757A2C20313235343120636F6E746F726E6F206E6F7274652C206D6172696E616C20622C20204365703A2038373038332D3532312C206E6120636964616465206465204D6172696E675C2765312D50522E5C7061720D0A5C625C695C667332342044455645444F523A5C663120205C636631205B6461646F73636F6E747261746F2E2272617A616F225D205C6366305C62305C69305C66305C6673323220656D7072657361206465206469726569746F207072697661646F20726567756C61726D656E746520696E736372697461206E6F20434E504A204E5C2762612C205C6366315C6632205B6461646F73636F6E747261746F2E22637066225D205C6366305C66302073656469616461205C276530205275612C205C6366315C6631205B6461646F73636F6E747261746F2E22656E64657265636F225D2C206E5C276261205B6461646F73636F6E747261746F2E226E756D65726F225D2C2062616972726F205B6461646F73636F6E747261746F2E226465736362616972726F225D2C20436570205B6461646F73636F6E747261746F2E22636570225D2C204369646164655C7E5B6461646F73636F6E747261746F2E2264657363636964616465225D2C205B6461646F73636F6E747261746F2E227566225D205C6366305C6630202C206E657373652061746F20726570726573656E746164612070656C612073756120735C2766336369612061205372612E4A756379656C6C6520526F64726967756573206465204C69726120726567756C61726D656E746520696E736372697461206E6F20436E706A2032322E3039322E3431382F303030312D3039207265736964656E746520656D2041762E20446F6E6120536F6668696152617367756C61656666202C2032363635206E6120636964616465206465204D6172696E675C2765312F50522C2073656E646F20746F646F73206F732070726573656E74657320636170617A65732C2074656D20656E747265207369206A7573746F206520636F6E7472617461646F206F207175652073656775652C2063756A617320636C5C2765317573756C617320726570726573656E74616D206D616E6966657374615C2765375C2765336F20657870726573736120646120766F6E746164652064617320706172746573206520636F6E64695C2765375C2765336F20657373656E6369616C20646520656669635C27653163696120646F206176656E5C27653761646F2C20636F6E7374697475696E646F2D736520656D2061746F206A75725C2765646469636F20706572666569746F2C206E6F73207465726D6F7320646F2061727469676F20355C2762302C20696E6369736F5C625C695C66733234205858585649205C62305C69305C6673323220646120436F6E7374697475695C2765375C2765336F204665646572616C2C20636F6D62696E616E646F20636F6D206F73205C625C695C667332342061727469676F7320313439372C20313439382065203134393920646F20435C2766336469676F20436976696C2042726173696C6569726F20656D207669675C2765616E6369612E5C7061720D0A434C5C2763315553554C41205052494D45495241202D20444120434F4E464953535C2763334F5C7061720D0A5C62305C69305C66733232205061726120746F646F73206F732066696E73206465206469726569746F2C206F2044455645444F52206465636C6172612C207265636F6E68656365206520636F6E6665737361207365722064657665646F7220726573706F6E735C27653176656C20656D2072656C615C2765375C2765336F20616F20435245444F52206E61207175616E746961206465205224205C6366315C663120205B6461646F73636F6E747261746F2E22736F6D61225D205C6366305C663020285C6633205B5F746F74616C5D295C6630202C206F7269756E6461206461206171756973695C2765375C2765336F3A5C6366315C66325C667331365C7061720D0A7D0D0A00"/>
    </TfrxMasterData>
    <TfrxHeader Name="Header2" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="22,67718" Left="0" Top="646,29963" Width="718,1107">
      <TfrxMemoView Name="Memo18" Left="3,77953" Top="1" Width="302,3624" Height="15,11812" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="Produto"/>
      <TfrxMemoView Name="Memo19" Left="309,92146" Top="1" Width="94,48825" Height="15,11812" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haRight" ParentFont="False" Text="Valor"/>
      <TfrxMemoView Name="Memo20" Left="411,96877" Top="1" Width="94,48825" Height="15,11812" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haRight" ParentFont="False" Text="Desconto"/>
      <TfrxMemoView Name="Memo21" Left="514,01608" Top="1" Width="94,48825" Height="15,11812" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haRight" ParentFont="False" Text="Valor líquido"/>
      <TfrxLineView Name="Line2" Left="1,77953" Top="17,89765" Width="608,50433" Height="0" Color="0" Frame.Typ="4"/>
    </TfrxHeader>
    <TfrxDetailData Name="DetailData2" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="22,67718" Left="0" Top="691,65399" Width="718,1107" ColumnWidth="0" ColumnGap="0" DataSet="dadositens" DataSetName="dadositens" RowCount="0">
      <TfrxMemoView Name="Memo22" Left="3,77953" Top="0" Width="302,36215591" Height="15,11812" DataField="nomeproduto" DataSet="dadositens" DataSetName="dadositens" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="[dadositens.&#34;nomeproduto&#34;]"/>
      <TfrxMemoView Name="Memo23" Left="309,92146" Top="0" Width="94,48825" Height="15,11812" DataField="valor" DataSet="dadositens" DataSetName="dadositens" DisplayFormat.FormatStr="%2.2n" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haRight" ParentFont="False" Text="[dadositens.&#34;valor&#34;]"/>
      <TfrxMemoView Name="Memo24" Left="411,96877" Top="0" Width="94,48825" Height="15,11812" DataField="desconto" DataSet="dadositens" DataSetName="dadositens" DisplayFormat.FormatStr="%2.2n" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haRight" ParentFont="False" Text="[dadositens.&#34;desconto&#34;]"/>
      <TfrxMemoView Name="Memo25" Left="514,01608" Top="0" Width="94,48825" Height="15,11812" DataField="total" DataSet="dadositens" DataSetName="dadositens" DisplayFormat.FormatStr="%2.2n" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haRight" ParentFont="False" Text="[dadositens.&#34;total&#34;]"/>
    </TfrxDetailData>
  </TfrxReportPage>
</TfrxReport>
