Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8735

FMS is not working

$
0
0

Dear All,

 

I am working on FMS and i have checked each and every UDF is correct.

before adding bold font portion it is working fine but if when i add bold font portion it will show error so how it is possible.

 

Help me on Same.

One more thing if i set all parameter value then its work.

 

Declare @ContactNo as decimal(10)

Declare @ContractAmount as Decimal(10,2)

Declare @RCount as int

Declare @BillingDays as int

Declare @U_PerDayBillingAmt as decimal(10,2)

 

 

Set @TotalAmount = $[OINV.U_R2.number]

Set @ContactNo =  $[INV1.U_SerContNo.number]

Set @BillingDays = $[INV1.U_CntrctDys.number]

Set @U_PerDayBillingAmt = $[INV1.U_U_PerDayBillingAmt]

set @RCount = (select COUNT(Line) from ctr1 where ContractID =@ContactNo )

 

 

 

 

if @BillingDays = 30

Set @ContractAmount = (select U_MinBilRs from OCTR where ContractID = @ContactNo)

else

Set @ContractAmount = @BillingDays * @U_PerDayBillingAmt

 

 

if @ContractAmount > @TotalAmount

select @ContractAmount/@RCount

else

select @TotalAmount/@RCount

 

 

Thanks

Manvendra Singh Niranjan


Viewing all articles
Browse latest Browse all 8735

Trending Articles