<?xml version="1.0" encoding="utf-8" standalone="no"?>
<TfrxReport Version="6.5.8" DotMatrixReport="False" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Varsayılan" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="42822,7069257292" ReportOptions.Description.Text="" ReportOptions.LastChange="43985,8992204514" ScriptLanguage="PascalScript" ScriptText.Text="begin&#13;&#10;&#13;&#10;end.">
  <Datasets>
    <item DataSet="faaliyet" DataSetName="Faaliyet"/>
  </Datasets>
  <Variables>
    <item Name="DEPO" Value="-1"/>
    <item Name="KASA" Value="-1"/>
    <item Name="PERSONEL" Value="-1"/>
    <item Name="BANKA" Value="-1"/>
  </Variables>
  <TfrxDataPage Name="Data" Height="1000" Left="0" Top="0" Width="1000">
    <TfrxFDQuery Name="faaliyet" UserName="Faaliyet" CloseDataSource="True" FieldAliases.Text="" BCDToCurrency="False" IgnoreDupParams="False" SQL.Text="Set DateFormat DMY &#13;&#10;Declare @Tarih DateTime, @Depo Int, @Personel Int, @Kasa Int&#13;&#10;Declare @Rapor Table(&#13;&#10;   DEPO VARCHAR(64), PERSONEL VARCHAR(64), KASA VARCHAR(64),&#13;&#10;   PESINSATIS DECIMAL(18, 4), CARISATIS DECIMAL(18, 4), IADE DECIMAL(18, 4),     &#13;&#10;   NAKIT DECIMAL(18, 4), VISA DECIMAL(18, 4), KAR DECIMAL(18, 4), HARCAMA DECIMAL(18, 4)) &#13;&#10;&#13;&#10;Set @Depo = :DEPO           &#13;&#10;Set @Personel = :PERSONEL                   &#13;&#10;Set @Kasa = :KASA           &#13;&#10;&#13;&#10;Set @Tarih = GETDATE()                &#13;&#10; &#13;&#10;INSERT INTO @Rapor SELECT &#13;&#10;  (SELECT ACIKLAMA FROM TBLDEPOLAR WHERE KARTNO = @Depo),&#13;&#10;  (SELECT AD + ' ' + SOYAD FROM TBLPERSONEL WHERE KARTNO = @Personel),&#13;&#10;  (SELECT ACIKLAMA FROM TBLKASALAR WHERE ID = @Kasa),&#13;&#10;  0, 0, 0, 0, 0, 0, 0&#13;&#10; &#13;&#10;UPDATE @Rapor Set IADE = (Select SUM(TUTARI) from TBLSATFATIADEBASLIK B WHERE ISNULL(DELETED, 0) = 0 AND CARIID &#60; 1 AND DEPOID = @Depo AND PERSONELID = @Personel AND CONVERT(VARCHAR, TARIH, 104) = CONVERT(VARCHAR, @Tarih, 104)) &#13;&#10;UPDATE @Rapor Set CARISATIS = (Select SUM(TUTARI) from TBLSATFATBASLIK B WHERE ISNULL(DELETED, 0) = 0 AND CARIID &#62; 0 AND DEPOID = @Depo AND PERSONELID = @Personel AND CONVERT(VARCHAR, TARIH, 104) = CONVERT(VARCHAR, @Tarih, 104))&#13;&#10;UPDATE @Rapor Set PESINSATIS = (Select SUM(TUTARI) from TBLSATFATBASLIK B WHERE ISNULL(DELETED, 0) = 0 AND CARIID &#60; 1 AND DEPOID = @Depo AND PERSONELID = @Personel AND CONVERT(VARCHAR, TARIH, 104) = CONVERT(VARCHAR, @Tarih, 104))    &#13;&#10;UPDATE @Rapor Set KAR = (SELECT SUM(KAR) FROM(Select  MIKTARI * (FIYATI - CASE WHEN ISNULL(H.MALIYET, 0) = 0 THEN  &#13;&#10;     ISNULL((SELECT TOP 1 FIYATI FROM TBLALFATHAREKET AFH LEFT OUTER JOIN TBLALFATBASLIK AFB WITH(INDEX=TBLALFATBASLIK_KARTNO) ON AFB.KARTNO = AFH.FATURAID &#13;&#10;	    WHERE ISNULL(AFB.DELETED, 0) = 0 AND AFH.STOKID = H.STOKID ORDER BY AFB.TARIH DESC), 0) &#13;&#10;  ELSE H.MALIYET END) AS KAR &#13;&#10;from TBLSATFATHAREKET H &#13;&#10;LEFT OUTER JOIN TBLSATFATBASLIK B WITH(INDEX=TBLSATFATBASLIK_KARTNO) ON B.KARTNO = H.FATURAID &#13;&#10;LEFT OUTER JOIN TBLSTOKLAR S  WITH(INDEX=TBLSTOKLAR_KARTNO) ON S.KARTNO = H.STOKID &#13;&#10;WHERE ISNULL(B.DELETED, 0) = 0 AND B.DEPOID = @Depo AND PERSONELID = @Personel AND CONVERT(VARCHAR, TARIH, 104) = CONVERT(VARCHAR, @Tarih, 104) &#13;&#10;) AS A) &#13;&#10; &#13;&#10;UPDATE @Rapor Set PESINSATIS = ISNULL(PESINSATIS, 0) + ISNULL((Select SUM(TUTARI) from TBLSATIRSBASLIK B WHERE ISNULL(B.DELETED, 0) = 0 AND  CARIID &#60; 1 AND DEPOID = @Depo AND PERSONELID = @Personel AND CONVERT(VARCHAR, TARIH, 104) = CONVERT(VARCHAR, @Tarih, 104)), 0)&#13;&#10;UPDATE @Rapor Set CARISATIS = ISNULL(CARISATIS, 0) + ISNULL((Select SUM(TUTARI) from TBLSATIRSBASLIK B WHERE ISNULL(B.DELETED, 0) = 0 AND  CARIID &#62; 0 AND DEPOID = @Depo AND PERSONELID = @Personel AND CONVERT(VARCHAR, TARIH, 104) = CONVERT(VARCHAR, @Tarih, 104)), 0)&#13;&#10;UPDATE @Rapor Set KAR = ISNULL(KAR, 0) + ISNULL((SELECT SUM(KAR) FROM(Select  MIKTARI * (FIYATI - CASE WHEN ISNULL(H.MALIYET, 0) = 0 THEN  &#13;&#10;     ISNULL((SELECT TOP 1 FIYATI FROM TBLALFATHAREKET AFH LEFT OUTER JOIN TBLALFATBASLIK AFB WITH(INDEX=TBLALFATBASLIK_KARTNO) ON AFB.KARTNO = AFH.FATURAID &#13;&#10;	    WHERE ISNULL(AFB.DELETED, 0) = 0 AND AFH.STOKID = H.STOKID ORDER BY AFB.TARIH DESC), 0) &#13;&#10;  ELSE H.MALIYET END) AS KAR &#13;&#10;from TBLSATIRSHAREKET H &#13;&#10;LEFT OUTER JOIN TBLSATIRSBASLIK B WITH(INDEX=TBLSATIRSBASLIK_KARTNO) ON B.KARTNO = H.FATURAID &#13;&#10;LEFT OUTER JOIN TBLSTOKLAR S  WITH(INDEX=TBLSTOKLAR_KARTNO) ON S.KARTNO = H.STOKID &#13;&#10;WHERE  ISNULL(B.DELETED, 0) = 0 AND ISNULL(B.FATURALASTI, 0) = 0 AND B.DEPOID = @Depo AND PERSONELID = @Personel AND CONVERT(VARCHAR, TARIH, 104) = CONVERT(VARCHAR, @Tarih, 104) &#13;&#10;) AS A), 0) &#13;&#10; &#13;&#10;UPDATE @Rapor Set NAKIT = ISNULL((Select SUM(GIREN) from KASAHAREKET where KASA = @Kasa AND ISLEMTIPI = 1 AND EVRAKTIPI = 0 AND CONVERT(VARCHAR, TARIH, 104) = CONVERT(VARCHAR, @Tarih, 104)), 0)&#13;&#10;UPDATE @Rapor Set VISA = ISNULL((Select SUM(GIREN) from KASAHAREKET where KASA = @Kasa AND ISLEMTIPI = 1 AND EVRAKTIPI = 3 AND CONVERT(VARCHAR, TARIH, 104) = CONVERT(VARCHAR, @Tarih, 104)), 0)&#13;&#10;UPDATE @Rapor Set HARCAMA = ISNULL((Select SUM(CIKAN) from KASAHAREKET where KASA = @Kasa AND ISLEMTIPI = 15 AND EVRAKTIPI = 0 AND CONVERT(VARCHAR, TARIH, 104) = CONVERT(VARCHAR, @Tarih, 104)), 0)&#13;&#10; &#13;&#10;Select * from @Rapor      " MacroCreate="True" MacroExpand="True" ReadOnly="False" Left="108" Top="60">
      <Parameters>
        <item Name="DEPO" DataType="ftInteger" Expression="&#60;DEPO&#62;"/>
        <item Name="PERSONEL" DataType="ftInteger" Expression="&#60;PERSONEL&#62;"/>
        <item Name="KASA" DataType="ftInteger" Expression="&#60;KASA&#62;"/>
      </Parameters>
    </TfrxFDQuery>
  </TfrxDataPage>
  <TfrxReportPage Name="Page1" PaperWidth="80" PaperHeight="297" PaperSize="256" LeftMargin="0" RightMargin="0" TopMargin="0" BottomMargin="0" ColumnWidth="0" ColumnPositions.Text="" Frame.Typ="0" MirrorMode="0" HGuides.Text="" VGuides.Text="">
    <TfrxPageHeader Name="PageHeader1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="109,60637" Left="0" Top="18,89765" Width="302,3624">
      <TfrxMemoView Name="Memo1" AllowVectorExport="True" Left="15,11812" Top="22,67718" Width="219,21274" Height="30,23624" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="1" Frame.Typ="0" HAlign="haCenter" ParentFont="False" Text="PARADOKS Faaliyet Raporu"/>
      <TfrxMemoView Name="Memo2" AllowVectorExport="True" Left="-15,11812" Top="68,03154" Width="230,55133" Height="18,89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="[Date]"/>
      <TfrxLineView Name="Line1" AllowVectorExport="True" Left="7,55906" Top="94,48825" Width="306,14193" Height="0" Color="0" Frame.Typ="4"/>
    </TfrxPageHeader>
    <TfrxMasterData Name="MasterData1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="427,08689" Left="0" Top="188,9765" Width="302,3624" ColumnWidth="0" ColumnGap="0" DataSet="faaliyet" DataSetName="Faaliyet" RowCount="0">
      <TfrxMemoView Name="FaaliyetPERSONEL" AllowVectorExport="True" Left="122,72449" Top="22,67718" Width="177,63791" Height="18,89765" DataField="PERSONEL" DataSet="faaliyet" DataSetName="Faaliyet" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" ParentFont="False" Text="[Faaliyet.&#34;PERSONEL&#34;]"/>
      <TfrxMemoView Name="FaaliyetDEPO" AllowVectorExport="True" Left="122,72449" Top="49,13386071" Width="173,85838" Height="18,89765" DataField="DEPO" DataSet="faaliyet" DataSetName="Faaliyet" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" ParentFont="False" Text="[Faaliyet.&#34;DEPO&#34;]"/>
      <TfrxMemoView Name="FaaliyetKASA" AllowVectorExport="True" Left="122,72449" Top="75,59055362" Width="177,63791" Height="18,89765" DataField="KASA" DataSet="faaliyet" DataSetName="Faaliyet" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" ParentFont="False" Text="[Faaliyet.&#34;KASA&#34;]"/>
      <TfrxMemoView Name="Memo3" AllowVectorExport="True" Left="3,77953" Top="22,67718" Width="117,16543" Height="18,89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="Personel : "/>
      <TfrxMemoView Name="Memo4" AllowVectorExport="True" Left="3,77953" Top="75,59055362" Width="117,16543" Height="18,89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="Kasa : "/>
      <TfrxMemoView Name="Memo5" AllowVectorExport="True" Left="3,77953" Top="49,13386071" Width="117,16543" Height="26,45671" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="Depo : "/>
      <TfrxMemoView Name="Memo6" AllowVectorExport="True" Left="3,77953" Top="102,04724654" Width="117,16543" Height="18,89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="Peşin Satış : "/>
      <TfrxMemoView Name="Memo7" AllowVectorExport="True" Left="3,77953" Top="200,31499236" Width="117,16543" Height="18,89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="Nakit Tahsilat : "/>
      <TfrxMemoView Name="Memo8" AllowVectorExport="True" Left="3,77953" Top="128,50393945" Width="117,16543" Height="26,45671" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="Cariye Satış : "/>
      <TfrxMemoView Name="Memo9" AllowVectorExport="True" Left="3,77953" Top="226,7718" Width="117,16543" Height="18,89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="VİSA Tahsilat : "/>
      <TfrxMemoView Name="Memo11" AllowVectorExport="True" Left="3,77953" Top="351,49609961" Width="117,16543" Height="22,67718" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="Kasa Harcaması : "/>
      <TfrxMemoView Name="FaaliyetPESINSATIS" AllowVectorExport="True" Left="122,72449" Top="102,04724654" Width="120,94496" Height="18,89765" DataField="PESINSATIS" DataSet="faaliyet" DataSetName="Faaliyet" DisplayFormat.FormatStr="#,#0.#0" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="[Faaliyet.&#34;PESINSATIS&#34;]"/>
      <TfrxMemoView Name="FaaliyetCARISATIS" AllowVectorExport="True" Left="122,72449" Top="128,50393945" Width="120,94496" Height="18,89765" DataField="CARISATIS" DataSet="faaliyet" DataSetName="Faaliyet" DisplayFormat.FormatStr="#,#0.#0" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="[Faaliyet.&#34;CARISATIS&#34;]"/>
      <TfrxMemoView Name="FaaliyetNAKIT" AllowVectorExport="True" Left="122,72449" Top="200,31499236" Width="120,94496" Height="18,89765" DataField="NAKIT" DataSet="faaliyet" DataSetName="Faaliyet" DisplayFormat.FormatStr="#,#0.#0" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="[Faaliyet.&#34;NAKIT&#34;]"/>
      <TfrxMemoView Name="FaaliyetVISA" AllowVectorExport="True" Left="122,72449" Top="226,7718" Width="120,94496" Height="18,89765" DataField="VISA" DataSet="faaliyet" DataSetName="Faaliyet" DisplayFormat.FormatStr="#,#0.#0" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="[Faaliyet.&#34;VISA&#34;]"/>
      <TfrxMemoView Name="FaaliyetHARCAMA" AllowVectorExport="True" Left="122,72449" Top="351,49609961" Width="120,94496" Height="18,89765" DataField="HARCAMA" DataSet="faaliyet" DataSetName="Faaliyet" DisplayFormat.FormatStr="#,#0.#0" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="[Faaliyet.&#34;HARCAMA&#34;]"/>
      <TfrxMemoView Name="Memo10" AllowVectorExport="True" Left="3,77953" Top="298,58287" Width="117,16543" Height="26,45671" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="Toplam Satış : "/>
      <TfrxMemoView Name="Memo12" AllowVectorExport="True" Left="3,77953" Top="325,03940669" Width="117,16543" Height="18,89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="Toplam Tahsilat : "/>
      <TfrxMemoView Name="Memo13" AllowVectorExport="True" Left="122,72449" Top="325,03958" Width="120,94496" Height="18,89765" DisplayFormat.FormatStr="#,#0.#0" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="[&#60;Faaliyet.&#34;NAKIT&#34;&#62; + &#60;Faaliyet.&#34;VISA&#34;&#62;]"/>
      <TfrxMemoView Name="Memo14" AllowVectorExport="True" Left="122,72449" Top="298,58287" Width="120,94496" Height="18,89765" DisplayFormat.FormatStr="#,#0.#0" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="[&#60;Faaliyet.&#34;PESINSATIS&#34;&#62; + &#60;Faaliyet.&#34;CARISATIS&#34;&#62;]"/>
      <TfrxMemoView Name="Memo17" AllowVectorExport="True" Left="3,77953" Top="158,74026" Width="117,16543" Height="26,45671" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="İade : "/>
      <TfrxMemoView Name="Memo18" AllowVectorExport="True" Left="122,72449" Top="158,74026" Width="120,94496" Height="18,89765" DataSet="faaliyet" DataSetName="Faaliyet" DisplayFormat.FormatStr="#,#0.#0" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="[Faaliyet.&#34;IADE&#34;]"/>
      <TfrxMemoView Name="Memo19" AllowVectorExport="True" Left="3,77953" Top="272,12616" Width="117,16543" Height="26,45671" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="Toplam İade : "/>
      <TfrxMemoView Name="Memo20" AllowVectorExport="True" Left="122,72449" Top="272,12616" Width="120,94496" Height="18,89765" DataSet="faaliyet" DataSetName="Faaliyet" DisplayFormat.FormatStr="#,#0.#0" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="-16777208" Font.Height="-16" Font.Name="Tahoma" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="[Faaliyet.&#34;IADE&#34;]"/>
    </TfrxMasterData>
    <TfrxPageFooter Name="PageFooter1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="86,92919" Left="0" Top="676,53587" Width="302,3624">
      <TfrxLineView Name="Line3" AllowVectorExport="True" Left="7,55906" Top="11,33859" Width="699,21305" Height="0" Color="0" Frame.Typ="4"/>
      <TfrxMemoView Name="Memo15" AllowVectorExport="True" Left="3,77953" Top="15,11812" Width="245,66945" Height="45,35436" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" Frame.Typ="0" ParentFont="False" Text="[Date] Tarihinde PARADOKS (http://www.elibolyazilim.com) ile yazdırılmıştır."/>
      <TfrxMemoView Name="Memo16" AllowVectorExport="True" Left="11,33859" Top="64,25201" Width="170,07885" Height="18,89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" Frame.Typ="0" HAlign="haRight" ParentFont="False" Text="Sayfa : [Page] / [TotalPages#]">
        <Formats>
          <item/>
          <item/>
        </Formats>
      </TfrxMemoView>
    </TfrxPageFooter>
  </TfrxReportPage>
</TfrxReport>
