USE [INVENTORY] GO /****** Object: StoredProcedure [dbo].[sp_Inv_PriceListAll] Script Date: 7/2/2021 4:42:46 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER Procedure [dbo].[sp_Inv_PriceListAll] as SELECT A.ItemID, isNull(B.ItemName,'') + ' ' + isNull(B.ItemDesc,'') AS ItemDesc, isNull(A.OnHand,0) AS OnHand, F.RoomClass, E.RoomRate, E.SellingPriceIn, E.SellingPriceOut, --isNull(A.SellingPriceOut,0) aS PriceOut, --isNull(A.SellingPriceIn,0) As PriceIn, isnull(C.ItemClassificationName,''), B.Listcost, --A.Markup_In, --A.Markup_Out, B.Packing, A.LocationID, D.Location, cast(isnull(A.SellingPriceOut, 0) - (isnull(A.SellingPriceOut,0) * .20) as Money) as SC, Cast(isnull(A.SellingPriceOut, 0) - (isnull(A.SellingPriceOut,0) * .17) as Money) as Cash FROM Inventory..tbInvent A LEFT Outer Join Inventory..tbinvMaster B ON A.ItemId = B.ItemID LEFT Outer Join Inventory..tbinvClassification C ON B.ItemClassificationID = C.ItemClassificationID LEFT Outer Join tbInvLocation D on A.LocationID = D.LocationID LEFT Join tbInvSocialize E ON E.ItemID = A.ItemID and E.LocationID = A.LocationID LEFT Join BUILD_FILE..TbCoRoomClass F ON E.RoomClassID = F.RoomClassID Where (A.ItemStatus = 0 or A.ItemStatus is null) and isnull(B.ItemStatus,0) <> 1 --jp added and F.RoomClassID <> 'F' and a.ItemID is not null order by b.ItemName