home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.sanbilgisayar.com
/
ftp.sanbilgisayar.com.tar
/
ftp.sanbilgisayar.com
/
SHOP
/
ShopImportP.exe
/
0
/
RCDATA
/
TDMKUYUM
/
TDMKUYUM.txt
Wrap
Text File
|
2015-03-03
|
15KB
|
553 lines
object DMKuyum: TDMKuyum
OldCreateOrder = False
OnCreate = DataModuleCreate
OnDestroy = DataModuleDestroy
Left = 407
Top = 254
Height = 323
Width = 630
object Tur: TMSQuery
Connection = mDM.MSConnection
SQL.Strings = (
'Select * From Tur with (NOLOCK)')
Left = 13
Top = 123
object TurKodu: TStringField
FieldName = 'Kodu'
Size = 6
end
object TurAdi: TStringField
FieldName = 'Adi'
Size = 25
end
object TurABebYas1: TSmallintField
FieldName = 'ABebYas1'
end
object TurABebYas2: TSmallintField
FieldName = 'ABebYas2'
end
object TurABebYuzde: TSmallintField
FieldName = 'ABebYuzde'
end
object TurSBebYas1: TSmallintField
FieldName = 'SBebYas1'
end
object TurSBebYas2: TSmallintField
FieldName = 'SBebYas2'
end
object TurSBebYuzde: TSmallintField
FieldName = 'SBebYuzde'
end
object TurACocYas1: TSmallintField
FieldName = 'ACocYas1'
end
object TurACocYas2: TSmallintField
FieldName = 'ACocYas2'
end
object TurACocYuzde: TSmallintField
FieldName = 'ACocYuzde'
end
object TurSCocYas1: TSmallintField
FieldName = 'SCocYas1'
end
object TurSCocYas2: TSmallintField
FieldName = 'SCocYas2'
end
object TurSCocYuzde: TSmallintField
FieldName = 'SCocYuzde'
end
object TurFiyKate: TStringField
FieldName = 'FiyKate'
Size = 15
end
end
object Bolge: TMSQuery
Connection = mDM.MSConnection
SQL.Strings = (
'Select * from Bolge')
Left = 58
Top = 123
object BolgeKOD: TStringField
FieldName = 'KOD'
Required = True
Size = 3
end
object BolgeADI: TStringField
FieldName = 'ADI'
Size = 30
end
end
object ShpMag: TMSQuery
Connection = mDM.MSConnection
SQL.Strings = (
'declare @Doviz VarChar(3), @BaseCur VarChar(3), @Tarih DateTime,' +
'@BankNo int,@KurTipi int Set @Doviz = '#39'EUR'#39' Select @BaseCur =Bas' +
'eCurr,@BankNo=BankNo ,@KurTipi= KurTipi From ShopParam SELECT Ma' +
'gaza, Operator, (SELECT Adi FROM Turop T WITH (NOLOCK) WHERE T.K' +
'odu = x.Operator) TuropAdi '
', min(Donem) Donem, sum(isnull(GirYet, 0) + isnull(GirCoc, 0) + ' +
'isnull(GirBeb, 0)) Pax '
', KuyumMagazaPP = (CASE WHEN sum(isnull(GirYet, 0) + isnull(GirC' +
'oc, 0) + isnull(GirBeb, 0)) = 0 THEN '
' 0 ELSE CASE WHEN sum(isnull(KuyumCiroTop, 0))' +
' = 0 THEN '
' 0 ELSE (sum(isnull(KuyumCiroTop, 0)) / sum(is' +
'null(GirYet, 0) + isnull(GirCoc, 0) + isnull(GirBeb, 0))) '
' END END) '
', (CASE WHEN max(isnull(MagazaTipiGirenPax, 0)) = 0 THEN 0 '
' ELSE (((sum(isnull(ToplamCiro, 0)) + sum(isnull(To' +
'plamKredi, 0))) / max(isnull(MagazaTipiGirenPax, 0)))) '
' END) MagazaBeklemeDahil '
', sum(isnull(CiroTop, 0)) CiroToplam, @Doviz Dvz '
' FROM (SELECT M.Operator, M.SejServisTarihi, M.AnaUrun, M.Magaz' +
'a, M.GirYet, M.GirCoc, M.GirBeb '
' , (SELECT TOP 1 Kodu FROM Donem D WHERE M.Tarih BETWEEN ' +
'd.BasTar AND d.BitTar) Donem '
' , (SELECT sum(isnull(GirYet, 0)) GirenPax '
' FROM (SELECT DISTINCT Rehber , GirYet FROM ShpMag' +
' N WHERE N.Operator = M.Operator '
' AND (SELECT MagazaTipi FROM Magaza g WHERE g.Kodu = ' +
'n.Magaza) = (SELECT MagazaTipi FROM Magaza g WHERE g.Kodu = m.Ma' +
'gaza)) s) MagazaTipiGirenPax '
' , (SELECT sum(s.CiroTut * dbo.ufn_doviz_parite(@Doviz, s' +
'.CiroDov, s.Tarih, @BaseCur, @BankNo, @KurTipi)) CiroTut '
' FROM ShpSat s WHERE s.Operator = m.Operator AND s' +
'.Tur = m.Tur AND s.Bolge = m.Bolge AND s.Tarih = m.Tarih AND s.M' +
'usTipi = m.MusTipi '
' AND EXISTS (SELECT * FROM ShpMag N WHERE ' +
'N.Operator = M.Operator '
' AND (SELECT MagazaTipi FROM Magaza g WHERE g.Kodu = n.Ma' +
'gaza) = (SELECT MagazaTipi FROM Magaza g WHERE g.Kodu = m.Magaza' +
'))) ToplamCiro '
' , (SELECT sum(s.KrdTut * dbo.ufn_doviz_parite(@Doviz, s.' +
'CiroDov, s.Tarih, @BaseCur, @BankNo, @KurTipi)) CiroTut '
' FROM ShpSat s WHERE s.Operator = m.Operator AND s' +
'.Tur = m.Tur '
' AND s.Bolge = m.Bolge AND s.Tarih = m.Tar' +
'ih AND s.MusTipi = m.MusTipi '
' AND EXISTS (SELECT * FROM ShpMag N WHERE ' +
'N.Operator = M.Operator '
' and (SELECT MagazaTipi FROM Mag' +
'aza g WHERE g.Kodu = n.Magaza) = (SELECT MagazaTipi FROM Magaza ' +
'g WHERE g.Kodu = m.Magaza))) ToplamKredi '
' , (SELECT sum(isnull(dbo.ufn_getHakedis(@Doviz, f.Tur, f' +
'.Bolge, f.Tarih, f.Sira, f.Operator, f.MusTipi, 1, 1, 1, 1, 1, 0' +
', '#39#39'), 0)) ToplamDeriAcenteHakedis FROM ShpMag F '
' WHERE F.Operator = M.Operator) ToplamAcenteHakedi' +
's '
' , (SELECT sum(isnull(CiroTut, 0) * dbo.ufn_doviz_parite(' +
'@Doviz, S.CiroDov, S.Tarih, @BaseCur, @BankNo, @KurTipi)) CiroTo' +
'p '
' FROM ShpMag F, ShpSat S WHERE F.Operator = M.Oper' +
'ator AND F.Magaza = M.Magaza AND S.Tur = F.Tur '
' AND S.Tarih = F.Tarih AND S.Bolge = F.Bol' +
'ge AND S.Operator = F.Operator AND S.MusTipi = F.MusTipi AND S.M' +
'gzSira = F.Sira) CiroTop '
' , (SELECT sum(CiroTop) '
' FROM (SELECT (isnull(CiroTut, 0) * dbo.ufn_doviz_' +
'parite(@Doviz, S.CiroDov, S.Tarih, @BaseCur, @BankNo, @KurTipi))' +
' CiroTop '
' FROM ShpSat S WHERE S.Tur = M.Tur AND S.' +
'Tarih = M.Tarih AND S.Bolge = M.Bolge AND S.Operator = M.Operato' +
'r '
' AND S.Magaza = M.Magaza AND S.Mu' +
'sTipi = M.MusTipi AND S.MgzSira = M.Sira) b) KuyumCiroTop '
' , dbo.ufn_getHakedis(@Doviz, m.Tur, m.Bolge, m.Tarih, m.' +
'Sira, m.Operator, m.MusTipi, 1, 1, 1, 1, 1, 0, '#39#39') ToplamDeriAce' +
'nteHakedis '
'FROM ShpMag M WHERE 1 = 1 ) x GROUP BY Magaza, Operator')
Left = 28
Top = 49
object ShpMagMagaza: TStringField
DisplayLabel = 'Ma'#287'aza'
FieldName = 'Magaza'
Size = 6
end
object ShpMagOperator: TStringField
DisplayLabel = 'Operat'#246'r'
FieldName = 'Operator'
Size = 6
end
object ShpMagTuropAdi: TStringField
DisplayLabel = 'Operat'#246'r Ad'#305
FieldName = 'TuropAdi'
ReadOnly = True
Size = 25
end
object ShpMagDonem: TStringField
DisplayLabel = 'D'#246'nem'
FieldName = 'Donem'
ReadOnly = True
Size = 10
end
object ShpMagPax: TIntegerField
DisplayLabel = 'Kuyum Ma'#287'. Pax'
FieldName = 'Pax'
ReadOnly = True
end
object ShpMagKuyumMagazaPP: TFloatField
DisplayLabel = 'Kuyum Ma'#287'. P.P'
FieldName = 'KuyumMagazaPP'
ReadOnly = True
end
object ShpMagMagazaBeklemeDahil: TFloatField
DisplayLabel = 'Toplam Bekleme P.P.'
FieldName = 'MagazaBeklemeDahil'
ReadOnly = True
end
object ShpMagDvz: TStringField
DisplayLabel = 'D'#246'viz'
FieldName = 'Dvz'
ReadOnly = True
Size = 3
end
end
object ShpMagDS: TDataSource
DataSet = ShpMag
Left = 30
Top = 3
end
object TurOp: TMSQuery
Connection = mDM.MSConnection
SQL.Strings = (
'Select Kodu,Adi from TurOp')
Left = 103
Top = 123
object TurOpKodu: TStringField
FieldName = 'Kodu'
Required = True
Size = 6
end
object TurOpAdi: TStringField
FieldName = 'Adi'
Size = 25
end
end
object Magaza: TMSQuery
Connection = mDM.MSConnection
SQL.Strings = (
'Select Kodu,Adi from Magaza')
Left = 148
Top = 123
object MagazaKodu: TStringField
FieldName = 'Kodu'
Required = True
Size = 6
end
object MagazaAdi: TStringField
FieldName = 'Adi'
Size = 30
end
end
object RehGrp: TMSQuery
Connection = mDM.MSConnection
SQL.Strings = (
'Select * from RehberGrp')
Left = 194
Top = 123
object RehGrpAdi: TStringField
FieldName = 'Adi'
Required = True
Size = 6
end
object RehGrpRehber: TStringField
FieldName = 'Rehber'
Required = True
Size = 6
end
end
object Rehber: TMSQuery
Connection = mDM.MSConnection
SQL.Strings = (
'Select Kodu,Adi from Rehber')
Left = 239
Top = 123
object RehberKodu: TStringField
FieldName = 'Kodu'
Required = True
Size = 6
end
object RehberAdi: TStringField
FieldName = 'Adi'
Size = 25
end
end
object KomAlanGrp: TMSQuery
Connection = mDM.MSConnection
SQL.Strings = (
'Select * from ShopKomAlGrp')
Left = 289
Top = 122
object KomAlanGrpGrpAdi: TStringField
FieldName = 'GrpAdi'
Required = True
Size = 15
end
object KomAlanGrpKomAlan: TStringField
FieldName = 'KomAlan'
Required = True
Size = 15
end
end
object ShopKomAl: TMSQuery
Connection = mDM.MSConnection
SQL.Strings = (
'Select * from ShopKomAl')
Left = 350
Top = 122
object ShopKomAlKodu: TStringField
FieldName = 'Kodu'
Required = True
Size = 15
end
object ShopKomAlTanimi: TStringField
FieldName = 'Tanimi'
Size = 30
end
end
object ShopParam: TMSQuery
Connection = mDM.MSConnection
SQL.Strings = (
'Select * From ShopParam ')
Left = 411
Top = 122
object ShopParamFirmaLogo: TBlobField
FieldName = 'FirmaLogo'
end
object ShopParamFirmaKase: TBlobField
FieldName = 'FirmaKase'
end
object ShopParamBaseCurr: TStringField
FieldName = 'BaseCurr'
Size = 3
end
object ShopParamBaseCurrDec: TSmallintField
FieldName = 'BaseCurrDec'
end
object ShopParamBankNo: TSmallintField
FieldName = 'BankNo'
end
object ShopParamKurTipi: TSmallintField
FieldName = 'KurTipi'
end
end
object QryTemp: TMSQuery
Connection = mDM.MSConnection
Left = 388
Top = 7
end
object MagKont: TMSQuery
Connection = mDM.MSConnection
SQL.Strings = (
'Select * from MagKont')
Left = 469
Top = 123
object MagKontMagaza: TStringField
FieldName = 'Magaza'
Required = True
Size = 6
end
object MagKontSezNo: TStringField
FieldName = 'SezNo'
Required = True
Size = 5
end
object MagKontBasTarih: TDateTimeField
FieldName = 'BasTarih'
end
object MagKontBitTarih: TDateTimeField
FieldName = 'BitTarih'
end
object MagKontTurop: TStringField
FieldName = 'Turop'
Size = 6
end
object MagKontGarHak: TStringField
FieldName = 'GarHak'
Size = 1
end
object MagKontGarHakTut: TFloatField
FieldName = 'GarHakTut'
end
object MagKontGarHakDov: TStringField
FieldName = 'GarHakDov'
Size = 3
end
object MagKontAyBas: TStringField
FieldName = 'AyBas'
Size = 1
end
object MagKontAyBasUcr: TFloatField
FieldName = 'AyBasUcr'
end
object MagKontAyBasDov: TStringField
FieldName = 'AyBasDov'
Size = 3
end
object MagKontKontTar: TDateTimeField
FieldName = 'KontTar'
end
object MagKontAceYetkili: TStringField
FieldName = 'AceYetkili'
Size = 30
end
object MagKontMagYetkili: TStringField
FieldName = 'MagYetkili'
Size = 30
end
object MagKontExtArac: TStringField
FieldName = 'ExtArac'
Size = 1
end
object MagKontExtYemek: TStringField
FieldName = 'ExtYemek'
Size = 1
end
object MagKontExtTur: TStringField
FieldName = 'ExtTur'
Size = 1
end
object MagKontAciklama: TStringField
FieldName = 'Aciklama'
Size = 200
end
object MagKontCrtDate: TDateTimeField
FieldName = 'CrtDate'
end
object MagKontCrtUser: TStringField
FieldName = 'CrtUser'
Size = 8
end
object MagKontChgDate: TDateTimeField
FieldName = 'ChgDate'
end
object MagKontChgUser: TStringField
FieldName = 'ChgUser'
Size = 8
end
object MagKontKilit: TStringField
FieldName = 'Kilit'
Size = 1
end
object MagKontRecNo: TIntegerField
FieldName = 'RecNo'
Required = True
end
end
object BolgeGrp: TMSQuery
Connection = mDM.MSConnection
SQL.Strings = (
'Select * from BolgeGrp')
Left = 305
Top = 64
object BolgeGrpAdi: TStringField
FieldName = 'Adi'
Size = 6
end
object BolgeGrpBolge: TStringField
FieldName = 'Bolge'
Size = 6
end
end
object QryHelp: TMSQuery
Connection = mDM.MSConnection
Left = 460
Top = 15
end
object QryTemp2: TMSQuery
Connection = mDM.MSConnection
Left = 404
Top = 55
end
object TurOpGrp: TMSQuery
Connection = mDM.MSConnection
SQL.Strings = (
'Select distinct adi From TurOpGrp with (NOLOCK)'
'order by adi')
Left = 13
Top = 172
object TurOpGrpadi: TStringField
FieldName = 'adi'
Origin = 'TurOpGrp.adi'
Size = 6
end
end
object Donem: TMSQuery
Connection = mDM.MSConnection
SQL.Strings = (
'Select * From Donem with (NOLOCK)')
Left = 64
Top = 173
object DonemKodu: TStringField
FieldName = 'Kodu'
Size = 10
end
object DonemBasTar: TDateTimeField
FieldName = 'BasTar'
end
object DonemBitTar: TDateTimeField
FieldName = 'BitTar'
end
end
object DovCins: TMSQuery
Connection = mDM.MSConnection
SQL.Strings = (
'Select * from DovCins')
Left = 291
Top = 181
object DovCinsDoviz: TStringField
FieldName = 'Doviz'
Required = True
Size = 3
end
object DovCinsText: TStringField
FieldName = 'Text'
Size = 25
end
end
object MagazaTipi: TMSQuery
Connection = mDM.MSConnection
SQL.Strings = (
'Select Kodu, Aciklama From MagazaTipi with (NOLOCK)'
'Order By Kodu')
Left = 117
Top = 180
object MagazaTipiKodu: TStringField
FieldName = 'Kodu'
Size = 6
end
object MagazaTipiAciklama: TStringField
FieldName = 'Aciklama'
Size = 40
end
end
end