--:SetVar Function "AUX:NegativeOrZero.DecMoney"
if exists( select * from [sysobjects] (nolock) where [type] in ('FN','TF') and [name]=N'AUX:NegativeOrZero.DecMoney' )
   drop function [AUX:NegativeOrZero.DecMoney]
GO
/* Translated by $SQLTRANS utility (SQL-file technology). Method author: Sergei Y.Kitáev.
** Script translation date-time: 2022-11-27 00:29:27.24 (stamp of SQL-file generation). */
create function [AUX:NegativeOrZero.DecMoney]( @Value decimal(19,4) )
returns decimal(19,4)
BEGIN
/*==================================================================================================
# SQLAUX scripting library | Author: Sergei Y.Kitáev
----------------------------------------------------------------------------------------------------
#
# UPPER LIMITATION WITH ZERO (“$(dt_DecMoney_AUX)” TYPE):
#
# === Usage: ===
# dbo.[AUX:NegativeOrZero.DecMoney]( <Value> )
#
==================================================================================================*/

return dbo.[AUX:Minimum.DecMoney]( @Value, 0 )

/*================================================================================================*/
END
GO
/*
select dbo.[AUX:NegativeOrZero.DecMoney]( 543.007 ) 'Negative or zero'
select dbo.[AUX:NegativeOrZero.DecMoney]( -94.05 ) 'Negative or zero'
*/
