Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Tue Mar 19, 2024 2:01 pm
Predictive Dialer


All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: after call remaining balance in CDR
PostPosted: Sun Apr 28, 2013 1:11 pm 
Offline

Joined: Sat Mar 16, 2013 11:14 am
Posts: 6
this is usefull
if u want to see what was remaining balnce of customer after a call
after completion steps below your system will log every customer s remaining balance in CDR

warning make backup of these files in case any mistake
step 1


Code:
mysql  -uroot  -p"rootpassword"  mya2billing


make a new column "userbalance" in table cc_call in mya2billing database

Code:
ALTER TABLE cc_call ADD userbalance decimal(15,2)  DEFAULT '0.00';


step 2
edit these files

/var/www/html/a2billing/common/lib/Class.RateEngine.php

line 1140 oregional
Code:
  " id_trunk, src, sipiax, buycost, id_card_package_offer, dnid, destination "; 

replace with
Code:
" id_trunk, src, sipiax, buycost, id_card_package_offer, dnid, destination ,userbalance";

line 1156 oregional is empty
replace with
Code:
   $baqayabalance = $A2B->credit -  a2b_round(abs($cost))  ;

line 1159 oregional
Code:
  " '$buycost', $id_card_package_offer, '" . $A2B->dnid . "', $calldestination )";

replace with
Code:
" '$buycost', $id_card_package_offer, '" . $A2B->dnid . "', $calldestination ,$baqayabalance)";

/var/www/html/a2billing/customer/call-history.php
line 107 oregianal is empty
line 107 replace with
Code:
$FG_TABLE_COL[]=array (gettext("Balance"), "userbalance", "12%", "center", "SORT", "30", "", "", "", "", "", "display_2bill");

and line 108 oreginal
Code:
$FG_COL_QUERY = 't1.starttime, t1.src, t1.calledstation, t1.destination, t1.sessiontime, t1.terminatecauseid, t1.sipiax, t1.sessionbill';

replace with
Code:
$FG_COL_QUERY = 't1.starttime, t1.src, t1.calledstation, t1.destination, t1.sessiontime, t1.terminatecauseid, t1.sipiax, t1.sessionbill,t1.userbalance';


after this every customer will be able to see his remaining balance in cdr after every call
and admin also can see customers balance in CDR in customers account :mrgreen2:


Top
 Profile  
 
 Post subject: Re: after call remaining balance in CDR
PostPosted: Mon Jan 27, 2014 10:31 am 
Offline

Joined: Mon Jan 27, 2014 10:21 am
Posts: 2
Nice post!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 
Predictive Dialer


All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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