--გრაფიკი და CPV კოდი მისათითებელია ფინანსურში

--ვერსია არის
Declare @ContractID UniqueIdentifier, @CurrentDate DateTime

Set @ContractID = '508F674A-F36A-420C-9C67-A80A0BFA8B41'
Set @CurrentDate = '2014-07-03 21:00:00.000'

Select * From dbo.BL_Liabilities Where LiabilityNumber = 24924 And ContractID = @ContractID

Select TreasuryID, TreasuryStatusID, TreasuryChangeDescription, * From dbo.BL_Contracts
Where ContractNumber = N'სე/018-0681' And ID = @ContractID


--Update S
--Set S.DateDeleted = @CurrentDate
----Select * 
--From dbo.BL_TreasuryContractShedule S
--Where DateDeleted Is Null And ContractID = @ContractID
--	And S.MonthIndex = 6

--Update S
--Set S.Amount = 1300
----Select * 
--From dbo.BL_TreasuryContractShedule S
--Where DateDeleted Is Null And ContractID = @ContractID
--	And S.MonthIndex = 12


Select * From dbo.BL_TreasuryContractShedule
Where DateDeleted Is Null And ContractID = @ContractID
Order By MonthIndex

Select * From dbo.BL_TreasuryContractCpvCodes
Where DateDeleted Is Null And ContractID = @ContractID
