for billing in 1 minute roundup ( 60 sec pulse ) but i failed to get it working for 6 second pulse .
Marnus's sql query is perfect .. now suppose charge is 1.5 cent /min then i can used 6 second round up'd value and multiple by 0.15 to get call bill in cent and it can also be used for 30 second pulse or any other value with small modification .. Thx .
On 14/11/06, Marnus van Niekerk <[EMAIL PROTECTED]> wrote:
Supposing you have an extra column called 6second:
UPDATE cdr SET 6second=billsec+(6-mod(billsec,6) where 6second=0
if you want a decimal minutes column called billmin
UPDATE cdr SET billmin=round((billsec/60)+0.5),1) where billmin=0
Vicky wrote:Thx and what would the sql query be ? . I plan to put additional field as 6second .
How can i make billsec of values of whole table get rounded and filled in field "6second"
Sorry i am a noob with mysql :DOn 14/11/06, James Coberly <[EMAIL PROTECTED]> wrote:sum(duration+(6-mod(duration,6) for summary of seconds divisible by 6, /60 for minutes
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________ --Bandwidth and Colocation provided by Easynews.com --
asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
