diff --git a/WebDoorCreator.Data/SqlScripts/View/OrderStatusView.sql b/WebDoorCreator.Data/SqlScripts/View/OrderStatusView.sql index a5f36d8..94bea48 100644 --- a/WebDoorCreator.Data/SqlScripts/View/OrderStatusView.sql +++ b/WebDoorCreator.Data/SqlScripts/View/OrderStatusView.sql @@ -13,7 +13,7 @@ AS WITH cteDoorGroup AS ( SELECT OrderId - ,COUNT(DISTINCT TypeId) AS NumType + ,COUNT(DISTINCT DoorIdParent) AS NumType ,SUM(Quantity) AS NumDoors ,SUM(Quantity*UnitCost) AS TotCost FROM Door