CREATE PROC Cash_MultiplePrescriptionCheck @UserCash SMALLINT
AS
BEGIN
    SELECT COUNT(Id_Havaleh) UncheckedPrescription
    FROM dbo.TmpDrugH WITH (NOLOCK)
    WHERE Kind_Flag = 1
          AND ISNULL(Nu_Forosh, 0) <> 0
          AND Sazman_Code <> '02'
          AND MultipleFactorUserId = @UserCash
          AND kind_Save IN ( 2, 3 )
          AND ISNULL(CheckU, 0) = 0;
END;
