Re: [RadiusNT] How to implement Dual billing Rate in a day?

Salman Karim ( (no email) )
Fri, 13 Aug 1999 11:40:11 PDT

Just change in trigger. When u update subaccounts timeleft in trigger just make a check like
Declare @User varchar(16)
Declare @TimeUsed int
Declare @Hour int
Select @Hour=DatePart(hh,CallDate),@TimeUsed=AcctSessionTime,@User=UserName from Inserted
if @Hour is between 9 and 12
Begin
update subaccount set timeleft=timeleft-(@TimeUsed/2) Where Login=@User
End
else
Begin
update subaccount set timeleft=timeleft-@TimeUsed Where Login=@User
End

I think if add these lines in your trigger u will be able to solve yr problem

Salman

---------- Original Message ----------------------------------
From: "1SZG" <salz@kasb.com>
Date: Thu, 12 Aug 1999 22:32:52 +0500

>Dual Billing Rate in a day:
>
>say:
>actual rate = $10/hr
>
>from 9-12 : rate should be 50% of actual
>for rest of time : rate should be 100%
>
>SALz//
>
>
>

For more information about this list (including removal) go to:
http://www.iea-software.com/support/maillists/liststart