﻿<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/31/2022 10:54:26" ReportInfo.Modified="02/14/2023 15:15: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
  {
  }
}
/*
{

}
*/</ScriptText>
  <Dictionary>
    <MsSqlDataConnection Name="ADODatabase" ConnectionString="rijcmlqJUrEa/KIcQqhhcfnlqC6PHTn0L44W7TQfS6RmUJOGDIuc+knUePlrDTYQkz8WhBiLeyYgzGsg8K0w/wV+uVJpRb9DC+IFtFJ1Ya+wGL6sGP+LlGmWCsZftl80X1OZU2OLg7Xmxnkp41Wl7LrNJHJ83vvlYpsJ+6DtFdt82j1thRJJ4BPMOXXQ/VznxXbVK4wYXEfc/GT9jRWt/AYscmVrEJOp4AS6pfF/zabOfAeUxnPCFZuNTTYf/Anqida2Bnq4wWsjYQk+bW2BLfUXiq65uF50V779GQRASHenAhYUkWSzDbA55v76C9I5KXmHcVFOiKZ+crBw0xzYGCLy1zA+5u2EhK1ncHnju8fsDtQSCKHPF/gcZOsPDlVLbNE0mfQthSkUwe+rOWG2wRpE+KPod4Fcxq3gunpXyR6lKHmlhZCpEl+DhWx7PfMSbDazPY+COK+/qGCXHLZyacBrpvSmak7r6CzLPw4+h0pwFa+tzSii0Zv9DN8UEf7Wbq03UkBiyGMlaM3mpkAwbcbFlMcfoVkaKlOuSDBdv7Zmh9anZplloQRffHv2Tv2GkEp72wdqH/k4XVmDCpyw2JLs0oHt2xIq29iX3qXEUhQeNJBjOCsK4r0Uq7hFWmN6TQWZjgt0+zX40DLJ5z0RZ/Lx83BwA==">
      <TableDataSource Name="RepPosStatistics_Report" DataType="System.Int32" Enabled="true" TableName="RepPosStatistics_Report" SelectCommand="exec mnrRepPosStatistics '{00000000-0000-0000-0000-000000000000}' , '{00000000-0000-0000-0000-000000000000}' , '1-1-2022 08:00:00' , '2-14-2023 23:59:00' , '08:00:00' , '23:59:00' , '{452D9B5F-1CC9-4407-B937-7ACB53469411}'">
        <Column Name="StationID" DataType="System.Guid"/>
        <Column Name="StationName" DataType="System.String"/>
        <Column Name="BillCount" DataType="System.Int32"/>
        <Column Name="CashBillSum" DataType="System.Double"/>
        <Column Name="CreditBillSum" DataType="System.Double"/>
        <Column Name="MatCount" DataType="System.Int32"/>
        <Column Name="MatSum" DataType="System.Double"/>
        <Column Name="MostSellDay" DataType="System.String"/>
        <Column Name="MostCustArMov" DataType="System.String"/>
        <Column Name="MostCustLatinMov" DataType="System.String"/>
      </TableDataSource>
      <TableDataSource Name="Table" Alias="ADOQuery1" DataType="System.Int32" Enabled="true" SelectCommand="SELECT &#13;&#10;			gp.ID,&#13;&#10;			gp.Name,				&#13;&#10;	SUM( case  bt.binout when 1 then ( -((b.biBillQty * b.FixBiPrice)-(b.FixBiDisc)+(b.FixBiExtra)+ case bt.bttc when 1 then 0 else b.FixBiVAT end - ((b.FixBTotalDisc/case when b.FixBTotalItem = 0 then 1 else  b.FixBTotalItem end) * (b.biprice * b.biBillQty) ) + ((b.FixBTotalExtra/case when b.FixBTotalItem = 0 then 1 else b.FixBTotalItem end) * (b.fixbiprice*b.bibillqty))) ) &#13;&#10;								 when -1 then(  (b.biBillQty * b.FixBiPrice)-(b.FixBiDisc)+(b.FixBiExtra)+ case bt.bttc when 1 then 0 else b.FixBiVAT end - ((b.FixBTotalDisc/case when b.FixBTotalItem = 0 then 1 else  b.FixBTotalItem end) * (b.biprice * b.biBillQty) ) + ((b.FixBTotalExtra/case when b.FixBTotalItem = 0 then 1 else b.FixBTotalItem end) * (b.fixbiprice*b.bibillqty)))&#13;&#10;                  end )   AS VALUE,&#13;&#10;			SUM(b.biBillQty) AS sqty,                                    &#13;&#10;   18 as type                  &#13;&#10;		FROM&#13;&#10;			mnrPOSBill pb&#13;&#10;			inner join mnrFnBI_Fixed( @Curr ) b on   (pb.bill1ID  = b.bID   or pb.bill2ID  = b.bID  )&#13;&#10;			inner join mnrBillType bt on bt.ID = b.bBillTypeID    &#13;&#10;			INNER JOIN mnrMaterial mt		 ON mt.ID = b.biMatID&#13;&#10;			INNER JOIN mnrGrp gp			 ON gp.ID = mt.ParentID			&#13;&#10;		WHERE&#13;&#10;			 ( pb.Status='1') and ( pb.Date BETWEEN @FDate AND  @TDate    )&#13;&#10; and ( pb.StationID = @StationID OR @StationID1 = '{00000000-0000-0000-0000-000000000000}' )                            &#13;&#10;		GROUP BY&#13;&#10;			gp.ID,&#13;&#10;			gp.Name">
        <Column Name="ID" DataType="System.Guid"/>
        <Column Name="Name" DataType="System.String"/>
        <Column Name="VALUE" DataType="System.Double"/>
        <Column Name="sqty" DataType="System.Double"/>
        <Column Name="type" DataType="System.Int32"/>
        <CommandParameter Name="FDate" DataType="4" Expression="[FromDate]" DefaultValue="1/1/2022"/>
        <CommandParameter Name="TDate  " DataType="4" Expression="[ToDate]" DefaultValue="29/12/2022"/>
        <CommandParameter Name="StationID" DataType="14" Expression="[StationID]" DefaultValue="00000000-0000-0000-0000-000000000000"/>
        <CommandParameter Name="StationID1" DataType="14" Expression="[StationID]" DefaultValue="00000000-0000-0000-0000-000000000000"/>
        <CommandParameter Name="Curr" DataType="14" Expression="[CurrencyID]" DefaultValue="00000000-0000-0000-0000-000000000000"/>
      </TableDataSource>
      <TableDataSource Name="Table1" Alias="firlas" DataType="System.Int32" Enabled="true" SelectCommand="SET FMTONLY OFF;&#13;&#10;EXEC mnrPrcRestStatistic  @F , @T , @StationID ,  '{00000000-0000-0000-0000-000000000000}' , @CurrID , 1">
        <Column Name="ID" DataType="System.Guid"/>
        <Column Name="Name" DataType="System.String"/>
        <Column Name="Val" DataType="System.String"/>
        <Column Name="Type" DataType="System.Int32"/>
        <CommandParameter Name="F" DataType="4" Expression="[FromDate]" DefaultValue="1/1/2022"/>
        <CommandParameter Name="T" DataType="4" Expression="[ToDate]" DefaultValue="29/12/2022"/>
        <CommandParameter Name="StationID" DataType="14" Expression="[StationID]" DefaultValue="00000000-0000-0000-0000-000000000000"/>
        <CommandParameter Name="CurrID" DataType="14" Expression="[CurrencyID]" DefaultValue="00000000-0000-0000-0000-000000000000"/>
      </TableDataSource>
      <TableDataSource Name="Table2" Alias="currency" DataType="System.Int32" Enabled="true" SelectCommand="SELECT CurrencyVal as currVal FROM mnrCurrency WHERE ID = @CurrID">
        <Column Name="currVal" DataType="System.Double"/>
        <CommandParameter Name="CurrID" DataType="14" Expression="[CurrencyID]" DefaultValue=" 00000000-0000-0000-0000-000000000000"/>
      </TableDataSource>
    </MsSqlDataConnection>
    <Parameter Name="CurUserID" DataType="System.String" Expression="&quot;{452D9B5F-1CC9-4407-B937-7ACB53469411}&quot;"/>
    <Parameter Name="FromDate" DataType="System.String" Expression="&quot;01/01/2022 08:00:00&quot;"/>
    <Parameter Name="ToDate" DataType="System.String" Expression="&quot;14/02/2023 23:59:00&quot;"/>
    <Parameter Name="fTime" DataType="System.String" Expression="&quot;08:00:00&quot;"/>
    <Parameter Name="tTime" DataType="System.String" Expression="&quot;23:59:00&quot;"/>
    <Parameter Name="ShowNumOfBill" DataType="System.String" Expression="&quot;1&quot;"/>
    <Parameter Name="ShowAllBillCash" DataType="System.String" Expression="&quot;0&quot;"/>
    <Parameter Name="ShowAllBillCredit" DataType="System.String" Expression="&quot;0&quot;"/>
    <Parameter Name="ShowMatNum" DataType="System.String" Expression="&quot;0&quot;"/>
    <Parameter Name="ShowAllMat" DataType="System.String" Expression="&quot;0&quot;"/>
    <Parameter Name="ShowMostCustMov" DataType="System.String" Expression="&quot;0&quot;"/>
    <Parameter Name="CurrencyID" DataType="System.String" Expression="&quot;{5B1F9CA5-11FC-42cf-B5FF-70D8449C3EF4}&quot;"/>
    <Parameter Name="StationID" DataType="System.String" Expression="&quot;{00000000-0000-0000-0000-000000000000}&quot;"/>
    <Parameter Name="StationName" DataType="System.String" Expression="&quot;&quot;"/>
    <Parameter Name="CurrName" DataType="System.String" Expression="&quot;دولار أمريكي&quot;"/>
    <Total Name="Total_sqty" Expression="[ADOQuery1.sqty]" Evaluator="MasterData2"/>
    <Total Name="Total_Value" Expression="[ADOQuery1.VALUE]" Evaluator="MasterData2"/>
  </Dictionary>
  <ReportPage Name="Page1" PaperWidth="130" PaperHeight="300" LeftMargin="3" TopMargin="3" RightMargin="3" BottomMargin="3" Watermark.Font="Arial, 60pt">
    <ReportTitleBand Name="ReportTitle1" Width="468.72" Height="162.52">
      <PictureObject Name="Company_logo" Left="24.57" Top="3.78" Width="419.53" Height="68.03" Fill.Color="White" ImageLocation="C:\Users\Intel\Desktop\mnrOfferRelatedTable.png"/>
      <TextObject Name="Memo2" Left="416.68" Top="113.62" Width="44.43" Height="18.9" Text=":من" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo4" Left="303.95" Top="113.62" Width="90.71" Height="18.9" Text="[FromDate]" Padding="2, 1, 2, 1" Format="Date" Format.Format="d" AutoWidth="true" HorzAlign="Right" VertAlign="Center" Font="Times New Roman, 10pt"/>
      <TextObject Name="Memo8" Left="26.46" Top="66.91" Width="415.75" Height="34.02" Text=" مبيعات نقطة بيع" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 14pt, style=Bold"/>
      <TextObject Name="Memo27" Left="148.22" Top="113.62" Width="75.59" Height="18.9" Text="[ToDate]" Padding="2, 1, 2, 1" Format="Date" Format.Format="d" AutoWidth="true" HorzAlign="Right" VertAlign="Center" Font="Times New Roman, 10pt"/>
      <TextObject Name="Memo9" Left="264.88" Top="113.62" Width="28.98" Height="18.9" Text="حتى:" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" RightToLeft="true" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo20" Left="82.27" Top="113.62" Width="60.47" Height="18.9" Text=": العملة" Padding="2, 1, 2, 1" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo22" Left="-16" Top="113.62" Width="98.27" Height="18.9" Text="[CurrName]" Padding="2, 1, 2, 1" HorzAlign="Right" VertAlign="Center" Font="Times New Roman, 10pt"/>
    </ReportTitleBand>
    <DataBand Name="MasterData1" Top="189.42" Width="468.72" Height="18.9" DataSource="Table1">
      <TextObject Name="Memo6" Left="227.54" Width="207.87" Height="18.9" Border.Lines="All" Text="[firlas.Name]" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt"/>
      <TextObject Name="Memo7" Left="34.78" Width="192.76" Height="18.9" Border.Lines="All" Text="[IIf( [firlas.Val] ==  &quot;Jan  1 1980 12:00AM&quot;   ,  &quot;&quot;   , IIf( [firlas.Val] == &quot;0&quot;, &quot;&quot; ,  [firlas.Val])  )]" Padding="2, 1, 2, 1" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt"/>
      <DataHeaderBand Name="Header1" Top="166.52" Width="468.72" Height="18.9">
        <TextObject Name="Memo3" Left="227.54" Width="207.87" Height="18.9" 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="Memo5" Left="34.78" Width="192.76" Height="18.9" 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"/>
      </DataHeaderBand>
    </DataBand>
    <DataBand Name="MasterData2" Top="235.22" Width="468.72" Height="18.9" DataSource="Table">
      <TextObject Name="Memo10" Left="227.54" Width="207.91" Height="18.9" Border.Lines="All" Text="[ADOQuery1.Name]" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt"/>
      <TextObject Name="Memo11" Left="133.05" Width="94.49" Height="18.9" Border.Lines="All" Text="[ADOQuery1.sqty]" Padding="2, 1, 2, 1" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt"/>
      <TextObject Name="Memo12" Left="34.78" Width="98.27" Height="18.9" Border.Lines="All" Text="[ADOQuery1.VALUE]" Padding="2, 1, 2, 1" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt"/>
      <DataHeaderBand Name="Header2" Top="212.32" Width="468.72" Height="18.9">
        <TextObject Name="Memo13" Left="227.54" Width="207.91" Height="18.9" 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="133.05" Width="94.49" Height="18.9" Border.Lines="All" Fill.Color="186, 211, 254" Text="اجمالي الكمية" Padding="2, 1, 2, 1" Format="Date" Format.Format="d" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
        <TextObject Name="Memo15" Left="34.78" Width="98.27" Height="18.9" Border.Lines="All" Fill.Color="186, 211, 254" Text="اجمالي القيمة" Padding="2, 1, 2, 1" Format="Date" Format.Format="d" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      </DataHeaderBand>
    </DataBand>
    <ReportSummaryBand Name="ReportSummary1" Top="258.12" Width="468.72" Height="22.68">
      <TextObject Name="Memo16" Left="227.58" Width="207.87" Height="18.9" 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="133.05" Width="94.49" Height="18.9" Border.Lines="All" Text="[Total_sqty]" Padding="2, 1, 2, 1" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo19" Left="34.78" Width="98.27" Height="18.9" Border.Lines="All" Text="[Total_Value]" Padding="2, 1, 2, 1" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Center" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
    </ReportSummaryBand>
    <PageFooterBand Name="PageFooter1" Top="284.8" Width="468.72" Height="40.39">
      <TextObject Name="Memo1" Left="424.6" Top="2" Width="41.57" Height="15.12" Text="[Page#]" Padding="2, 1, 2, 1" HorzAlign="Right" Font="Times New Roman, 8pt"/>
      <TextObject Name="Memo21" Left="58.71" Top="2" 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"/>
      <TextObject Name="Memo28" Left="-0.54" Top="2" 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="Memo29" Left="144.42" Top="2" Width="30.24" Height="15.12" Text="Time:" Padding="2, 1, 2, 1" AutoWidth="true" VertAlign="Center" Font="Times New Roman, 8pt"/>
      <TextObject Name="Memo30" Left="177.43" Top="2" 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"/>
      <TextObject Name="Memo17" Left="350.53" Top="24.08" Width="113.35" Height="13.34" Border.Lines="All" Border.Color="White" Text="www.almanarasoft.com" Padding="2, 1, 2, 1" VertAlign="Center" Font="Times New Roman, 8pt, style=Bold" TextFill.Color="Blue"/>
    </PageFooterBand>
  </ReportPage>
</Report>
