﻿<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="07/27/2022 16:53:55" ReportInfo.Modified="06/19/2023 10:16:10" ReportInfo.CreatorVersion="2021.4.3.0">
  <ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing;
using System.Data;
using FastReport;
using FastReport.Data;
using FastReport.Dialog;
using FastReport.Barcode;
using FastReport.Table;
using FastReport.Utils;

namespace FastReport
{
  
  public class ReportScript
  {
   
    public Double diffdat99 (DateTime  d1,DateTime  d2)
    {
      Double tem = (d1 - d2).TotalDays;
      //DateTime result = d1.Subtract(d2);
      return tem;
    }

  }
}
/*void Page1OnBeforePrint(TfrxComponent Sender)
{
  if(&lt;ShowProfit&gt;==&quot;1&quot;)          
           { Memo31.Visible=True;
             Memo32.Visible=True;
             Memo33.Visible=True;                 
           }                              
  
}
    

{

}
*/</ScriptText>
  <Dictionary>
    <MsSqlDataConnection Name="ADODatabase" ConnectionString="rijcmlqJUrEa/KIcQqhhcfnlqC6PHTn0L44W7TQfS6RmUJOGDIuc+knUePlrDTYQkz8WhBiaZpTEEWyUzaPuDP87XMIQMkFbwRDRqWcnOq05AHvy/3ciW7Aj4vKJx2xbvEamJYpY4S2ERmRvbANQbrAywWlloUqxbVuYJV9jZt8uEZY11kHXAvFLccnAbNsSBoKJMPUKGD+5qxgd/3RmGNgDkiRKTpyUoHIz9hleqSasEU5P/FpmEywyc79ElHV6JPmg0iqJNJlbxLNNtomz01DLmksgD71eGQwwl4Bz2QfeVElqEgAKMSDCPEyVQ5M7Y7/PoLGOS/s0jKpmwGaRMOX10IfnXqKmcQ5FjqHXqYD9eH/VFA+7mti6zwOpgJnq1N8B2jRP9IMpAPQFy1qL/pvqyl8xT+fxl0V44yaSC9BBUMufEgQeitxQd7gqNcASWo+O9O54DTOVb47BWeS7nIkxIsRx0jyFIOuaraEk4xcmCFvYYFJ6lzgzD8FqGNZhM8yejljXL5zk5SVwJJlHjv6ARZHqSuRIlig6Q59LmnTvOq2S1S5gDUYuT2HILS2rDR/lw5/PFBsKuCPgyxYQu8tac4rhQ2pjGmObKKAEIh6xpOlVesy0LQqsIcHNux4A9yU2UG2JztxwuznoJLDShEPmyVmxA==">
      <TableDataSource Name="CollectedBill_Report" DataType="System.Int32" Enabled="true" TableName="CollectedBill_Report" SelectCommand="exec mnrPrcRepCollectedBill  '{00000000-0000-0000-0000-000000000000}' , '{00000000-0000-0000-0000-000000000000}' , '{00000000-0000-0000-0000-000000000000}' , '{00000000-0000-0000-0000-000000000000}' , '{8A92A8EC-B244-4911-B346-90BBAD0317E3}' , '{8DD84EF1-89BA-4673-8A9F-44DC7375BCDD}' , '1-1-2023' , '6-19-2023' , '' , '' , 1 , 1 , 0 , 1.00, '{00000000-0000-0000-0000-000000000000}' , 1, 0">
        <Column Name="AccID" DataType="System.Guid"/>
        <Column Name="AccCode" DataType="System.String"/>
        <Column Name="AccName" DataType="System.String"/>
        <Column Name="AccLaName" DataType="System.String"/>
        <Column Name="CustID" DataType="System.Guid"/>
        <Column Name="CustName" DataType="System.String"/>
        <Column Name="CustLaName" DataType="System.String"/>
        <Column Name="BillID" DataType="System.Guid"/>
        <Column Name="BillTypeID" DataType="System.Guid"/>
        <Column Name="BillNumber" DataType="System.Int32"/>
        <Column Name="BillDate" DataType="System.DateTime"/>
        <Column Name="DueDate" DataType="System.DateTime"/>
        <Column Name="CollectDate" DataType="System.DateTime"/>
        <Column Name="InOut" DataType="System.Int32"/>
        <Column Name="Total" DataType="System.Double"/>
        <Column Name="Paided" DataType="System.Double"/>
        <Column Name="TermType" DataType="System.Double"/>
        <Column Name="TermCnt" DataType="System.Int32"/>
        <Column Name="NumTmp" DataType="System.Int32"/>
        <Column Name="Type" DataType="System.Int32"/>
        <Column Name="Profit" DataType="System.Double"/>
        <Column Name="CollectEnNumber" DataType="System.Int32"/>
        <Column Name="CollectPayType" DataType="System.Guid"/>
        <Column Name="CollectPayTypeName" DataType="System.String"/>
        <Column Name="payType" DataType="System.Int32"/>
        <Column Name="SmID" DataType="System.Guid"/>
        <Column Name="SmCode" DataType="System.String"/>
        <Column Name="SmName" DataType="System.String"/>
        <Column Name="SmLaName" DataType="System.String"/>
        <Column Name="btName" DataType="System.String"/>
        <Column Name="btLaName" DataType="System.String"/>
      </TableDataSource>
    </MsSqlDataConnection>
    <Parameter Name="CurUserID" DataType="System.String" Expression="&quot;{6CCA4800-C4E7-4c35-A2D8-FC4F74F6199B}&quot;"/>
    <Parameter Name="Currency" DataType="System.String" Expression="&quot;ليرة سورية&quot;"/>
    <Parameter Name="FromDate" DataType="System.String" Expression="&quot;1/1/2023&quot;"/>
    <Parameter Name="ToDate" DataType="System.String" Expression="&quot;19/6/2023&quot;"/>
    <Parameter Name="ShowProfit" DataType="System.String" Expression="&quot;0&quot;"/>
    <Total Name="Billdate+Collectdate" Expression="diffdat99([CollectedBill_Report.BillDate] ,  [CollectedBill_Report.CollectDate])" Evaluator="MasterData1" PrintOn="ReportSummary1"/>
    <Total Name="Total" Expression="IIf([CollectedBill_Report.InOut]==1,-[CollectedBill_Report.Total],[CollectedBill_Report.Total])" Evaluator="MasterData1" PrintOn="ReportSummary1"/>
    <Total Name="Paided" Expression="IIf([CollectedBill_Report.InOut]==-1,[CollectedBill_Report.Paided],Abs([CollectedBill_Report.Paided]))" Evaluator="MasterData1" PrintOn="ReportSummary1"/>
    <Total Name="Total-Paided" Expression="IIf([CollectedBill_Report.InOut]==1,-[CollectedBill_Report.Total]+Abs([CollectedBill_Report.Paided]),[CollectedBill_Report.Total]-Abs([CollectedBill_Report.Paided]))" Evaluator="MasterData1" PrintOn="ReportSummary1"/>
    <Total Name="Profit" Expression="[CollectedBill_Report.Profit]" Evaluator="MasterData1"/>
  </Dictionary>
  <ReportPage Name="Page1" Landscape="true" PaperWidth="297" PaperHeight="210" Watermark.Font="Arial, 60pt">
    <ReportTitleBand Name="ReportTitle1" Width="1047.06" Height="154.96">
      <TextObject Name="Memo19" Left="3.78" Top="89.48" Width="1039.37" Height="26.46" Text="الفواتير المحصلة" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 16pt, style=Bold"/>
      <TextObject Name="Memo24" Left="960.62" Top="110.94" Width="52.91" Height="18.9" Text=":إعتباراً من" Padding="2, 1, 2, 1" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo25" Left="810.31" Top="110.94" Width="56.7" Height="18.9" Text=":ولغاية" Padding="2, 1, 2, 1" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo26" Left="8.44" Top="110.94" Width="162.52" Height="18.9" Text=" [Currency] " Padding="2, 1, 2, 1" HorzAlign="Right" Font="Times New Roman, 10pt"/>
      <TextObject Name="Memo27" Left="879.69" Top="110.94" Width="75.59" Height="18.9" Text="[FromDate]" Padding="2, 1, 2, 1" HorzAlign="Right" Font="Times New Roman, 10pt"/>
      <TextObject Name="Memo28" Left="687.48" Top="110.94" Width="105.83" Height="18.9" Text="[ToDate]" Padding="2, 1, 2, 1" HorzAlign="Right" Font="Times New Roman, 10pt"/>
      <TextObject Name="Memo2" Left="177.3" Top="110.94" Width="41.57" Height="18.9" Text=": العملة" Padding="2, 1, 2, 1" HorzAlign="Right" VertAlign="Center" Font="Times New Roman, 10pt"/>
      <PictureObject Name="Company_Logo" Left="-22.68" Top="9.67" Width="1016.69" Height="75.59" Fill.Color="White" ImageLocation="C:\Program Files (x86)\Almanara Business Solutions\Bin\Res\Logo.bmp" SizeMode="CenterImage" ImageFormat="Bmp"/>
    </ReportTitleBand>
    <PageHeaderBand Name="PageHeader1" Top="158.96" Width="1047.06" Height="26.46">
      <TextObject Name="Memo9" Left="988.12" Width="41.57" Height="26.46" Border.Lines="All" Fill.Color="186, 211, 254" Text="الرقم" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo10" Left="841.06" Width="147.4" Height="26.46" Border.Lines="All" Fill.Color="186, 211, 254" Text="اسم الزبون" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo11" Left="735.23" Width="105.83" Height="26.46" Border.Lines="All" Fill.Color="186, 211, 254" Text="الفاتورة" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo12" Left="636.96" Width="98.27" Height="26.46" Border.Lines="All" Fill.Color="186, 211, 254" Text="تاريخ الفاتورة" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo13" Left="523.58" Width="113.39" Height="26.46" Border.Lines="All" Fill.Color="186, 211, 254" Text="تاريخ الإستحقاق" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo14" Left="433.25" Width="90.71" Height="26.46" Border.Lines="All" Fill.Color="186, 211, 254" Text="تاريخ التحصيل" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo15" Left="350.88" Width="83.15" Height="26.46" Border.Lines="All" Fill.Color="186, 211, 254" Text="عمر الدين" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo16" Left="267.73" Width="83.15" Height="26.46" Border.Lines="All" Fill.Color="186, 211, 254" Text="الإجمالي" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo17" Left="184.58" Width="83.15" Height="26.46" Border.Lines="All" Fill.Color="186, 211, 254" Text="المسدّدة" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo18" Left="101.43" Width="83.15" Height="26.46" Border.Lines="All" Fill.Color="186, 211, 254" Text="المتبقي" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo32" Left="18.12" Width="83.15" Height="26.46" Visible="false" Border.Lines="All" Fill.Color="186, 211, 254" Text="الأرباح" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
    </PageHeaderBand>
    <DataBand Name="MasterData1" Top="189.42" Width="1047.06" Height="26.46" CanGrow="true" CanShrink="true" DataSource="CollectedBill_Report">
      <TextObject Name="Memo20" Left="988.46" Width="41.57" Height="26.46" Border.Lines="All" Fill.Color="White" GrowToBottom="true" Text="[Row#]" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 8pt"/>
      <TextObject Name="Memo21" Left="841.06" Width="147.4" Height="26.46" Border.Lines="All" Fill.Color="White" GrowToBottom="true" Text="[CollectedBill_Report.CustName]" Padding="2, 1, 2, 1" HorzAlign="Right" VertAlign="Center" Font="Times New Roman, 8pt"/>
      <TextObject Name="Memo22" Left="735.23" Width="105.83" Height="26.46" Border.Lines="All" Fill.Color="White" GrowToBottom="true" Text="[CollectedBill_Report.btName] - [CollectedBill_Report.BillNumber]" Padding="2, 1, 2, 1" HorzAlign="Right" VertAlign="Center" Font="Times New Roman, 8pt">
        <Formats>
          <GeneralFormat/>
          <GeneralFormat/>
        </Formats>
      </TextObject>
      <TextObject Name="Memo23" Left="636.96" Width="98.27" Height="26.46" Border.Lines="All" Fill.Color="White" GrowToBottom="true" Text="[CollectedBill_Report.BillDate]" Padding="2, 1, 2, 1" Format="Date" Format.Format="d" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 8pt"/>
      <TextObject Name="Memo4" Left="523.58" Width="113.39" Height="26.46" Border.Lines="All" Fill.Color="White" GrowToBottom="true" Text="[IIf([CollectedBill_Report.DueDate]==ToDateTime(&quot;1/1/1980&quot;),&quot;&quot;,[CollectedBill_Report.DueDate])]" Padding="2, 1, 2, 1" Format="Date" Format.Format="d" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 8pt"/>
      <TextObject Name="Memo5" Left="433.25" Width="90.71" Height="26.46" Border.Lines="All" Fill.Color="White" GrowToBottom="true" Text="[IIf([CollectedBill_Report.CollectDate]==ToDateTime(&quot;1/1/1980&quot;),&quot;&quot;,[CollectedBill_Report.CollectDate])]" Padding="2, 1, 2, 1" Format="Date" Format.Format="d" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 8pt"/>
      <TextObject Name="Memo6" Left="350.88" Width="83.15" Height="26.46" Border.Lines="All" Fill.Color="White" GrowToBottom="true" Text="[diffdat99([CollectedBill_Report.BillDate] ,  [CollectedBill_Report.CollectDate])] يوم " Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" RightToLeft="true" Font="Times New Roman, 8pt"/>
      <TextObject Name="Memo7" Left="267.73" Width="83.15" Height="26.46" Border.Lines="All" Fill.Color="White" GrowToBottom="true" Text="[IIf([CollectedBill_Report.InOut]==1,-[CollectedBill_Report.Total],[CollectedBill_Report.Total])]" Padding="2, 1, 2, 1" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 8pt"/>
      <TextObject Name="Memo8" Left="184.58" Width="83.15" Height="26.46" Border.Lines="All" Fill.Color="White" GrowToBottom="true" Text="[IIf([CollectedBill_Report.InOut]==-1,[CollectedBill_Report.Paided],Abs([CollectedBill_Report.Paided]))]" Padding="2, 1, 2, 1" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 8pt"/>
      <TextObject Name="Memo29" Left="101.43" Width="83.15" Height="26.46" Border.Lines="All" Fill.Color="White" GrowToBottom="true" Text="[IIf([CollectedBill_Report.InOut]==1,-[CollectedBill_Report.Total]+Abs([CollectedBill_Report.Paided]),[CollectedBill_Report.Total]-Abs([CollectedBill_Report.Paided]))]" Padding="2, 1, 2, 1" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 8pt"/>
      <TextObject Name="Memo31" Left="18.12" Width="83.15" Height="26.46" Visible="false" Border.Lines="All" Fill.Color="White" GrowToBottom="true" Text="[CollectedBill_Report.Profit]" Padding="2, 1, 2, 1" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 8pt"/>
    </DataBand>
    <ReportSummaryBand Name="ReportSummary1" Top="219.88" Width="1047.06" Height="26.46">
      <TextObject Name="Memo30" Left="433.25" Width="597.17" Height="26.46" Border.Lines="All" Fill.Color="186, 211, 254" Text="الإجمالي" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo36" Left="350.88" Width="83.15" Height="26.46" Border.Lines="All" Fill.Color="186, 211, 254" Text="[Billdate+Collectdate]" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 8pt, style=Bold"/>
      <TextObject Name="Memo37" Left="267.73" Width="83.15" Height="26.46" Border.Lines="All" Fill.Color="186, 211, 254" Text="[Total]" Padding="2, 1, 2, 1" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 8pt, style=Bold"/>
      <TextObject Name="Memo38" Left="184.58" Width="83.15" Height="26.46" Border.Lines="All" Fill.Color="186, 211, 254" Text="[Paided]" Padding="2, 1, 2, 1" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 8pt, style=Bold"/>
      <TextObject Name="Memo39" Left="101.43" Width="83.15" Height="26.46" Border.Lines="All" Fill.Color="186, 211, 254" Text="[Total-Paided]" Padding="2, 1, 2, 1" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 8pt, style=Bold"/>
      <TextObject Name="Memo33" Left="18.12" Width="83.15" Height="26.46" Visible="false" Border.Lines="Left, Top, Bottom" Fill.Color="186, 211, 254" Text="[Profit]" Padding="2, 1, 2, 1" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 8pt, style=Bold"/>
    </ReportSummaryBand>
    <PageFooterBand Name="PageFooter1" Top="250.34" Width="1047.06" Height="45.35">
      <TextObject Name="Memo1" Left="941.87" Width="75.59" Height="18.9" Text="[Page#]" Padding="2, 1, 2, 1" HorzAlign="Right" Font="Times New Roman, 8pt"/>
      <TextObject Name="Memo140" Left="70.59" Width="83.15" Height="15.12" Text="[Date]" Padding="2, 1, 2, 1" Format="Date" Format.Format="d" VertAlign="Center" Font="Times New Roman, 8pt, style=Bold"/>
      <TextObject Name="Memo141" Left="11.34" Width="56.69" Height="15.12" Text="Printed on:" Padding="2, 1, 2, 1" AutoWidth="true" VertAlign="Center" Font="Times New Roman, 8pt"/>
      <TextObject Name="Memo142" Left="160.08" Width="30.24" Height="15.12" Text="Time:" Padding="2, 1, 2, 1" AutoWidth="true" VertAlign="Center" Font="Times New Roman, 8pt"/>
      <TextObject Name="Memo143" Left="193.09" Width="56.69" Height="15.12" Text="[Date]" Padding="2, 1, 2, 1" Format="Time" Format.Format="t" VertAlign="Center" Font="Times New Roman, 8pt, style=Bold"/>
      <TextObject Name="Memo3" Left="885.17" Top="27.24" Width="154.96" Height="11.34" Text="www.almanarasoft.com" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold" TextFill.Color="Blue"/>
    </PageFooterBand>
  </ReportPage>
</Report>
