asterisk2billing.org http://forum.asterisk2billing.org/ |
|
Rates Batch Update http://forum.asterisk2billing.org/viewtopic.php?f=22&t=5990 |
Page 2 of 2 |
Author: | areski [ Mon Aug 10, 2009 4:47 pm ] |
Post subject: | Re: Rates Batch Update |
using mysql! |
Author: | sokhapkin [ Mon Aug 10, 2009 5:05 pm ] |
Post subject: | Re: Rates Batch Update |
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? |
Author: | areski [ Mon Aug 10, 2009 5:09 pm ] |
Post subject: | Re: Rates Batch Update |
definitely it s not needed, this code is invoked when the LCR export is hit. /Areski |
Author: | sokhapkin [ Mon Aug 10, 2009 5:28 pm ] |
Post subject: | Re: Rates Batch Update |
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' " |
Author: | sajmeri [ Tue Aug 11, 2009 3:03 am ] |
Post subject: | Re: Rates Batch Update |
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. |
Author: | areski [ Tue Aug 11, 2009 8:08 am ] |
Post subject: | Re: Rates Batch Update |
This is fixed now, I committed a patch for this yesterday. /Areski |
Author: | willianmazzardo [ Sat Aug 15, 2009 1:20 am ] |
Post subject: | Re: Rates Batch Update |
thanks Areski i will download a new .tar.gz tonight and will test a fresh install thanks again! |
Author: | areski [ Sat Aug 15, 2009 2:28 am ] |
Post subject: | Re: Rates Batch Update |
you will have to check out from svn not use the tar.gz yours, /Areski |
Author: | willianmazzardo [ Sat Aug 15, 2009 12:29 pm ] |
Post subject: | Re: Rates Batch Update |
yes.... i have downloaded from svn in new server... and will test now! thanks again! |
Page 2 of 2 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |