Query should be like this. You don't need to put quantity in
GROUP BY
clause. And columns order should be same as
SELECT
clause.
ALTER PROCEDURE [dbo].[K_RT_GetProdutstogrid]
@branch int
AS
BEGIN
SET NOCOUNT ON;
select PS.sno, PD.productname,PS.description,SUM(PS.quantity) as quantity from
K_RT_PurchaseDet PS
inner join K_RT_ProductDetails PD on PD.sno=PS.product where purchasedby=@branch
and PS.company=@company and modelno=@modelno
group by PS.sno, PD.productname,PS.description
END