alter PROCEDURE [dbo].[POSGetPaymentTypes_1_10_18] @StoreId INT = 1, @LanguageId char(5) AS BEGIN SELECT PPT.PosPaymentTypeId, PPT.Code, PPT.CategoryCode, ISNULL(ST.Name, PPT.Name) as Name, PPT.ImageIcon, PPT.BackColor1, PPT.BackColor2, PPT.IsRefundEnabled, ISNULL(PPT.IsEnabled, 0) AS IsEnabled, PPT.ParentPosPaymentTypeId, PPT.RoundingMode, PPT.IsVoucherSaleEnabled FROM PosPaymentTypes PPT JOIN Stores S on S.StoreId = @StoreId JOIN Companies CO on CO.CompanyId = S.CompanyId JOIN Countries C on C.CountryId = CO.CountryId LEFT JOIN Translations ST on ST.Category = 'PosPaymentTypes' and ST.LanguageId = C.LanguageId AND ST.[Key] = PPT.PosPaymentTypeId LEFT JOIN StoreSetup SSS on SSS.StoreId = @StoreId AND SSS.CashRegister IS NULL and SSS.ParameterName = 'IsPaymentTypeEnabled' and SSS.ParameterAttribute = PPT.Code LEFT JOIN StoreSetup SS on SS.StoreId IS NULL AND SS.CashRegister IS NULL and SS.ParameterName = 'IsPaymentTypeEnabled' and SS.ParameterAttribute = PPT.Code WHERE COALESCE(SSS.ParameterValue, SS.ParameterValue, 'True') = 'True' ORDER BY PaymentIndex END