Changeset 2745
- Timestamp:
- 02/16/10 12:09:40 (2 years ago)
- Files:
-
- trunk/AGI/a2billing.php (modified) (3 diffs)
- trunk/DataBase/mysql-5.x/UPDATE-a2billing-v1.5.1-to-v1.6.0.sql (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/AGI/a2billing.php
r2702 r2745 40 40 error_reporting(E_ALL ^ (E_NOTICE | E_WARNING)); 41 41 42 include _once(dirname(__FILE__)."/lib/Class.Table.php");42 include (dirname(__FILE__)."/lib/Class.Table.php"); 43 43 include (dirname(__FILE__)."/lib/Class.A2Billing.php"); 44 44 include (dirname(__FILE__)."/lib/Class.RateEngine.php"); … … 820 820 // DIVIDE THE AMOUNT OF CREDIT BY 2 IN ORDER TO AVOID NEGATIVE BALANCE IF THE USER USE ALL HIS CREDIT 821 821 $orig_credit = $A2B -> credit; 822 $A2B -> credit = $A2B->credit / 2; 822 823 if ($A2B->agiconfig['callback_reduce_balance'] > 0 && $A2B->credit > $A2B->agiconfig['callback_reduce_balance']) { 824 $A2B->credit = $A2B->credit - $A2B->agiconfig['callback_reduce_balance']; 825 } else { 826 $A2B->credit = $A2B->credit / 2; 827 } 823 828 824 829 $stat_channel = $agi->channel_status($A2B-> channel); … … 826 831 "[status_channel=$status_channel]:[ORIG_CREDIT : ".$orig_credit." - CUR_CREDIT - : ".$A2B -> credit. 827 832 " - CREDIT MIN_CREDIT_2CALL : ".$A2B->agiconfig['min_credit_2call']."]"); 828 829 //if ($stat_channel["result"]!= $status_channel && ($A2B -> CC_TESTING!=1)) { 830 // break; 831 //} 832 833 833 834 if( !$A2B->enough_credit_to_call()) { 834 835 // SAY TO THE CALLER THAT IT DEOSNT HAVE ENOUGH CREDIT TO MAKE A CALL trunk/DataBase/mysql-5.x/UPDATE-a2billing-v1.5.1-to-v1.6.0.sql
r2737 r2745 139 139 140 140 141 142 INSERT INTO cc_config ( config_title, config_key, config_value, config_description, config_valuetype, config_listvalues, config_group_title) VALUES 143 ( 'Callback Reduce Balance', 'callback_reduce_balance', '1', 'Define the amount to reduce the balance on Callback in order to make sure that the B leg wont alter the account into a negative value.', 0, NULL, 'agi-conf1'); 144 145 141 146 UPDATE cc_version SET version = '1.6.0'; 142 147
