title: Insufficient Number of arguments were supplied for Procedure
body: <p>Quick help I have a Procedure that doesn't let me build in SQL Server: keep saying <code>An insufficient number of arguments were supplied for the procedure or function dbo.GETNEXTBUSINESSDAY.</code> from line 12 to line 15 is where find that error.</p>
  
  <p>My Procedure is dbo.PAYSESTIMATED:</p>
  
  <pre><code>ALTER PROCEDURE       [dbo].[PAYSESTIMATED] 
  (@nLicNum FLOAT,  @nYear FLOAT)
  AS
  BEGIN
  DECLARE @dDueDate DATETIME;
  DECLARE @nActualTaxes FLOAT;
  DECLARE @nPreviousYearTaxes FLOAT;
  DECLARE @nQuarterlyTaxesDue FLOAT;
  DECLARE @nNetPremium FLOAT;
  DECLARE @sQuarterlyDescription VARCHAR(200) = 'PREMIUM TAX QUARTERLY - SURPLUS LINES BROKERS';
  DECLARE @sAnnualDescription VARCHAR(200) = 'PREMIUM TAX ANNUAL - SURPLUS LINES BROKERS';
  DECLARE @dFirstQuarterDue DATETIME = dbo.GETNEXTBUSINESSDAY(convert(Datetime,Cast(@nYear as varchar(4)) +'/05/31'));
  DECLARE @dSecondQuarterDue DATETIME = dbo.GETNEXTBUSINESSDAY(convert(Datetime,Cast(@nYear as varchar(4)) +'/08/31'));
  DECLARE @dThirdQuarterDue DATETIME = dbo.GETNEXTBUSINESSDAY(convert(Datetime,Cast(@nYear as varchar(4)) +'/11/30'));
  DECLARE @dAnnualDue DATETIME = dbo.GETNEXTBUSINESSDAY(CONVERT(DATETIME, @nYear+ISNULL(1, '') +'/03/1'));
  DECLARE @nPreviousAmount FLOAT;
  DECLARE @nPaysEstimated FLOAT;
  DECLARE @nPaysQuarterly FLOAT;
  DECLARE @dToday DATETIME;
  SET NOCOUNT ON;
  ...
  </code></pre>
  
  <p>My Function for Dbo.GETNEXTBUSSINESSDAY:</p>
  
  <pre><code>ALTER FUNCTION [dbo].[GETNEXTBUSINESSDAY]
    ( @dDate Datetime, @nDaysAfter Float)
    RETURNS  datetime AS
   BEGIN
  DECLARE @dNextDay       Datetime = @dDate;
  If @nDaysAfter is null or @nDaysAfter &lt; 0 or @dDate is null begin
    Return null;
  End 
   If @nDaysAfter = 0 begin
     while (dbo.ISHOLIDAY(@dNextDay) = 1) or (RTrim(convert(char,@dNextDay + 'DAY')) in ('SATURDAY','SUNDAY')) Begin
      SET @dNextDay = @dNextDay + 1;
    End;
   RETURN @dNextDay;
  End
  Else BEGIN 
  SET @dNextDay = @dNextDay + 1;
  declare @i int = 1
  while @i &lt;= @nDaysAfter
  begin
      while (dbo.ISHOLIDAY(@dNextDay) = 1) or (RTrim(convert(char,@dNextDay + 'DAY')) in ('SATURDAY','SUNDAY')) 
      Begin
        SET @dNextDay = @dNextDay + 1;
      End
        SET @dNextDay = @dNextDay + 1;
    set @i = @i+1
  End
  END
    RETURN @dNextDay - 1;
  END
  </code></pre>
  
  <p>Thank You.</p>