SqlReports

Details

diff --git a/RevenueComparation.sql b/RevenueComparation.sql
index 008f78b..1b8b11a 100644
--- a/RevenueComparation.sql
+++ b/RevenueComparation.sql
@@ -128,7 +128,9 @@ begin
 			inner join dbo.Shops s with (nolock) on 
 					s.Id = t.ShopId
 				and s.CompanyId = @CompanyID 
-
+		
+		where
+				isnull(t.HostName, '') <> ''
 	
 	declare @SalesTotals table (ShopID int, Period1Summ decimal(15, 2), Period2Summ decimal(15, 2), LastPeriodSumm decimal(15, 2), ActualPeriodSumm decimal(15, 2), SalesLastPeriodCount int, SalesActualPeriodCount int)
 
@@ -283,7 +285,7 @@ begin
 
 	select
 		gtl.ShopID, 
-		isnull(s.Description, s.Name) as ShopName,
+		s.Name as ShopName,
 		isnull(st.Period1Summ, 0) as Period1Summ,
 		isnull(st.Period2Summ, 0) as Period2Summ,
 		isnull(st.LastPeriodSumm, 0) as LastPeriodSumm,
diff --git a/RevenueComparationByCategories.sql b/RevenueComparationByCategories.sql
index 77031c3..2f2eead 100644
--- a/RevenueComparationByCategories.sql
+++ b/RevenueComparationByCategories.sql
@@ -80,8 +80,11 @@ begin
 				and s.CompanyId = @CompanyID
 		
 		where 
-				isnull(@ShopID, 0) = 0
-			or	t.ShopId = @ShopID
+				isnull(t.HostName,'') <> ''
+			and	(		
+						isnull(@ShopID, 0) = 0
+					or	t.ShopId = @ShopID
+				)
 
 
 
@@ -220,7 +223,7 @@ begin
 	
 	select
 		gtl.ShopID,
-		isnull(s.Description, s.Name) as ShopName,
+		s.Name as ShopName,
 		isnull(pc.Name, '') as CategoryName,
 		isnull(st.LastPeriodSumm, 0) as LastPeriodSumm,
 		isnull(st.ActualPeriodSumm, 0) as ActualPeriodSumm,
diff --git a/RevenueComparationDaily.sql b/RevenueComparationDaily.sql
index 1b670fc..5a6fbab 100644
--- a/RevenueComparationDaily.sql
+++ b/RevenueComparationDaily.sql
@@ -69,6 +69,9 @@ begin
 			inner join dbo.Shops s with (nolock) on 
 					s.Id = t.ShopId
 				and s.CompanyId = @CompanyID 
+		
+		where
+				isnull(t.HostName,'') <> ''
  
  	
 	declare @SalesTotals table (ShopID int, LastPeriodSumm decimal(15, 2), ActualPeriodSumm decimal(15, 2), SalesLastPeriodCount int, SalesActualPeriodCount int)
@@ -135,7 +138,7 @@ begin
 
 	select
 		gtl.ShopID, 
-		isnull(s.Description, s.Name) as ShopName,
+		s.Name as ShopName,
 		isnull(st.LastPeriodSumm, 0) as LastPeriodSumm,
 		isnull(st.ActualPeriodSumm, 0) as ActualPeriodSumm,