Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 5:28 pm
Voice Broadcast System


All times are UTC




Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Rates Batch Update
PostPosted: Mon Aug 10, 2009 4:47 pm 
Offline

Joined: Sun Mar 12, 2006 2:49 pm
Posts: 954
Location: Barcelona
using mysql!


Top
 Profile  
 
 Post subject: Re: Rates Batch Update
PostPosted: Mon Aug 10, 2009 5:05 pm 
Offline

Joined: Sat Aug 16, 2008 3:31 pm
Posts: 12
areski wrote:
using mysql!

Enable class table debug and catch the query generated on batch update of sell price of rates selected after search by prefix rates. Will your query the same or similar to mine?

UPDATE cc_tariffgroup RIGHT JOIN cc_tariffgroup_plan ON cc_tariffgroup_plan.idtariffgroup=cc_tariffgroup.id INNER JOIN cc_tariffplan ON (cc_tariffplan.id=cc_tariffgroup_plan.idtariffplan ) LEFT JOIN cc_ratecard ON cc_ratecard.idtariffplan=cc_tariffplan.id SET rateinitial = rateinitial +'0.005' WHERE cc_tariffgroup.id= '1' AND cc_ratecard.rateinitial = (SELECT min(c1.rateinitial) FROM cc_tariffgroup RIGHT JOIN cc_tariffgroup_plan ON cc_tariffgroup_plan.idtariffgroup=cc_tariffgroup.id INNER JOIN cc_tariffplan ON (cc_tariffplan.id=cc_tariffgroup_plan.idtariffplan ) LEFT JOIN cc_ratecard AS c1 ON c1.idtariffplan=cc_tariffplan.id WHERE cc_tariffgroup.id= '1' AND cc_ratecard.dialprefix=c1.dialprefix);

To be honest with you, I don't understand why select subquery is needed. I need to update sell rates on a single rate card, why cc_tariffplan, tariffgroup tables are involved to the query?


Top
 Profile  
 
 Post subject: Re: Rates Batch Update
PostPosted: Mon Aug 10, 2009 5:09 pm 
Offline

Joined: Sun Mar 12, 2006 2:49 pm
Posts: 954
Location: Barcelona
definitely it s not needed, this code is invoked when the LCR export is hit.


/Areski


Top
 Profile  
 
 Post subject: Re: Rates Batch Update
PostPosted: Mon Aug 10, 2009 5:28 pm 
Offline

Joined: Sat Aug 16, 2008 3:31 pm
Posts: 12
areski wrote:
definitely it s not needed, this code is invoked when the LCR export is hit.


/Areski


No, this is batch update query. I did "add 0.005" to sell rates. Look at the query again - it has "SET rateinitial = rateinitial +'0.005' "


Top
 Profile  
 
 Post subject: Re: Rates Batch Update
PostPosted: Tue Aug 11, 2009 3:03 am 
Offline

Joined: Thu Mar 12, 2009 4:02 pm
Posts: 31
I had the same problem for batch update on my upgrade box which i have upgraded from 1.3.4 stable to 1.4.1. All the rate card which i have migrated from 1.3.4 had update batch issue. Its working fine on new rate card and import.

I cant figure out why its failing on migrated rate card however all fields are same.

I hope this will help somebody.


Top
 Profile  
 
 Post subject: Re: Rates Batch Update
PostPosted: Tue Aug 11, 2009 8:08 am 
Offline

Joined: Sun Mar 12, 2006 2:49 pm
Posts: 954
Location: Barcelona
This is fixed now, I committed a patch for this yesterday.

/Areski


Top
 Profile  
 
 Post subject: Re: Rates Batch Update
PostPosted: Sat Aug 15, 2009 1:20 am 
Offline

Joined: Sat May 17, 2008 2:01 am
Posts: 26
thanks Areski

i will download a new .tar.gz tonight and will test a fresh install :)

thanks again!


Top
 Profile  
 
 Post subject: Re: Rates Batch Update
PostPosted: Sat Aug 15, 2009 2:28 am 
Offline

Joined: Sun Mar 12, 2006 2:49 pm
Posts: 954
Location: Barcelona
you will have to check out from svn not use the tar.gz

yours,
/Areski


Top
 Profile  
 
 Post subject: Re: Rates Batch Update
PostPosted: Sat Aug 15, 2009 12:29 pm 
Offline

Joined: Sat May 17, 2008 2:01 am
Posts: 26
yes.... i have downloaded from svn in new server... and will test now!

thanks again! :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2
Predictive Dialer


All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group