[Astpp-commit] SF.net SVN: astpp:[2278] trunk/web_interface/astpp-admin.cgi
Brought to you by:
darrenkw
From: <dar...@us...> - 2009-10-06 03:41:22
|
Revision: 2278 http://astpp.svn.sourceforge.net/astpp/?rev=2278&view=rev Author: darrenkw Date: 2009-10-06 03:41:14 +0000 (Tue, 06 Oct 2009) Log Message: ----------- Moved to the new balance calculating code found in the perl module. Modified Paths: -------------- trunk/web_interface/astpp-admin.cgi Modified: trunk/web_interface/astpp-admin.cgi =================================================================== --- trunk/web_interface/astpp-admin.cgi 2009-10-06 03:40:09 UTC (rev 2277) +++ trunk/web_interface/astpp-admin.cgi 2009-10-06 03:41:14 UTC (rev 2278) @@ -1644,8 +1644,7 @@ &accounts_total_balance( $astpp_db, $params->{username} ) / 10000 ); $template->param( - total_due => &accountbalance( $astpp_db, $params->{username} ) / - 10000 ); + total_due => $ASTPP->accountbalance( account => $params->{username} ) / 10000 ); $template->param( calling_cards_in_use => &count_callingcards( $astpp_db, @@ -1934,9 +1933,8 @@ $accountinfo = &get_account( $astpp_db, $params->{numberlist} ); } if ( $accountinfo->{number} ) { + $accountinfo->{balance} = $ASTPP->accountbalance( account => $accountinfo->{number} ); $accountinfo->{balance} = - &accountbalance( $astpp_db, $accountinfo->{number} ); - $accountinfo->{balance} = sprintf( "%.2f", $accountinfo->{balance} / 10000 ); $template->param( first_name => $accountinfo->{first_name} ); $template->param( middle_name => $accountinfo->{middle_name} ); @@ -2256,8 +2254,7 @@ my %row; $accountcount++; my $accountinfo = &get_account( $astpp_db, $account ); - my $balance = &accountbalance( $astpp_db, $account ); - $balance = $balance / 10000; + my $balance = $ASTPP->accountbalance( account => $account ) / 10000 ; $balance = sprintf( "%." . $config->{decimalpoints} . "f", $balance ); $totalbalance = $totalbalance + $balance; $row{cc} = $accountinfo->{cc}; @@ -11416,7 +11413,7 @@ foreach my $name (@booth_list) { my ( %row, $balance, $tmp, $sql ); my $boothinfo = &get_account_including_closed( $astpp_db, $name ); - $balance = &accountbalance( $astpp_db, $name ); + $balance = $ASTPP->accountbalance( account => $name ); $tmp = "SELECT COUNT(*) FROM cdrs WHERE cardnum = " . $astpp_db->quote($name) @@ -11715,7 +11712,7 @@ ); $template->param( booth_name => $params->{booth_name} ); - my $balance = &accountbalance( $astpp_db, $params->{booth_name} ) / 10000; + my $balance = $ASTPP->accountbalance( account => $params->{booth_name} ) / 10000; my $unrated = &count_unrated_cdrs_account( $config, $cdr_db, $accountinfo->{number}, $accountinfo->{cc} ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |