[Options]
Page.BottomMargin=10
Page.TopMargin=10
Page.LeftMargin=10
Page.RightMargin=10
Page.Length=297
Page.Width=210
Page.Orientation=0
Page.PaperSize=Custom
[Band1]
BandType=2
Name=Karton3Band3
Enabled=1
Height=23
Color=16777215
Frame.Width=1
Frame.Color=0
Frame.DrawBottom=0
Frame.DrawTop=0
Frame.DrawLeft=0
Frame.DrawRight=0
[Band2]
BandType=4
Name=Karton3Band4
Enabled=1
Height=60
Color=16777215
Frame.Width=1
Frame.Color=0
Frame.DrawBottom=0
Frame.DrawTop=0
Frame.DrawLeft=0
Frame.DrawRight=0
[Band3]
BandType=1
Name=Karton3Band1
Enabled=1
Height=30
Color=16777215
Frame.Width=1
Frame.Color=0
Frame.DrawBottom=0
Frame.DrawTop=0
Frame.DrawLeft=0
Frame.DrawRight=0
[Band4]
BandType=0
Name=Karton3Band2
Enabled=1
Height=55
Color=16777215
Frame.Width=1
Frame.Color=0
Frame.DrawBottom=0
Frame.DrawTop=0
Frame.DrawLeft=0
Frame.DrawRight=0
[1]
Type=TQEDBText
Parent=Karton3Band3
Left=266
Top=2
Height=17
Width=86
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=LeftJustify
Font.Charset=1
Font.Color=-2147483640
Font.Name=Arial
Color=16777215
Font.Style=
Font.Size=10
DataField=InventoryName
Transparent=0
[2]
Type=TQEShape
Parent=Karton3Band3
Left=0
Top=0
Height=22
Width=718
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
Shape=Rectangle
Brush.Color=16777215
Pen.Color=0
Pen.Width=1
[3]
Type=TQEShape
Parent=Karton3Band3
Left=186
Top=0
Height=22
Width=1
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
Shape=VertLine
Brush.Color=16777215
Pen.Color=0
Pen.Width=1
[4]
Type=TQEShape
Parent=Karton3Band3
Left=217
Top=0
Height=22
Width=1
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
Shape=VertLine
Brush.Color=16777215
Pen.Color=0
Pen.Width=1
[5]
Type=TQEShape
Parent=Karton3Band3
Left=345
Top=0
Height=22
Width=1
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
Shape=VertLine
Brush.Color=16777215
Pen.Color=0
Pen.Width=1
[6]
Type=TQEShape
Parent=Karton3Band3
Left=398
Top=0
Height=22
Width=1
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
Shape=VertLine
Brush.Color=16777215
Pen.Color=0
Pen.Width=1
[7]
Type=TQEShape
Parent=Karton3Band3
Left=449
Top=0
Height=22
Width=1
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
Shape=VertLine
Brush.Color=16777215
Pen.Color=0
Pen.Width=1
[8]
Type=TQEShape
Parent=Karton3Band3
Left=479
Top=0
Height=22
Width=1
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
Shape=VertLine
Brush.Color=16777215
Pen.Color=0
Pen.Width=1
[9]
Type=TQEShape
Parent=Karton3Band3
Left=609
Top=0
Height=22
Width=1
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
Shape=VertLine
Brush.Color=16777215
Pen.Color=0
Pen.Width=1
[10]
Type=TQEShape
Parent=Karton3Band3
Left=667
Top=0
Height=22
Width=1
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
Shape=VertLine
Brush.Color=16777215
Pen.Color=0
Pen.Width=1
[11]
Type=TQEDBText
Parent=Karton3Band3
Left=4
Top=2
Height=17
Width=65
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=LeftJustify
Font.Charset=204
Font.Color=-2147483640
Font.Name=Arial Narrow
Color=16777215
Font.Style=
Font.Size=8
DataField=NameInventory
Transparent=0
[12]
Type=TQEDBText
Parent=Karton3Band3
Left=188
Top=2
Height=17
Width=28
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=LeftJustify
Font.Charset=1
Font.Color=-2147483640
Font.Name=Arial
Color=16777215
Font.Style=
Font.Size=10
DataField=PBR
Transparent=0
[13]
Type=TQEDBText
Parent=Karton3Band3
Left=347
Top=2
Height=17
Width=25
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=LeftJustify
Font.Charset=204
Font.Color=-2147483640
Font.Name=Arial Narrow
Color=16777215
Font.Style=
Font.Size=8
DataField=PDate
Transparent=0
[14]
Type=TQEDBText
Parent=Karton3Band3
Left=451
Top=2
Height=17
Width=28
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=LeftJustify
Font.Charset=1
Font.Color=-2147483640
Font.Name=Arial
Color=16777215
Font.Style=
Font.Size=10
DataField=VBR
Transparent=0
[15]
Type=TQEDBText
Parent=Karton3Band3
Left=611
Top=2
Height=17
Width=25
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=LeftJustify
Font.Charset=204
Font.Color=-2147483640
Font.Name=Arial Narrow
Color=16777215
Font.Style=
Font.Size=8
DataField=VDate
Transparent=0
[16]
Type=TQEDBText
Parent=Karton3Band3
Left=219
Top=2
Height=17
Width=124
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=0
Alignment=LeftJustify
Font.Charset=204
Font.Color=0
Font.Name=Arial Narrow
Color=16777215
Font.Style=
Font.Size=8
DataField=PComent
Transparent=1
[17]
Type=TQEDBText
Parent=Karton3Band3
Left=482
Top=2
Height=17
Width=124
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=0
Alignment=LeftJustify
Font.Charset=204
Font.Color=0
Font.Name=Arial Narrow
Color=16777215
Font.Style=
Font.Size=8
DataField=VComent
Transparent=1
[18]
Type=TQELabel
Parent=Karton3Band4
Left=257
Top=18
Height=20
Width=213
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=Center
Font.Charset=204
Font.Color=-2147483640
Font.Name=Arial
Color=16777215
Font.Style=Bold
Font.Size=11
Caption=Íà÷èñëåí èíâåíòàð êúì ãîñò
Transparent=1
AutoStretch=1
WordWrap=1
Variable=
[19]
Type=TQEShape
Parent=Karton3Band2
Left=0
Top=0
Height=54
Width=718
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
Shape=Rectangle
Brush.Color=16777215
Pen.Color=0
Pen.Width=1
[20]
Type=TQEShape
Parent=Karton3Band2
Left=186
Top=0
Height=55
Width=1
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
Shape=VertLine
Brush.Color=16777215
Pen.Color=0
Pen.Width=1
[21]
Type=TQEShape
Parent=Karton3Band2
Left=449
Top=0
Height=55
Width=1
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
Shape=VertLine
Brush.Color=16777215
Pen.Color=0
Pen.Width=1
[22]
Type=TQEShape
Parent=Karton3Band2
Left=187
Top=18
Height=1
Width=530
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
Shape=HorLine
Brush.Color=16777215
Pen.Color=0
Pen.Width=1
[23]
Type=TQELabel
Parent=Karton3Band2
Left=37
Top=18
Height=17
Width=112
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=LeftJustify
Font.Charset=1
Font.Color=-2147483640
Font.Name=Arial
Color=16777215
Font.Style=
Font.Size=10
Caption=ÍÀÈÌÅÍÎÂÀÍÈÅ
Transparent=0
AutoStretch=1
WordWrap=1
Variable=
[24]
Type=TQELabel
Parent=Karton3Band2
Left=291
Top=2
Height=15
Width=58
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=LeftJustify
Font.Charset=1
Font.Color=-2147483640
Font.Name=Arial
Color=16777215
Font.Style=
Font.Size=8
Caption=ÏÎËÓ×ÅÍÈ
Transparent=0
AutoStretch=1
WordWrap=1
Variable=
[25]
Type=TQELabel
Parent=Karton3Band2
Left=559
Top=2
Height=15
Width=52
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=LeftJustify
Font.Charset=1
Font.Color=-2147483640
Font.Name=Arial
Color=16777215
Font.Style=
Font.Size=8
Caption=ÂÚÐÍÀÒÈ
Transparent=0
AutoStretch=1
WordWrap=1
Variable=
[26]
Type=TQELabel
Parent=Karton3Band2
Left=192
Top=21
Height=17
Width=19
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=LeftJustify
Font.Charset=1
Font.Color=-2147483640
Font.Name=Arial
Color=16777215
Font.Style=
Font.Size=10
Caption=ÁÐ
Transparent=0
AutoStretch=1
WordWrap=1
Variable=
[27]
Type=TQELabel
Parent=Karton3Band2
Left=353
Top=21
Height=17
Width=35
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=LeftJustify
Font.Charset=1
Font.Color=-2147483640
Font.Name=Arial
Color=16777215
Font.Style=
Font.Size=10
Caption=ÄÀÒÀ
Transparent=0
AutoStretch=1
WordWrap=1
Variable=
[28]
Type=TQELabel
Parent=Karton3Band2
Left=401
Top=21
Height=15
Width=47
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=LeftJustify
Font.Charset=1
Font.Color=-2147483640
Font.Name=Arial
Color=16777215
Font.Style=
Font.Size=8
Caption=ÏÎÄÏÈÑ
Transparent=0
AutoStretch=1
WordWrap=1
Variable=
[29]
Type=TQELabel
Parent=Karton3Band2
Left=401
Top=36
Height=15
Width=46
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=LeftJustify
Font.Charset=1
Font.Color=-2147483640
Font.Name=Arial
Color=16777215
Font.Style=
Font.Size=8
Caption=ÆÈÂÓÙ
Transparent=0
AutoStretch=1
WordWrap=1
Variable=
[30]
Type=TQEShape
Parent=Karton3Band2
Left=217
Top=18
Height=36
Width=1
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
Shape=VertLine
Brush.Color=16777215
Pen.Color=0
Pen.Width=1
[31]
Type=TQEShape
Parent=Karton3Band2
Left=345
Top=18
Height=36
Width=1
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
Shape=VertLine
Brush.Color=16777215
Pen.Color=0
Pen.Width=1
[32]
Type=TQEShape
Parent=Karton3Band2
Left=398
Top=18
Height=36
Width=1
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
Shape=VertLine
Brush.Color=16777215
Pen.Color=0
Pen.Width=1
[33]
Type=TQELabel
Parent=Karton3Band2
Left=455
Top=21
Height=17
Width=19
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=LeftJustify
Font.Charset=1
Font.Color=-2147483640
Font.Name=Arial
Color=16777215
Font.Style=
Font.Size=10
Caption=ÁÐ
Transparent=0
AutoStretch=1
WordWrap=1
Variable=
[34]
Type=TQELabel
Parent=Karton3Band2
Left=621
Top=21
Height=17
Width=35
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=LeftJustify
Font.Charset=1
Font.Color=-2147483640
Font.Name=Arial
Color=16777215
Font.Style=
Font.Size=10
Caption=ÄÀÒÀ
Transparent=0
AutoStretch=1
WordWrap=1
Variable=
[35]
Type=TQELabel
Parent=Karton3Band2
Left=669
Top=21
Height=15
Width=47
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=LeftJustify
Font.Charset=1
Font.Color=-2147483640
Font.Name=Arial
Color=16777215
Font.Style=
Font.Size=8
Caption=ÏÎÄÏÈÑ
Transparent=0
AutoStretch=1
WordWrap=1
Variable=
[36]
Type=TQELabel
Parent=Karton3Band2
Left=670
Top=36
Height=15
Width=46
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=LeftJustify
Font.Charset=1
Font.Color=-2147483640
Font.Name=Arial
Color=16777215
Font.Style=
Font.Size=8
Caption=ÆÈÂÓÙ
Transparent=0
AutoStretch=1
WordWrap=1
Variable=
[37]
Type=TQEShape
Parent=Karton3Band2
Left=479
Top=18
Height=36
Width=1
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
Shape=VertLine
Brush.Color=16777215
Pen.Color=0
Pen.Width=1
[38]
Type=TQEShape
Parent=Karton3Band2
Left=609
Top=18
Height=35
Width=1
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
Shape=VertLine
Brush.Color=16777215
Pen.Color=0
Pen.Width=1
[39]
Type=TQEShape
Parent=Karton3Band2
Left=667
Top=18
Height=35
Width=1
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
Shape=VertLine
Brush.Color=16777215
Pen.Color=0
Pen.Width=1
[40]
Type=TQELabel
Parent=Karton3Band2
Left=245
Top=21
Height=17
Width=73
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=Center
Font.Charset=204
Font.Color=-2147483640
Font.Name=Arial
Color=16777215
Font.Style=
Font.Size=10
Caption=ÊÎÌÅÍÒÀÐ
Transparent=1
AutoStretch=1
WordWrap=1
Variable=
[41]
Type=TQELabel
Parent=Karton3Band2
Left=508
Top=21
Height=17
Width=73
Frame.Width=1
Frame.Color=0
Frame.DrawTop=0
Frame.DrawBottom=0
Frame.DrawLeft=0
Frame.DrawRight=0
AutoSize=1
Alignment=Center
Font.Charset=204
Font.Color=-2147483640
Font.Name=Arial
Color=16777215
Font.Style=
Font.Size=10
Caption=ÊÎÌÅÍÒÀÐ
Transparent=1
AutoStretch=1
WordWrap=1
Variable=
select ImeStud=G.Name,
Blok=(select H.HotelName from Hotels H, Registers R where R.RegisterName='HotelID' and H.Hotel_ID=R.IntStojnost),
Room=if GNum<>:GNo then null else (select top 1 RR.RoomName from Rooms RR, Book BB where RR.RoomNum=BB.Room and BB.Guest=G.GuestNum order by BB.DateReg desc) endif,
VUZ=U.FullName,
Kurs=K.Name,
FN,
firma=(select Stoinost from HotelOptions where OptionName='FirmName'),
GuestNum = G.GuestNum,
GNum=if (select count(*) from book where guest = :GNo) <>0 then G.GuestNum else (select MAX(GuestNum) from Guests gg join Book bb on bb.Guest = gg.GuestNum) endif ,
DateL= (select cast(FloatToDate(max(DateReg+NumLodgings)) as varchar(15)) from Book where Guest=G.GuestNum )
from Guests G, Universities U, Kursove K
where GuestNum=:Gno AND U.N=G.UniN and K.N=G.Kurs
select iopN=IOP.N,
NameInventory=I.Name,
RoomNo=(Select first Room from Book where Staying=1 and Guest=:GNo),
PBR=(Select sum(IOP.QTY) from InventoryOperations where GuestN=0 and RoomN=RoomNo and N=IOP.N and AddOperationN=0),--sum(IOP.QTY),
VBR=(Select Abs(sum(IOV.QTY)) from InventoryOperations where GuestN=0 and RoomN=RoomNo and N=IOV.N),--Abs(sum(IOV.QTY)),
PComent=IOP.Notes,
VComent=IOV.Notes,
PDate=IOP.OperationDate,
VDate=IOV.OperationDate
from Inventory I, InventoryOperations IOP, InventoryOperations IOV
where IOP.GuestN=0 and IOP.RoomN=RoomNo and IOP.InventoryN=I.N and IOP.AddOperationN=0
and IOV.AddOperationN=IOP.N
group by IOP.N,IOV.N,NameInventory,RoomNo,PComent,VComent,PDate,VDate
union all
select iopN=IOP.N,
NameInventory=I.Name,
RoomNo=(Select first Room from Book where Staying=1 and Guest=:GNo),
PBR=sum(IOP.QTY),
VBR=0,
PComent=IOP.Notes,
VComent='',
PDate=IOP.OperationDate,
VDate=null
from Inventory I, InventoryOperations IOP
where IOP.GuestN=0 and IOP.RoomN=RoomNo and IOP.InventoryN=I.N and IOP.AddOperationN=0
and IOP.N not in (Select AddOperationN from InventoryOperations where GuestN=0 and RoomN=RoomNo)
group by IOP.N,NameInventory,RoomNo,PComent,VComent,PDate,VDate
order by iopN asc