UFN_ACCOUNTCODE_GETNORBALBALANCE

This function will return the normal balance for an account category code.

Return

Return Type
nvarchar(10)

Parameters

Parameter Parameter Type Mode Description
@ID int IN

Definition

Copy


create function dbo.UFN_ACCOUNTCODE_GETNORBALBALANCE(@ID integer)
returns nvarchar(10)
with execute as caller
as begin
    declare @NORMALBALANCE nvarchar(10);

  if @ID = 1 or @ID = 5
    set @NORMALBALANCE = 'Debit'
  else
    set @NORMALBALANCE = 'Credit'

    return @NORMALBALANCE;
end